Query Payment
This API is used to inquiry payment status and information from merchant's platform to DANA.
For the easiest integration, use DANA's Libraries to implement Custom Checkout or Hosted Checkout.
application/jsonasymmetricSignature method1. Value: Transaction amount, including the cents
2. Currency: Currency code based on ISO
Check yours here: https://dashboard.dana.id/sandbox/submerchants
If you're an aggregator: subMerchantId is mandatory subMerchantId is equal to externalDivisionId, obtained from the Create Division API or DANA Sandbox Dashboard.
If you use QRIS or have outlets/stores under you: externalStoreId is mandatory
externalStoreId can be obtained from the Create Shop API or DANA Sandbox Dashboard.
POST .../payment-gateway/v1.0/debit/status.htm HTTP/1.2
Content-type: application/json
X-TIMESTAMP: 2020-12-23T08:31:11+07:00
X-SIGNATURE: to fill..
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
{
"originalPartnerReferenceNo": "2020102900000000000001",
"serviceCode": "54",
"merchantId": "23489182303312"
}
application/json•
00 = Success, the order has been successfully in final state and paid •
01 = Initiated, the order has been created, but has not been paid •
02 = Paying, the order is in process, not in final state, payment is success •
05 = Cancelled, the order has been closed •
07 = Not found, the order is not found1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Transaction amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
VIRTUAL_ACCOUNTVIRTUAL_ACCOUNTVIRTUAL_ACCOUNTDANA recommends partners verify the signature whenever they receive our virtual code response. This prevents virtual account number tampering and ensures the validity of the virtual account. Refer to the following steps:
- Prepare the data of virtual account info as string to sign, the following is the example:
- Minify the JSON data
- Decode the signature with base64.
- Decrypt the signature using public key which is given by DANA.
- Verify the correctness of the signature based on SHA-256 with RSA-2048 encryption signing against the string to sign.
{
"virtualAccountCode":"37218738131",
"virtualAccountExpiryTime":"2020-12-23T09:10:11+07:00"
}
{"virtualAccountCode":"37218738131","virtualAccountExpiryTime":"2020-12-23T09:10:11+07:00"}
Content-Type: application/json
X-TIMESTAMP: 2020-12-23T09:10:11+07:00
{
"responseCode": "2005500",
"responseMessage": "Successful",
"originalPartnerReferenceNo": "2020102900000000000001",
"originalReferenceNo": "2020102977770000000009",
"originalExternalId": "30443786930722726463280097920912",
"serviceCode": "54",
"latestTransactionStatus": "00",
"transactionStatusDesc": "success",
"originalResponseCode": "2005500",
"originalResponseMessage": "Successful",
"sessionId": "883737GHY8839",
"requestID": "3763773",
"transAmount": {
"currency": "IDR",
"value": "239.00"
},
"amount": {
"currency": "IDR",
"value": "239.00"
},
"feeAmount": {
"currency": "IDR",
"value": "239.00"
},
"paidTime": "2020-12-21T14:56:11+07:00",
"title": "CITestGoods",
"additionalInfo": {
"buyer": {
"userId": "20160322334445555",
"externalUserId": "",
"externalUserType": "",
"nickname": "mike"
},
"seller": {
"userId": "20160322334445555",
"externalUserId": "",
"externalUserType": "",
"nickname": "mike"
},
"amountDetail": {
"orderAmount": {
"currency": "IDR",
"value": "239.00"
},
"payAmount": {
"currency": "IDR",
"value": "239.00"
},
"voidAmount": {
"currency": "IDR",
"value": "239.00"
},
"confirmAmount": {
"currency": "IDR",
"value": "239.00"
},
"refundAmount": {
"currency": "IDR",
"value": "239.00"
},
"chargebackAmount": {
"currency": "IDR",
"value": "239.00"
},
"chargeAmount": {
"currency": "IDR",
"value": "239.00"
}
},
"timeDetail": {
"createdTime": "2001-07-04T12:08:56+07:00",
"expiryTime": "2001-07-04T12:08:56+07:00",
"paidTimes": [
"2001-07-04T12:08:56+07:00"
],
"confirmedTimes": [
"2001-07-04T12:08:56+07:00"
],
"cancelledTime": "2001-07-04T12:08:56+07:00"
},
"goods": [
{
"merchantGoodsId": "24525635625623",
"description": "Women Summer Dress New White Lace Sleeveless\nCute Casual Summer Dresses Vestidos roupas femininas WQW1045",
"category": "travelling/subway",
"price": {
"currency": "IDR",
"value": "239.00"
},
"unit": "Kg",
"quantity": "3.2",
"merchantShippingId": "564314314574327545",
"snapshotUrl": "[http://snap.url.com]",
"extendInfo": "{ \"objectId\": \"87884393857\",\"objectCode\": \"62\",\"objectOperator\": \"Telkomsel\"}"
}
],
"shippingInfo": [
{
"merchantShippingId": "564314314574327545",
"trackingNo": "646431431322332133",
"carrier": "Federal Express",
"chargeAmount": {
"currency": "IDR",
"value": "239.00"
},
"countryName": "JP",
"stateName": "GA",
"cityName": "Atlanta",
"areaName": "Rd",
"address1": "137 W San Bernardino",
"address2": "4114 Sepulveda",
"firstName": "Jim",
"lastName": "Li",
"mobileNo": "13765443223",
"phoneNo": "2423-2322342",
"zipCode": "310001",
"email": "abc@gmail.com",
"faxNo": "2123-11113"
}
],
"orderMemo": "memo",
"paymentViews": [
{
"cashierRequestId": "64c4fdc544a7edff9c1e51aebc80f2eb",
"paidTime": "2022-01-04T19:13:54+07:00",
"payOptionInfos": [
{
"payMethod": "NETWORK_PAY",
"payOption": "NETWORK_PAY_PG_OVO",
"payAmount": {
"value": "51312.00",
"currency": "IDR"
},
"transAmount": {
"value": "51312.00",
"currency": "IDR"
},
"chargeAmount": {
"value": "0.00",
"currency": "IDR"
},
"payOptionBillExtendInfo": "{\"key\":\"value\"}",
"extendInfo": "{\"key\":\"value\"}"
}
],
"payRequestExtendInfo": "{\"key\":\"value\"}",
"extendInfo": "{\"key\":\"value\"}"
}
],
"extendInfo": "{\"key\":\"value\"}",
"statusDetail": {
"acquirementStatus": "SUCCESS",
"frozen": false,
"cancelled": false
},
"virtualAccountInfo": {
"virtualAccountCode": "37218738131",
"virtualAccountExpiryTime": "2020-12-23T09:10:11+07:00",
"signature": "XD89da89d"
},
"closeReason": "reason"
}
}
| Response | Cause | Solution |
|---|---|---|
2005500Successful | Success to be processed | Mark Query Payment process as Success and check the latestTransactionStatus, with these conditions: • 00 = Order has been successfully in final state and paid. Mark Payment as Success • 01 = Waiting for payment. Mark Payment as Pending • 02 = The order is in process, not in final state, payment is success. Mark Payment as Success • 05 = Order has been cancelled. Mark Payment as Failed • 07 = Order is not found. Mark Payment as Failed |
4005500Bad Request | General request failed error | Mark Query Payment process as Failed and mark Payment as Pending. Retry request with proper parameter |
4005501Invalid Field Format | Invalid format for certain field | Mark Query Payment process as Failed and mark Payment as Pending. Retry request with proper parameter |
4005502Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark Query Payment process as Failed and mark Payment as Pending. Retry request with proper parameter |
4015500Unauthorized. [reason] | General unauthorized error | Mark Query Payment process as Failed and mark Payment as Pending. Retry request with proper parameter |
4045501Transaction Not Found | Transaction not found | Mark Query Payment process as Failed and mark Payment as Failed. Try to create a new order |
4295500Too Many Requests | Maximum transaction limit exceeded | Mark Query Payment process as Pending mark Payment as Pending. Retry request periodically |
5005500General Error | General error non retry-able | Mark Query Payment process as Failed and mark Payment as Pending. Retry request periodically |
5005501Internal Server Error | Unknown internal server failure, please retry the process again | Mark Query Payment process as Pending mark Payment as Pending. Retry request periodically |
Total timeout | Total timeout, the client side does not get any responses from the server side (Can be due to network issue, server slowing down, and so on) | Do a retry maximum 3 attempts, if still fails mark Query Payment process as Pending and mark Payment as Pending |
Unexpected response (Empty field/field does not exist/undefined response code) | The server does not produce expected responses (Can be due to hardware failure, bugs, and so on) |
|