Create Order
This API allows merchants to create orders on the DANA for Payment Gateway functionality. For the easiest integration, use DANA's Libraries to implement Hosted Checkout.
Idempotent Key & Usage Rules
Idempotent is controlled by Idempotent Key ( merchantId + partnerReferenceNo)
- If Idempotent Key has been created and the key information is consistent, then Response code 2005400 (success) will be returned.
- If Idempotent Key has been created but the key information isn’t consistent, then Response code 4045418 (inconsistent request) will be returned.
application/jsonasymmetricSignature methodNote:
- When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request.
- For QRIS, the maximum length for partnerReferenceNo is 25 characters.
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
This must be set to a future time. In the Sandbox environment, the default expiration is 30 minutes.
•
NOTIFICATION: When finish payment, DANA will notify to the URL that has been defined by partner •
PAY_RETURN: After the payment, the user will be redirected to merchant page, this is mandatoryREDIRECT1. 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
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/payment-host-to-host.htm
Content-Type: application/json
X-TIMESTAMP: 2024-12-23T09:10:11+07:00
X-SIGNATURE: to fill ...
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
{
"partnerReferenceNo":"2020102900000000000001",
"merchantId":"23489182303312",
"amount":{
"value":"15000.00",
"currency":"IDR"
},
"validUpTo": "2026-04-17T12:35:34+07:00",
"urlParams":[
{
"url":"https://test.bi.go.id/v1/test",
"type":"PAY_RETURN",
"isDeeplink":"Y"
},
{
"url":"https://test.bi.go.id/v1/test",
"type":"NOTIFICATION",
"isDeeplink":"Y"
}
],
"additionalInfo":{
"order":{
"orderTitle":"Payment Gateway Order",
"scenario":"REDIRECT"
},
"mcc":"5814",
"envInfo":{
"sourcePlatform":"IPG",
"terminalType":"SYSTEM"
}
}
}
application/jsonNote: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
DANA automatically generates the payment code.
Content-Type: application/json
X-TIMESTAMP: 2024-12-23T09:10:11+07:00
{
"responseCode": "2005400",
"responseMessage": "Successful",
"referenceNo": "2020102977770000000009",
"partnerReferenceNo": "2020102900000000000001",
"webRedirectUrl": "https://pjsp.com/universal?bizNo=REF993883&..."
}
| Response | Cause | Solution |
|---|---|---|
2005400Successful | Success to be processed | Mark Create Order process as Success |
4005400Bad Request | General request failed error | Mark Create Order process as Failed. Retry request with proper parameter |
4005401Invalid Field Format | Invalid format for certain field | Mark Create Order process as Failed. Retry request with proper parameter |
4005402Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark Payment Create Order as Failed. Retry request with proper parameter |
4015400Unauthorized. Invalid Signature | Signature is invalid | Mark Create Order process as Failed. Retry request with proper parameter |
4035402Exceeds Transaction Amount Limit | Exceeds transaction amount limit | Mark Create Order process as Failed. Try to adjust the order amount |
4035405Do Not Honor | Account or user status is abnormal | Mark Create Order process as Failed. Retry request with proper parameter or can contact DANA to check the user/account status |
4035415Transaction Not Permitted | Transaction not permitted | Mark Create Order process as Failed. Retry request periodically or consult to DANA |
4045408Invalid Merchant | Merchant does not exist or status abnormal | Mark Create Order process as Failed. Retry request with proper parameter |
4045418Inconsistent Request | Inconsistent request parameter found for the same partner reference number/transaction identifier | Mark Create Order process as Failed. Retry with proper parameter |
4295400Too Many Requests | Maximum transaction limit exceeded | Mark Create Order process as Pending. Retry request periodically by sending same request payload |
5005400General Error | General error | Mark Create Order process as Failed. Retry request periodically |
5005401Internal Server Error | Unknown internal server failure, please retry the process again | Mark Create Order process as Pending. Retry request periodically by sending same request payload |
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 by sending same request payload, if still fails mark Create Order process 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) |
|