Consult Pay
POST/v1.0/payment-gateway/consult-pay.htm
This API is used to consult the list of payment methods or payment channels that user has and used in certain transactions or orders
API Type
SNAP API
Expected Timeout
8 second
SNAP Service Code
00
Accept
application/json
Content Type
application/json
This API is used for the following solution:
DANA acts as a payment gateway by providing information about available payment methods, such as virtual accounts or QRIS, and processes transactions for merchants.
Content-Type
string
1 - 127 charactersRequiredContent type, value always
application/json
X-TIMESTAMP
string
25 charactersRequiredTransaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
X-SIGNATURE
string
RequiredSignature need to be generated with
asymmetricSignature
methodORIGIN
string
Origin domain
X-PARTNER-ID
string
1 - 36 charactersRequiredUnique identifier for partner was generated by DANA, or known as clientId
X-EXTERNAL-ID
string
1 - 36 charactersRequiredUnique messaging reference identifier generated by merchant and should be unique within the same day
CHANNEL-ID
string
1 - 5 charactersRequiredDevice identification on which the API services is currently being accessed by the end user (customer)
merchantId
string
1 - 64 charactersRequiredMerchant identifier that is unique per each merchant
amount
money
RequiredAmount. Contains two sub-fields:
1. Value: Transaction 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
value
string
1 - 19 charactersRequiredValue of amount. Following ISO-4217, for IDR the value includes 2 decimal digits separated with point e.g. ,IDR 10.000,- will be placed with 10000.00
currency
string
1 - 3 charactersRequiredCurrency
additionalInfo
json object
RequiredAdditional information
additionalInfo.buyer
json object
RequiredAdditional information of buyer
externalUserType
string
1 - 32 charactersConditionalType of external user
Conditional Info
Y:= externalUserId is filled
nickname
string
1 - 64 charactersNickname, user's nick name in DANA's
externalUserId
string
1 - 32 charactersConditionalExternal user identifier
Conditional Info
Y:= externalUserType is filled
userId
string
1 - 32 charactersDANA's user identifier
additionalInfo.envInfo
json object
RequiredAdditional information of environment info
sessionId
string
1 - 128 charactersSession identifier
tokenId
string
1 - 128 charactersToken identifier
websiteLanguage
string
1 - 16 charactersWebsite language
clientIp
string
1 - 32 charactersClient IP address
osType
string
1 - 128 charactersOperating system type
appVersion
string
1 - 128 charactersApp version
sdkVersion
string
1 - 128 charactersSDK version
sourcePlatform
string
1 - 32 charactersRequiredSource platform, refer to SourcePlatformEnum
IPG
string
The source platform is independent payment gateway
orderOsType
string
1 - 128 charactersOrder operating system type
merchantAppVersion
string
1 - 128 charactersMerchant App version
terminalType
string
1 - 32 charactersRequiredTerminal type, refer to TerminalTypeEnum
APP
string
Mobile Application
WEB
string
Browser Web
WAP
string
Mobile Wap
SYSTEM
string
System Call
orderTerminalType
string
1 - 32 charactersRequiredOrder terminal type, refer to OrderTerminalTypeEnum
APP
string
Mobile Application
WEB
string
Browser Web
WAP
string
Mobile Wap
SYSTEM
string
System Call
extendInfo
string
1 - 4096 charactersExtend information
additionalInfo.merchantTransType
string
1 - 64 charactersAdditional information of merchant transaction type
POST .../v1.0/payment-gateway/consult-pay.htm
Content-Type: application/json
X-TIMESTAMP: 2020-12-23T09:10:11+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
ORIGIN: www.hostname.com
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
{
"merchantId": "23489182303312",
"amount": {
"value": "12345678.00",
"currency": "IDR"
},
"additionalInfo":{
"buyer": {
"externalUserType": "",
"nickname": "",
"externalUserId": "8392183912832913821",
"userId": ""
},
"envInfo":{
"sessionId": "8EU6mLl5mUpUBgyRFT4v7DjfQ3fcauthcenter",
"tokenId": "a8d359d6-ca3d-4048-9295-bbea5f6715a6",
"websiteLanguage": "en_US",
"clientIp": "10.15.8.189",
"osType": "Windows.PC",
"appVersion": "1.0",
"sdkVersion": "1.0",
"sourcePlatform": "IPG",
"orderOsType": "IOS",
"merchantAppVersion": "1.0",
"terminalType": "SYSTEM",
"orderTerminalType": "WEB",
"extendInfo": "{\"deviceId\":\"CV19A56370e8a00d54293aab8001e4794\"}"
},
"merchantTransType": "SPECIAL_MOVIE"
}
}
Content-Type
string
1 - 127 charactersRequiredContent type, value always `application/json`
X-TIMESTAMP
string
25 charactersRequiredTransaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
responseCode
string
7 charactersRequiredRefer to response code list
responseMessage
string
1 - 150 charactersRequiredRefer to response code list
paymentInfos
array of json object
ConditionalDefine list of payment information that includes payment method and payment option for transaction
Conditional Info
Y:= Successfully processed
payMethod
string
1 - 64 charactersRequiredPayment method that used to payment, refer to PayMethodEnum
payOption
string
1 - 128 charactersRequiredPayment option that available to used to payment, refer to PayOptionEnum
promoInfos
array of json object
ConditionalAdditional Information of promotion
Conditional Info
Y:= Promo is available
promoAmount
money
RequiredFee amount. Contains two sub-fields:
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
value
string
1 - 19 charactersRequiredValue of amount. Following ISO-4217, for IDR the value includes 2 decimal digits separated with point e.g. ,IDR 10.000,- will be placed with 10000.00
currency
string
1 - 3 charactersRequiredCurrency
promoId
string
1 - 64 charactersRequiredPromo identifier
promoType
string
1 - 32 charactersRequiredType's of promo, value always DIRECT_DISCOUNT
Content-Type: application/json
X-TIMESTAMP: 2024-12-23T09:10:11+07:00
{
"responseCode": "2000000",
"responseMessage": "Successful",
"paymentInfos": [
{
"payMethod":"NETWORK_PAY",
"payOption": "NETWORK_PAY_PG_OVO",
"promoInfos":[
"promoAmount":{
"value": "12345678.00",
"currency": "IDR"
},
"promoType":"DIRECT_DISCOUNT",
"promoId":"prm_382173281372813"
]
},
{
"payMethod":"NETWORK_PAY",
"payOption": "NETWORK_PAY_PG_GOPAY",
"promoInfos":[
"promoAmount":{
"value": "12345678.00",
"currency": "IDR"
},
"promoType":"DIRECT_DISCOUNT",
"promoId":"prm_382173281372813"
]
},
{
"payMethod":"VIRTUAL_ACCOUNT",
"payOption": "VIRTUAL_ACCOUNT_BCA",
"promoInfos":[
"promoAmount":{
"value": "12345678.00",
"currency": "IDR"
},
"promoType":"DIRECT_DISCOUNT",
"promoId":"prm_382173281372813"
]
}
]
}
Response | Cause | Solution |
---|---|---|
2000000Successful | Success to be processed | Mark Consult Pay process as Success |
4000000Bad Request | General request failed error | Mark Consult Pay process as Failed. Retry request with proper parameter |
4000001Invalid Field Format | Invalid format for certain field | Mark Consult Pay process as Failed. Retry request with proper parameter |
4000002Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark Consult Pay process as Failed. Retry request with proper parameter |
4010000Unauthorized. Invalid Signature | Signature is invalid | Mark Consult Pay process as Failed. Retry request with proper parameter |
4030005Do Not Honor | Account or user status is abnormal | Mark Consult Pay process as Failed. Retry request with proper parameter or can contact DANA to check the user/account status |
4030015Transaction Not Permitted | Transaction not permitted | Mark Consult Pay process as Failed. Retry request periodically or consult to DANA |
4040008Invalid Merchant | Merchant does not exist or status abnormal | Mark Consult Pay process as Failed. Retry request with proper parameter |
4290000Too Many Requests | Maximum transaction limit exceeded | Mark Consult Pay process as Failed. Retry request periodically by sending same request payload |
5000000General Error | General error | Mark Consult Pay process as Failed. 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 by sending same request payload, if still fails mark Consult Pay process as Failed |
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) |
|