Generate QRIS
POST/v1.0/qr/qr-mpm-generate.htm
This API is used to create a QRIS that can be displayed to the user for payment.
API Type
SNAP API
Expected Timeout
8 second
SNAP Service Code
47
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)
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
storeId
string
1 - 64 charactersRequiredUnique shop identifier in merchant side
terminalId
string
1 - 16 charactersIdentifier that is unique per each merchant
partnerReferenceNo
string
1 - 25 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
- For QRIS scenario, use a maximum of 25 characters
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
validityPeriod
string
25 charactersThe time when the QRIS valid, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
additionalInfo
json object
Additional information
additionalInfo.terminalSource
string
1 - 5 charactersAdditional information of terminal source to indicate the source terminal type and how the redirect will happen
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
POST .../v1.0/qr/qr-mpm-generate.htm HTTP/1.2
Content-type: application/json
X-TIMESTAMP: 2020-12-23T08:31:11+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
ORIGIN: www.hostname.com
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
{
"merchantId": "00007100010926",
"subMerchantId": "310928924949487",
"storeId": "abcd",
"terminalId": "",
"partnerReferenceNo": "2020102900000000000001",
"amount": {
"value": "12345678.00",
"currency": "IDR"
},
"feeAmount": {
"value": "12345678.00",
"currency": "IDR"
},
"validityPeriod": "2020-12-23T08:31:11+07:00",
"additionalInfo": {
"terminalSource": "MER",
"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": "APP",
"orderOsType": "IOS",
"merchantAppVersion": "1.0",
"extendInfo": "{\"deviceId\":\"CV19A56370e8a00d54293aab8001e4794\", \"bizScenario\":\"SAMPLE_MERCHANT_AGENT\"}"
}
}
}
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 charactersTransaction identifier on DANA system
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
- For QRIS scenarios, use a maximum of 25 characters.
qrContent
string
1 - 512 charactersConditionalQR String MPM
Conditional Info
Y:= Successfully processed
qrUrl
string
1 - 256 charactersQR URL for download QR image
qrImage
string
1 - 2000 charactersbase64 from image QRIS
redirectUrl
string
1 - 512 charactersRedirect URL to go to DANA page to process the payment
merchantName
string
1 - 64 charactersInformation of merchant name
storeId
string
1 - 64 charactersRequiredUnique shop identifier in merchant side
terminalId
string
1 - 16 charactersIdentifier that is unique per each merchant
additionalInfo
json object
Additional information
Content-type: application/json
X-TIMESTAMP: 2020-01-15T17:01:18+07:00
{
"responseCode": "2004700",
"responseMessage": "Successful",
"referenceNo": "",
"partnerReferenceNo": "2020102900000000000001",
"qrContent": "xxxxxxxxxxxxxxxx",
"qrUrl": "",
"qrImage": "",
"redirectUrl": "",
"merchantName": "",
"storeId": "",
"terminalId": "",
"additionalInfo": {}
}
| Response | Cause | Solution |
|---|---|---|
2004700Successful | Success to be processed | Mark Generate QRIS process as Success |
4004700Bad Request | General request failed error | Mark Generate QRIS process as Failed. Retry request with proper parameter |
4004701Invalid Field Format | Invalid format for certain field | Mark Generate QRIS process as Failed. Retry request with proper parameter |
4004702Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark Generate QRIS process as Failed. Retry request with proper parameter |
4014700Unauthorized. [reason] | General unauthorized error | Mark Generate QRIS process as Failed. Retry request with proper parameter |
4034702Exceeds Transaction Amount Limit | Exceeds transaction amount limit | Mark Generate QRIS process as Failed. Try to adjust the order amount |
4034705Do Not Honor | Account or user status is abnormal | Mark Generate QRIS process as Failed. Retry request with proper parameter or can contact DANA to check the user/account status |
4034715Transaction Not Permitted.[reason] | Transaction not permitted | Mark Generate QRIS process as Failed. Retry request periodically or consult to DANA |
4044708Invalid Merchant | Merchant does not exist or status abnormal | Mark Generate QRIS process as Failed. Retry request with proper parameter |
4044718Inconsistent Request | Inconsistent request parameter found for the same partner reference number/transaction identifier | Mark Generate QRIS process as Failed. Retry request with proper parameter |
4294700Too Many Requests | Maximum transaction limit exceeded | Mark Generate QRIS process as Failed. Retry request periodically |
5004700General Error | General error non retry-able | Mark Generate QRIS process as Failed. Retry request periodically |
5004701Internal Server Error | Unknown internal server failure, please retry the process again | Mark Generate QRIS process 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 Generate QRIS 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) |
|