Skip to main content

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

Content-Type
string
1 - 127 charactersRequired
Content type, value always application/json
X-TIMESTAMP
string
25 charactersRequired
Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
X-SIGNATURE
string
Required
Signature need to be generated with asymmetricSignature method
ORIGIN
string
Origin domain
X-PARTNER-ID
string
1 - 36 charactersRequired
Unique identifier for partner was generated by DANA, or known as clientId
X-EXTERNAL-ID
string
1 - 36 charactersRequired
Unique messaging reference identifier generated by merchant and should be unique within the same day
CHANNEL-ID
string
1 - 5 charactersRequired
Device identification on which the API services is currently being accessed by the end user (customer)

merchantId
string
1 - 64 charactersRequired
Merchant identifier that is unique per each merchant
amount
money
Required
Amount. Contains two sub-fields:
1. Value: Transaction amount, including the cents
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequired
Value 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 charactersRequired
Currency
additionalInfo
json object
Required
Additional information
additionalInfo.buyer
json object
Required
Additional information of buyer
externalUserType
string
1 - 32 charactersConditional
Type of external user
Conditional Info
Y:= externalUserId is filled
nickname
string
1 - 64 characters
Nickname, user's nick name in DANA's
externalUserId
string
1 - 32 charactersConditional
External user identifier
Conditional Info
Y:= externalUserType is filled
userId
string
1 - 32 characters
DANA's user identifier
additionalInfo.envInfo
json object
Required
Additional information of environment info
sessionId
string
1 - 128 characters
Session identifier
tokenId
string
1 - 128 characters
Token identifier
websiteLanguage
string
1 - 16 characters
Website language
clientIp
string
1 - 32 characters
Client IP address
osType
string
1 - 128 characters
Operating system type
appVersion
string
1 - 128 characters
App version
sdkVersion
string
1 - 128 characters
SDK version
sourcePlatform
string
1 - 32 charactersRequired
Source platform, refer to SourcePlatformEnum
IPG
string
The source platform is independent payment gateway
orderOsType
string
1 - 128 characters
Order operating system type
merchantAppVersion
string
1 - 128 characters
Merchant App version
terminalType
string
1 - 32 charactersRequired
Terminal type, refer to TerminalTypeEnum
APP
string
Mobile Application
WEB
string
Browser Web
WAP
string
Mobile Wap
SYSTEM
string
System Call
orderTerminalType
string
1 - 32 charactersRequired
Order 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 characters
Extend information
additionalInfo.merchantTransType
string
1 - 64 characters
Additional 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 charactersRequired
Content type, value always `application/json`
X-TIMESTAMP
string
25 charactersRequired
Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)

responseCode
string
7 charactersRequired
Refer to response code list
responseMessage
string
1 - 150 charactersRequired
Refer to response code list
paymentInfos
array of json object
Conditional
Define list of payment information that includes payment method and payment option for transaction
Conditional Info
Y:= Successfully processed
payMethod
string
1 - 64 charactersRequired
Payment method that used to payment, refer to PayMethodEnum
payOption
string
1 - 128 charactersRequired
Payment option that available to used to payment, refer to PayOptionEnum
promoInfos
array of json object
Conditional
Additional Information of promotion
Conditional Info
Y:= Promo is available
promoAmount
money
Required
Fee amount. Contains two sub-fields:
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequired
Value 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 charactersRequired
Currency
promoId
string
1 - 64 charactersRequired
Promo identifier
promoType
string
1 - 32 charactersRequired
Type'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"
]
}
]
}

ResponseCauseSolution
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)
  • If the response code prefix are 202 and 5XX, mark Consult Pay process as Failed.
  • If empty field/field does not exist, mark Consult Pay process as Failed.