Skip to main content

Overview

Version

VersionStatusRelease DateEnd of SupportDeprecation Warning
V1.0Latest07/2025

Terminology Table

TermDefinition
BaokimBaokim E-commerce Trading Joint Stock Company
MERCHANTAn entity that connects with Baokim to integrate payment services
MASTER MERCHANTA high-level merchant managing one or more Sub Merchants
SUB MERCHANTA sub-level merchant operating under the management of a Master Merchant
ĐVCNTTPayment Service Provider
USERCustomer purchasing goods from the Merchant
VAVirtual Account — a virtual account used for collection via bank transfer
CĐTGInstallment conversion
BNPLBuy Now Pay Later
TCTCCredit institutions (Kredivo, HomeCredit, FundiIn, Muadee)
CITCardholder-Initiated Transaction
MIT / UCOFMerchant-Initiated Transaction using saved card token
JWTJSON Web Token — OAuth2 authentication string
SHA256withRSADigital signature algorithm using RSA + SHA-256
SHA1withRSADigital signature algorithm using RSA + SHA-1 (used for Host-to-Host VA direct)
AES-256-CBCCard data encryption algorithm
3DS / OTPTwo-factor authentication for international card payments

General Introduction to Baokim B2B Services

Baokim provides a set of APIs that allow merchants to directly integrate various payment services. All data transmission is in JSON format over HTTPS channels, combined with OAuth2 authentication and digital signatures to ensure security.

This documentation includes the following API groups:

Direct Merchant

Merchants integrate directly with Baokim with no intermediate tier.

Basic - Pro

APIDescription
Merchant AuthenticationObtain JWT OAuth2 Token
Create OrderCreate payment order, receive payment_url
Query OrderCheck order status
WebhookReceive payment result notifications
Refund OrderFull or partial refund
Cancel OrderCancel unpaid order

Host-to-Host

GroupAPIDescription
VACreate VA, Update VA, Webhook, Query, RefundCollection via bank transfer using Virtual Account
BNPLGet loan packages, Create transaction, Query, Webhook, CancelBuy Now Pay Later via Kredivo, HomeCredit, FundiIn, Muadee
InstallmentGet bank list, Check card, Create installment transaction, Query, Webhook, CancelCredit card installment conversion via issuing bank
International CardAPI Authentication, Authentication, Webhook, Authorization, Capture, Reversal, Refund, QueryVisa / Mastercard / JCB payment with CIT + MIT (UCOF) flow

Master Merchant

Hierarchical model: Master Merchant manages multiple Sub Merchants. All requests include both master_merchant_code and sub_merchant_code.

Basic - Pro

APIDescription
Merchant AuthenticationObtain JWT OAuth2 Token
Create OrderCreate payment order with Auto Debit model under Master/Sub hierarchy
Payment WebhookReceive payment result notifications
Query OrderCheck order status
Cancel Auto DebitCancel Auto Debit instruction
Cancel WebhookReceive auto debit cancellation notifications
Refund OrderRefund transaction

Host-to-Host

GroupAPIDescription
VACreate VA, Webhook, Update VA, Query, RefundVirtual Account under Master/Sub Merchant model
International CardAPI Authentication, Authentication, Webhook, Authorization, Capture, Reversal, Refund, Query, Payment UCOFVisa / Mastercard / JCB payment under Master/Sub model with MIT (UCOF) flow
QRPay/QRGlobalMerchant Authentication, Create QR Code, Refund, Webhook, QueryPayment via domestic (QRPay) and cross-border (QRGlobal) QR codes under Master/Sub model
DeeplinkMerchant Authentication, Get bank list, Create DeeplinkRedirects the user into the bank's app to perform a money transfer under Master/Sub model

Merchant Classification

Direct Merchant

Direct Merchant is a model where the merchant integrates directly with Baokim's system via API.

In this model, the merchant will:

  • Sign a contract directly with Baokim
  • Receive merchant_code, client_id, client_secret
  • Integrate API to create orders and process payments

Flow Overview

  1. User makes a purchase on the merchant's system
  2. Merchant calls Baokim's order creation API
  3. Baokim returns payment_url
  4. Merchant redirects user to the payment page
  5. After payment completion, Baokim sends the result via:
    • Redirect URL
    • Webhook

Characteristics

  • Merchant directly manages API integration
  • Merchant is responsible for managing orders and transactions
  • Baokim handles payment processing and bank connections

Master Merchant

Master Merchant is a model where an intermediary partner integrates with Baokim and provides payment services to multiple sub-merchants.

Master Merchant will:

  • Integrate API with Baokim
  • Manage multiple sub-merchants in their system
  • Send store_code or branch_code information to distinguish sub-merchants

Flow Overview

  1. User purchases at a sub-merchant's system
  2. Sub-merchant sends payment request to the master merchant's system
  3. Master Merchant calls Baokim's order creation API
  4. Baokim processes the payment
  5. Payment result is returned to Master Merchant
  6. Master Merchant updates transaction status for the sub-merchant

Characteristics

  • Master Merchant manages multiple sub-merchants
  • Only Master Merchant integrates API with Baokim
  • Sub-merchants do not need to integrate directly with Baokim