Skip to main content

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 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
subMerchantId
string
1 - 32 characters
Sub 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 charactersRequired
Unique shop identifier in merchant side
terminalId
string
1 - 16 characters
Identifier that is unique per each merchant
partnerReferenceNo
string
1 - 25 charactersRequired
Unique 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
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
feeAmount
money
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
validityPeriod
string
25 characters
The 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 characters
Additional information of terminal source to indicate the source terminal type and how the redirect will happen
additionalInfo.envInfo
json object
Required
Additional information of environment
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
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
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
orderOsType
string
1 - 128 characters
Order operating system type
merchantAppVersion
string
1 - 128 characters
Merchant App version
extendInfo
string
1 - 4096 characters
Extend 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 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
referenceNo
string
1 - 64 characters
Transaction identifier on DANA system
partnerReferenceNo
string
1 - 64 charactersRequired
Unique 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 charactersConditional
QR String MPM
Conditional Info
Y:= Successfully processed
qrUrl
string
1 - 256 characters
QR URL for download QR image
qrImage
string
1 - 2000 characters
base64 from image QRIS
redirectUrl
string
1 - 512 characters
Redirect URL to go to DANA page to process the payment
merchantName
string
1 - 64 characters
Information of merchant name
storeId
string
1 - 64 charactersRequired
Unique shop identifier in merchant side
terminalId
string
1 - 16 characters
Identifier 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": {}
}

ResponseCauseSolution
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)
  • If the response code prefix are 202 and 5XX, mark Generate QRIS process as Failed
  • If empty field/field does not exist, mark Generate QRIS process as Failed
ask AIAI Assistant
Need help with our documentation?
Start from our frequently asked questions or feel free to ask anything else.

AI generated responses may contain mistakes.