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
- Merchant creates an order and calls the order creation API
/b2b/core/api/ext/order/send - Baokim returns
payment_url(payment link). - Merchant redirects the user to
payment_url. - User selects payment method and pays on Baokim's interface.
- 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
- Merchant displays the list of payment methods.
- User selects a payment method.
- Merchant calls order creation API with
payment_method. - Baokim returns
payment_url. - Merchant redirects user to the corresponding payment page.
- 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
Signatureheader - 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