Developer Documentation
API Reference
Private API module · v1

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.

POST
HTTP method
/payin/create_bank
Endpoint
match_amount
Matching mode

Authentication

Request headers and signing

Authentication follows the standard API integration. Each request must include the merchant code, RSA signature, and payment channel code.

HeaderTypeDescription
MCODEstringMerchant code.
SIGNstringBase64-encoded signature generated with your RSA private key.
PassagestringPayment channel code.

SIGN generation

  1. 1Sort request parameters alphabetically by key.
  2. 2Join non-empty key=value pairs, then calculate SHA-256.
  3. 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
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": "taylor@example.com",
    "cardNo": "123456789",
    "passage": "testpayinbcaamt"
  }'

API reference

Create a bank collection order

POST

Path: /payin/create_bank

Request body

FieldTypeRequiredDescription
uidstringYesUser ID.
merchantOidstringYesMerchant order ID. UUID is recommended.
amountnumberYesOrder amount in cents. 1000000 = IDR 10,000.
notifyUrlstringYesAsynchronous notification URL.
timestampnumberYesUnix timestamp in seconds.
namestringYesCustomer name.
emailstringYesCustomer email address.
cardNostringYesPayer's bank card number.
passagestringYesPayment channel code. Providing it skips payment-method selection.
typestringYesFixed value: payin.

Response

Response fields

The top-level response contains code, msg, and data. A code value of 0 indicates success.

FieldTypeDescription
codenumber0 on success.
msgstringResponse message.
dataobjectResponse data. See fields below.

data object

FieldTypeDescription
oidstringPlatform order ID.
merchantOidstringMerchant order ID.
typestringOrder type. Always payin.
urlstringCashier page URL.
orderAmountnumberOriginal order amount in cents.
paymentAmountnumberExact amount to transfer in cents. It may differ from the original order amount; always use this value.
payeestringBeneficiary account name.
payeeAccountstringBeneficiary account number.
payeeBankstringBeneficiary bank code.
matchTypestringMatching mode: match_amount.
captchastringEmpty. A memo is not required in this mode.
validitynumberOrder expiry time as a Unix timestamp.
JSON response
{
  "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.

Expiry: The order expires after the 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 statusSettlement statusBehavior
1order_oversettle_failedOrder expired.
2order_failsettle_failedPayment failed.
3order_successsettle_failedPayment succeeded, settlement failed.
4order_successsettle_await → after 15s → settle_successDelayed settlement; two callbacks are sent.
5order_successsettle_awaitPayment succeeded, settlement pending.
6order_successsettle_successFull success.
7Order creation fails directly; no callback is sent.