Skip to main content

Query Order

Process

Description:

  • Merchant calls this API to retrieve detailed information about an order.

API Information

Method: POST

URL: /b2b/core/api/ext/mm/order/get-order

Request

Main Parameters

NoParameterData TypeRequiredDescription
1request_idStringRequest ID
2request_timeDatetimeRequest time. Format: YYYY-MM-DD H:m:s
3master_merchant_codeString(50)Master merchant code provided by Baokim
4sub_merchant_codeString(50)Sub merchant code provided by Baokim
5mrc_order_idStringMerchant order ID

Request Example

{
"request_id": "7T53RI2IDS5JWAF",
"request_time": "2023-08-18 10:00:00",
"master_merchant_code": "BAOKIMMASTERMERCHANT",
"sub_merchant_code": "BAOKIMSUBMERCHANT",
"mrc_order_id": 24121706176582
}

Response

Main Parameters

NoParameterData TypeRequiredDescription
1codeIntegerResult code
2messageStringStatus message
3dataObjectResponse data

Order Information (data.order)

NoParameterData TypeRequiredDescription
1idIntegerBaokim order ID
2mrc_order_idStringMerchant order ID
3total_amountIntegerOrder amount
4payment_methodIntegerPayment method
5statusIntegerOrder status (see table below)
6completed_atDatetimeSuccess time
7created_atDatetimeCreation time
8updated_atDatetimeLast update time

Order Status Information (data.order.status)

ValueStatus
0Created
1Success
2Rejected
3Pending approval
4Pending FX conversion
5Processing
6Pending prepayment
7Expired
8Refunding
9Refunded

Transaction Information (data.transactions)

NoParameterData TypeRequiredDescription
1idIntegerBaokim transaction ID
2typeIntegerTransaction type: 1 = Payment, 2 = Refund
3payment_methodIntegerPayment method
4sub_merchant_feeIntegerSub merchant fee
5master_merchant_feeIntegerMaster merchant fee
6master_merchant_modelIntegerMaster merchant model
7user_feeIntegerUser fee
8total_amountIntegerTotal amount customer pays after fees
9amountIntegerAmount of sub merchant balance change
10descriptionStringTransaction content
11statusIntegerStatus: 0 = Created, 1 = Success, 2 = Failed, 3 = Pending
12bnplObjectBNPL information (if applicable)
13installmentObjectInstallment information (if applicable)
14completed_atDatetimeSuccess time
15created_atDatetimeCreation time
16updated_atDatetimeLast update time

Transaction BNPL Information (data.transactions.bnpl)

NoParameterData TypeRequiredDescription
1payment_per_monthIntegerMonthly payment amount
2paylater_amountIntegerPay later amount
3down_paymentIntegerDown payment amount
4providerIntegerBNPL provider

Transaction Installment Information (data.transactions.installment)

NoParameterData TypeRequiredDescription
1card_brandIntegerCard brand
2periodIntegerInstallment period
3payment_per_periodIntegerPayment per period
4bank_codeIntegerBank code

Error Codes

Error CodeDescription
102Provider error
104Authentication error
710Sub merchant does not exist
711Master merchant does not exist
712Sub merchant is not active
713Master merchant is not active
714Sub merchant does not belong to master merchant