Bank Collection API
Amount Matching Mode
Create a collection order and receive the beneficiary account details together with the exact amount to transfer. Use this mode when your application needs to display bank-transfer instructions directly.
Authentication
Request headers and signing
Authentication follows the standard API integration. Each request must include the merchant code, RSA signature, and payment channel code.
| Header | Type | Description |
|---|---|---|
| MCODE | string | Merchant code. |
| SIGN | string | Base64-encoded signature generated with your RSA private key. |
| Passage | string | Payment channel code. |
SIGN generation
- 1Sort request parameters alphabetically by key.
- 2Join non-empty
key=valuepairs, then calculate SHA-256. - 3Sign with an RSA-2048 private key and Base64 encode the result.
Quick start
Create an order
Send a signed POST request to https://{domain}/api/v1/payin/create_bank.
curl -X POST "https://{domain}/api/v1/payin/create_bank" \
-H "Content-Type: application/json" \
-H "MCODE: <your-merchant-code>" \
-H "SIGN: <base64-rsa-signature>" \
-H "Passage: testpayinbcaamt" \
-d '{
"type": "payin",
"uid": "user_2883",
"merchantOid": "9d6e7671-64b9-408b-abad-1ef4601af101",
"amount": 1000000,
"notifyUrl": "https://your-server.com/callback/payin",
"timestamp": 1720425600,
"name": "Taylor",
"email": "[email protected]",
"cardNo": "123456789",
"passage": "testpayinbcaamt"
}'API reference
Create a bank collection order
POSTPath: /payin/create_bank
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| uid | string | Yes | User ID. |
| merchantOid | string | Yes | Merchant order ID. UUID is recommended. |
| amount | number | Yes | Order amount in cents. 1000000 = IDR 10,000. |
| notifyUrl | string | Yes | Asynchronous notification URL. |
| timestamp | number | Yes | Unix timestamp in seconds. |
| name | string | Yes | Customer name. |
| string | Yes | Customer email address. | |
| cardNo | string | Yes | Payer's bank card number. |
| passage | string | Yes | Payment channel code. Providing it skips payment-method selection. |
| type | string | Yes | Fixed value: payin. |
Response
Response fields
The top-level response contains code, msg, and data. A code value of 0 indicates success.
| Field | Type | Description |
|---|---|---|
| code | number | 0 on success. |
| msg | string | Response message. |
| data | object | Response data. See fields below. |
data object
| Field | Type | Description |
|---|---|---|
| oid | string | Platform order ID. |
| merchantOid | string | Merchant order ID. |
| type | string | Order type. Always payin. |
| url | string | Cashier page URL. |
| orderAmount | number | Original order amount in cents. |
| paymentAmount | number | Exact amount to transfer in cents. It may differ from the original order amount; always use this value. |
| payee | string | Beneficiary account name. |
| payeeAccount | string | Beneficiary account number. |
| payeeBank | string | Beneficiary bank code. |
| matchType | string | Matching mode: match_amount. |
| captcha | string | Empty. A memo is not required in this mode. |
| validity | number | Order expiry time as a Unix timestamp. |
{
"code": 0,
"msg": "Operation successful",
"data": {
"type": "payin",
"oid": "CLN1607254gP6yMAk",
"merchantOid": "17c2c55a-e127-4c1c-826a-1f3244363a29",
"url": "https://api.payment.com/pay_bank.html?oid=CLN1607254gP6yMAk",
"orderAmount": 1000000,
"paymentAmount": 1000037,
"payee": "testname",
"payeeAccount": "1234567890",
"payeeBank": "014",
"matchType": "match_amount",
"captcha": "",
"validity": 1752657168
}
}Important
Amount matching requirements
Use paymentAmount for the transfer
Amount matching generates an exact transfer value that can differ from the request amount and response orderAmount. Display and require payment of paymentAmount; otherwise, the order may not be matched.
validity timestamp. Show this deadline to the payer and ask them to complete the transfer before it expires.Sandbox callbacks
Test callback behavior
The test channel automatically triggers a callback 30 seconds after an order is created. Results cycle in sequence; create multiple orders to test every scenario.
| # | Order status | Settlement status | Behavior |
|---|---|---|---|
| 1 | order_over | settle_failed | Order expired. |
| 2 | order_fail | settle_failed | Payment failed. |
| 3 | order_success | settle_failed | Payment succeeded, settlement failed. |
| 4 | order_success | settle_await → after 15s → settle_success | Delayed settlement; two callbacks are sent. |
| 5 | order_success | settle_await | Payment succeeded, settlement pending. |
| 6 | order_success | settle_success | Full success. |
| 7 | — | — | Order creation fails directly; no callback is sent. |