Skip to main content

Integration Methods

Overview

BaoKim supports two main integration methods, depending on the level of payment flow control the merchant desires:

  • Redirect Integration (Basic / Pro)
  • Host-to-Host (H2H)

Basic / Pro Integration Method

Integration method through Baokim's payment gateway.

Merchant creates an order via API and redirects the user to Baokim's payment page. The user performs payment on the interface provided by Baokim.

Applicable to: B2B Core

Basic Integration

In the Basic model, the merchant only needs to create an order and redirect the user to Baokim's payment page.

Flow

  1. Merchant creates an order and calls the order creation API
    /b2b/core/api/ext/order/send
  2. Baokim returns payment_url (payment link).
  3. Merchant redirects the user to payment_url.
  4. User selects payment method and pays on Baokim's interface.
  5. Baokim sends transaction result to merchant via webhook.

Characteristics

  • Simple and quick integration
  • Baokim handles the entire payment interface
  • Merchant only needs to handle redirect and webhook

Pro Integration

In the Pro model, the merchant can build their own payment method selection interface on their system.

After the user selects a payment method, the merchant sends the additional payment_method parameter when calling the order creation API.

Flow

  1. Merchant displays the list of payment methods.
  2. User selects a payment method.
  3. Merchant calls order creation API with payment_method.
  4. Baokim returns payment_url.
  5. Merchant redirects user to the corresponding payment page.
  6. Baokim sends transaction result via webhook.

Characteristics

  • Merchant has better control over user experience
  • Can route payment flow by payment method
  • Suitable for systems requiring conversion optimization

Host-to-Host (H2H) Integration

Server-to-server integration method, where the merchant builds the entire payment interface and communicates directly with Baokim's API.

Applicable to:

  • Virtual Account (VA)
  • Buy Now Pay Later (BNPL)
  • Installment conversion
  • Card payment
  • Other advanced payment APIs

Technical Characteristics

  • All request/response use HTTPS + JSON
  • Merchant manages interface and payment experience
  • Authentication via OAuth2 (JWT Token) on each request
  • Requires SHA256withRSA digital signature in Signature header
  • For some APIs, card data must be encrypted with AES-256-CBC + Base64
  • Merchant must build Webhook endpoint to receive transaction result notifications

When to Use H2H

  • Merchant needs full control over payment experience
  • Merchant integrates directly with specific payment methods
  • Merchant builds internal payment system