Firstly, you have to ensure that you already activated QR Code on Configuration Tab > Payment Methods > QR Codes.
You can check QR Code Activation here:How to Activate QR Code as Payment Method
Below are the steps on how to create QR Code via API in live mode:
1. Create secret API Key on your dashboard in live mode
2. Set your callback URL in Dashboard - Settings - Callbacks in QR code paid & refunded and make sure upon "test and save" it returns 2XX
3. Create QR Code API using endpoint:
POST https://api.xendit.co/qr_codes
4. Input you secret API key in Authorization
5. In Headers please input below on this section:
KEY: api-version
VALUE:2022-07-31
6. In Body request, you can use these parameters as sample (these are the required parameter):
{
"reference_id": "testing_id123400",
"type": "DYNAMIC",
"currency": "IDR",
"amount": 1000
}
7. Click send and afterwards you will get this response and the transaction will pop up in Transaction Tab:
{
"reference_id": "testing_id123400",
"type": "DYNAMIC",
"currency": "IDR",
"channel_code": "ID_DANA",
"amount": 1000,
"expires_at": "2022-11-24T12:38:05.027203Z",
"description": "",
"metadata": null,
"business_id": "603f1c4172bbe840979fd408",
"created": "2022-11-22T12:38:05.30965Z",
"updated": "2022-11-22T12:38:05.30965Z",
"qr_string": "00020101021226570011ID.DANA.WWW011893600915015706056102091570605610303UME51440014ID.CO.QRIS.WWW0215ID20210807329890303UME520489315303360540410005802ID5906XENDIT6015Kota Jakarta Se61051219062720115QjZudXMDN7Zn5eR60490011ID.DANA.WWW0425MER202107140077450960864105011630463CC",
"status": "ACTIVE",
"id": "qr_b649ad60-ffec-474c-ae9e-f0b48b618768"
}
And it is done! You can also get your QR Code from Dashboard - QR Code Tab to download it:
For API reference please click here
For video of the QR Code creation steps above in live mode (via Postman), check the video below: