| Field Name | Type | Description | Required | Example |
|---|---|---|---|---|
title | String | Order title | No | Collection order |
order_no | String | Merchant order number (max 64 characters, must be unique) | Yes | TX10000000000001 |
amount | number | Order amount | Yes | 1000 |
currency | String | Currency | Yes | IDR |
payment_method | String | Payment method code, please refer to payment method list | Yes | MAYA / GCASH |
callback_url | String | Callback notification URL | Yes | http://www.aaa.com/callback |
return_url | String | Redirect URL after payment completion | Yes | http://www.aaa.com/pay_success.html |
user_ip | String | User real IP address. To improve success rate, please provide real IP | Yes | |
return_type | String | Response type: PLATFORM (hosted checkout), CUSTOM (custom checkout), default PLATFORM | No | PLATFORM |
remark | String | Transaction description (max 200 characters) | No | Collection order test |
expire_seconds | int | Order expiration time (seconds) | No | 3600 |
| payer | object | Payer information | Yes | |
user_id | String | Unique user identifier (account or ID) | Yes | test001 |
{
"title": "收款订单",
"order_no": "P3435435654700020",
"amount": 1000,
"currency": "IDR",
"remark": "test pay order",
"payment_method": "QRIS",
"return_url": "http://localhost:8080/cashier",
"callback_url": "http://localhost:8080/cb/test/Titan003",
"expire_seconds": 3600,
"user_ip": "10.10.2.108",
"return_type": "PLATFORM",
"payer": {
"user_id": "test001"
}
}
| Field Name | Type | Description |
|---|---|---|
code | int | Status code (200: request success, others: error) |
msg | String | Response message |
| data | object | Response data |
trade_no | String | Platform order number |
order_no | String | Merchant order number |
status | String | Order status (PROCESSING: processing) |
message | String | Response message |
amount | number | Order amount |
due_pay_amount | number | Amount to be paid |
currency | String | Currency |
fee | number | Fee |
| details | object | Payment guidance information |
redirect_url | String | Checkout redirect URL |
{
"code": 200,
"msg": "Success",
"data": {
"trade_no": "PI2009978658270650368",
"order_no": "pay-00003",
"status": "PROCESSING",
"message": "success",
"amount": "1000",
"due_pay_amount": "1000",
"currency": "IDR",
"fee": "3",
"details": {
"redirect_url": "https://sandbox.payhub.example.com/pay/PI2009978658270650368"
}
}
}
{
"code": 4002,
"msg": "Payment method code not supported",
"data": null
}