Qris
Endpoint:
https://api.cronosengine.com/api/qris
Method : POST
Accept QR Code Payments Effortlessly with our API Integration. Simplify the process of accepting QR code-based payments using our API. Streamline your payment operations and provide a secure, convenient, and contactless payment option for your customers. Seamlessly integrate QRIS technology to expand your payment capabilities and stay ahead of the trend.
Request Parameters
| Parameter | Mandatory | Description |
|---|---|---|
| reference | Yes | A unique reference number or identifier for the transaction. all transaction references should be unique. |
| amount | Yes | Amount your user should paid to complete the transaction. |
| expiryMinutes | No | If you want the transaction to last for 1 hour, you would set the value of the expiryMinutes parameter to 60. |
| viewName | Yes | The name or identifier of the receiver for the transaction. |
| additionalInfo.callback | Yes | The callback URL where notifications or updates related to the transaction will be sent. |
Headers
| Key | Value |
|---|---|
| On-Key | Project Key |
| On-Token | Project Token |
| On-Signature | Generated using : hash_hmac('sha512', key + json_encode(body), token) |
| Accept | application/json |
Response Parameters
| Parameter | Description |
|---|---|
| responseCode | The HTTP response code indicating the status of the request. you can see the detailed information in the Error Codes Section. |
| responseMessage | A descriptive message indicating the status of the request. |
| responseData | An object containing the data related to the transaction response. |
| responseData.id | Cronos unique identifier for the transaction. |
| responseData.merchantRef | A unique reference number or identifier for the transaction. all transaction reference should be unique. |
| responseData.status | The current status of the transaction. success, pending, expired, failed |
| responseData.feePayer | The party responsible for paying the transaction fee. customer, merchant |
| responseData.amount | The original amount associated with the transaction. |
| responseData.fee | The fee charged for the transaction. |
| responseData.totalAmount | The total amount (original amount + fee) for the transaction. |
| responseData.expiredDate | The date and time when the transaction will expire. |
| responseData.additionalInfo.callback | The callback URL where notifications or updates related to the transaction will be sent. |
| responseData.qris.content | The code representing the generated barcode for users to scan. |
| responseData.qris.url | The url for redirect to the success page or failed page after the user scan the barcode. |
Example
Request
- cURL
curl --location 'https://api.cronosengine.com/api/qris' \
--header 'On-Key;' \
--header 'On-Token;' \
--header 'On-Signature;' \
--data '{
"reference": "123456",
"amount": 10000,
"expiryMinutes": 30,
"viewName": "Mr. Gentur",
"additionalInfo": {
"callback": "http://your-site-callback.com/notify"
}
}'
Response
{
"responseCode": 200,
"responseMessage": "success",
"responseData": {
"id": "dfd87fe3-85e6-4827-80c2-c444a40168d6",
"merchantRef": "123456",
"status": "pending",
"feePayer": "customer",
"amount": 10000,
"fee": 85,
"totalAmount": 10085,
"expiredDate": "2023-07-16T18:16:44+07:00",
"additionalInfo": {
"callback": "https://google.com"
},
"qris": {
"content": "00020101021226670016COM.NOBUBANK.WWW01189360050300000807830214138357731767890303UMI51440014ID.CO.QRIS.WWW0215ID20232512311480303UMI5204549953033605405395535802ID5908AGHATECH6007BANDUNG610512190625701140609008044544006200S3PU55JKXCR9ES3IGQP0703A010804POSP63041623",
"url": ""
}
}
}