CPM Payment
POST/v1.0/qr/qr-cpm-payment.htm
This API is used to submit a scanned user QR code to process the payment and receive the transaction result.
API Type
SNAP API
Expected Timeout
8 second
SNAP Service Code
60
Accept
application/json
Content Type
application/json
Content-type
string
1 - 127 charactersRequiredContent type, value always
application/jsonX-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)
partnerReferenceNo
string
1 - 64 charactersRequiredUnique transaction identifier in partner system for each transaction.
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
Note
- When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
- For QRIS scenarios, use a maximum of 25 characters.
qrContent
string
1 - 512 charactersRequiredQR String CPM
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
feeAmount
money
Fee 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
merchantId
string
1 - 64 charactersRequiredMerchant identifier that is unique per each merchant
subMerchantId
string
1 - 32 charactersSub merchant identifier, known as externalDivisionId must be registered in the DANA system before use. To register a new externalDivisionId, use the Create Division API
title
string
1 - 256 charactersRequiredBrief description
expiryTime
string
25 charactersRequiredExpired time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
items
array of json object
Purchased goods/service information
unit
string
1 - 64 charactersRequiredUnit of item
category
string
1 - 64 charactersRequiredCategory of item
price
money
RequiredPrice of item. 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
goodsId
string
1 - 64 charactersRequiredIdentifier of goods
quantity
string
1 - 16 charactersRequiredQuantity of item
externalStoreId
string
1 - 64 charactersRequiredStore identifier to indicate to which store this payment belongs to, known as externalShopId must be registered in the DANA system before use. To register a new externalShopId, use the Create Shop API
merchantName
string
1 - 64 charactersInformation of merchant name
merchantLocation
string
1 - 64 charactersInformation of merchant location
acquirerName
string
1 - 64 charactersInformation of acquirer name
terminalId
string
1 - 16 charactersIdentifier that is unique per each merchant
scannerInfo
json object
RequiredInformation of scanner
deviceId
string
1 - 64 charactersRequiredThe unique device identifier
deviceVersion
string
1 - 128 charactersThe device firmware version, updatable
deviceModel
string
1 - 128 charactersThe device model, not updatable
deviceIp
string
1 - 64 charactersRequiredThe public IP address when device sends out the request
productIndicator
string
1 - 4 charactersConditionalThe product indicator is used to identify the scanning method. The value is
N001Conditional Info
Y:= Only use for QRIS NFC scenario
additionalInfo
json object
Additional information
additionalInfo.order
json object
Additional information of order
merchantTransType
string
1 - 64 charactersMerchant transaction type
orderMemo
string
1 - 64 charactersOrder memo
createdTime
string
25 charactersCreated time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
expiryTime
string
25 charactersExpired time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
buyer
json object
Buyer information
userId
string
1 - 32 charactersDANA’s user identifier
externalUserId
string
1 - 32 charactersConditionalExternal user identifier
Conditional Info
Y:= externalUserType is filled
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
shippingInfo
array of json object
Shipping information
chargeAmount
money
Charge 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
lastName
string
1 - 64 charactersRequiredLast name
trackingNo
string
1 - 64 charactersNumber of tracking
countryName
string
1 - 64 charactersRequiredName of country
merchantShippingId
string
1 - 64 charactersRequiredMerchant shipping identifier
cityName
string
1 - 64 charactersRequiredName of city
address1
string
1 - 256 charactersRequiredInformation of address 1
address2
string
1 - 256 charactersInformation of address 2
phoneNo
string
1 - 32 charactersPhone number
areaName
string
1 - 64 charactersName of area
email
string
1 - 128 charactersEmail
zipCode
string
1 - 32 charactersRequiredZip code
stateName
string
1 - 64 charactersRequiredName of state
faxNo
string
1 - 32 charactersFax number
carrier
string
1 - 64 charactersInformation of carrier
firstName
string
1 - 64 charactersRequiredFirst name
mobileNo
string
1 - 32 charactersMobile number
seller
json object
Seller information
userId
string
1 - 32 charactersDANA’s user identifier
externalUserId
string
1 - 32 charactersConditionalExternal user identifier
Conditional Info
Y:= externalUserType is filled
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
goods
array of json object
Goods information
unit
string
1 - 64 charactersGoods unit
category
string
1 - 64 charactersRequiredGoods category
price
money
RequiredGoods price. 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
merchantShippingId
string
1 - 64 charactersShipment identifier provided by merchant
merchantGoodsId
string
1 - 64 charactersRequiredGoods identifier provided by merchant
description
string
1 - 1024 charactersRequiredGoods description
snapshotUrl
string
1 - 512 charactersThe URL of good’s snapshot web page
quantity
string
1 - 16 charactersRequiredCount of items
extendInfo
string
1 - 4096 charactersExtend information
extendInfo
string
1 - 4096 charactersExtend information
additionalInfo.qrContentType
string
1 - 32 charactersRequiredAdditional information of QR content type. The values is
BAR_CODE or WAVE_CODEadditionalInfo.mcc
string
1 - 64 charactersRequiredAdditional information of merchant category code. This parameter is used to identify the type of business in which a merchant is engaged. Refer to Details of Merchant Category Code
additionalInfo.productCode
string
1 - 32 charactersRequiredAdditional information of product code
additionalInfo.notifyUrl
string
1 - 256 charactersAdditional information of notify URL
additionalInfo.settleBizDate
string
10 charactersAdditional information of settle biz date which contain business date of the transaction for settlement, in format YYYY-MM-DD.
The earliest value is T+1 and the latest value is T+30 where T is the date of transaction. Invalid value will be ignored and transaction will be settled according to agreed default configuration
The earliest value is T+1 and the latest value is T+30 where T is the date of transaction. Invalid value will be ignored and transaction will be settled according to agreed default configuration
additionalInfo.envInfo
json object
RequiredAdditional information of environment
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
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
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
orderOsType
string
1 - 128 charactersOrder operating system type
merchantAppVersion
string
1 - 128 charactersMerchant App version
extendInfo
string
1 - 4096 charactersExtend information
additionalInfo.extendInfo
string
1 - 4096 charactersAdditional information of extend
POST .../v1.0/qr/qr-cpm-payment.htm HTTP/1.2
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
{
"partnerReferenceNo": "2020102900000000000001",
"qrContent": "xxxxxxxxxxxxxxxx",
"amount": {
"value": "12345678.00",
"currency": "IDR"
},
"feeAmount": {
"value": "12345678.00",
"currency": "IDR"
},
"merchantId": "00007100010926",
"subMerchantId": "310928924949487",
"title": "example",
"expiryTime": "2001-07-04T12:08:56+07:00",
"items": [
{
"unit": "Piece",
"category": "FOOD",
"price": {
"value": "12345678.00",
"currency": "IDR"
},
"goodsId": "12345",
"quantity": "6"
}
],
"externalStoreId": "abcd",
"merchantName": "Merchant01",
"merchantLocation": "Jakarta Indonesia",
"acquirerName": "DANA",
"terminalId": "6476378",
"scannerInfo": {
"deviceId": "46252",
"deviceVersion": "v.1.0",
"deviceModel": "Scanner",
"deviceIp": "172.24.281.24",
"productIndicator":"N001"
},
"additionalInfo": {
"order": {
"merchantTransType": "type",
"orderMemo": "Memo",
"createdTime": "2001-07-04T12:08:56+07:00",
"buyer": {
"externalUserType": "",
"nickname": "mike",
"externalUserId": "",
"userId": "216610000000010034501"
},
"shippingInfo": [
{
"chargeAmount": {
"value": "20.00",
"currency": "IDR"
},
"lastName": "Li",
"trackingNo": "646431431322332133",
"countryName": "JP",
"merchantShippingId": "564314314574327545",
"cityName": "Atlanta",
"address1": "137 W San Bernardino",
"address2": "4114 Sepulveda",
"phoneNo": "2423-2322342",
"areaName": "Rd",
"email": "abc@gmail.com",
"zipCode": "310001",
"stateName": "GA",
"faxNo": "2123-11113",
"carrier": "Federal Express",
"firstName": "Jim",
"mobileNo": "13765443223"
}
],
"seller": {
"externalUserType": "",
"nickname": "mike",
"externalUserId": "",
"userId": "216610000000010034501"
},
"goods": [
{
"unit": "Kg",
"category": "travelling/subway",
"price": {
"value": "10.00",
"currency": "IDR"
},
"merchantShippingId": "564314314574327545",
"merchantGoodsId": "24525635625623",
"description": "Women Summer Dress New White Lace Sleeveless Cute Casual Summer Dresses Vestidos roupas femininas WQW1045",
"snapshotUrl": "[http://snap.url.com]",
"quantity": "",
"extendInfo": ""
}
],
"extendInfo": "{\"key\":\"value\"}"
},
"qrContentType": "BAR_CODE",
"mcc": "5732",
"productCode": "51051000100000000040",
"notifyUrl": "http://api.test.dana.id/atinterface/receive_notify.htm",
"settleBizDate": "2018-07-04",
"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",
"terminalType": "SYSTEM",
"orderTerminalType": "WEB",
"orderOsType": "IOS",
"merchantAppVersion": "1.0",
"extendInfo": "{\"deviceId\":\"CV19A56370e8a00d54293aab8001e4794\", \"bizScenario\":\"SAMPLE_MERCHANT_AGENT\"}"
},
"extendInfo": "{\"key\":\"value\"}"
}
}
Content-type
string
1 - 127 charactersRequiredContent type, value always
application/jsonX-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
referenceNo
string
1 - 64 charactersConditionalTransaction identifier on DANA system
Conditional Info
Y:= Successfully processed
partnerReferenceNo
string
1 - 64 charactersRequiredUnique transaction identifier in partner system for each transaction.
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
Note
- When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
- For QRIS scenarios, use a maximum of 25 characters.
transactionDate
string
25 charactersConditionalTransaction date, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
Conditional Info
Y:= Successfully processed
additionalInfo
json object
Additional information
additionalInfo.amount
money
RequiredAdditional information of amount. 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.paidTime
string
25 charactersConditionalAdditional information of paid time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
Conditional Info
Y:= Successfully processed
Content-Type: application/json
X-TIMESTAMP: 2020-12-23T09:10:11+07:00
{
"responseCode": "2006000",
"responseMessage": "Successful",
"referenceNo": "2020102977770000000009",
"partnerReferenceNo": "2020102900000000000001",
"transactionDate": "2020-12-23T07:54:11+07:00",
"additionalInfo": {
"amount": {
"value": "12345678.00",
"currency": "IDR"
},
"paidTime": "2020-12-23T07:54:11+07:00"
}
}
| Response | Cause | Solution |
|---|---|---|
2006000Successful | Success to be processed | Mark CPM Payment process as Success |
2026000Request In Progress | Transaction is on process | Mark CPM Payment process as Pending. Retry request periodically by sending same request payload |
4006000Bad Request | General request failed error | Mark CPM Payment process as Failed. Retry request with proper parameter |
4006001Invalid Field Format | Invalid format for certain field | Mark CPM Payment process as Failed. Retry request with proper parameter |
4006002Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark CPM Payment process as Failed. Retry request with proper parameter |
4016000Unauthorized. [reason] | General unauthorized error | Mark CPM Payment process as Failed. Retry request with proper parameter |
4036002Exceeds Transaction Amount Limit | Exceeds transaction amount limit | Mark CPM Payment process as Failed. Try to adjust the order amount |
4036003Suspected Fraud | Suspected fraud | Mark CPM Payment process as Failed. Retry request periodically or consult to DANA |
4036005Do Not Honor | Account or user status is abnormal | Mark CPM Payment process as Failed. Retry request with proper parameter or can contact DANA to check the user/account status |
4036006Feature Not Allowed At This Time. [reason] | Cut off In Progress | Mark CPM Payment process as Failed. Retry request periodically |
4036014Insufficient Funds | Insufficient funds | Mark CPM Payment process as Failed. Check source of funds availability |
4036015Transaction Not Permitted.[reason] | Transaction not permitted | Mark CPM Payment process as Failed. Retry request periodically or consult to DANA |
4046000Invalid Transaction Status | Invalid transaction status | Mark CPM Payment process as Failed. Create an order with new partnerRefereneNo |
4046003Bank Not Supported By Switch | Bank not supported by switch | Mark CPM Payment process as Failed. Retry request periodically or consult to DANA |
4046006Need To Request OTP | Need to request OTP | Mark CPM Payment process as Pending. Retry request periodically by sending same request payload |
4046008Invalid Merchant | Merchant does not exist or status abnormal | Mark CPM Payment process as Failed. Retry request with proper parameter |
4046018Inconsistent Request | Inconsistent request parameter found for the same partner reference number/transaction identifier | Mark CPM Payment process as Failed. Retry request with proper parameter |
4296000Too Many Requests | Maximum transaction limit exceeded | Mark CPM Payment process as Pending. Retry request periodically by sending same request payload |
5006000General Error | General error non retry-able | Mark CPM Payment process as Failed. Retry request periodically |
5006001Internal Server Error | Unknown internal server failure, please retry the process again | Mark CPM Payment 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 CPM Payment 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) |
|