Brick API Documentation
Static QR Code

Static QR Code

Static QR Code is a Brick QRIS payment flow for reusable merchant QR payment acceptance. Use Static QR Code when the same QR code should accept multiple customer payments and customers can enter the payment amount themselves.

Before using Static QR Code, create and verify a QR Code merchant. See Registering for QR Code, then follow the process below.


1. Generating a Static QR Code

Generating a Static QR Code is a one-time process.

Brick documentation image

You can download the Static QR Code from the merchant list page by opening the action menu for the merchant. Static QR Code can be downloaded after the merchant is verified.


2. Callback Notification

Brick notifies you when the user has made the payment through callbacks. QR Code callback setup is handled with the Brick team or in the Brick Dashboard, depending on your account setup.

The callback will be received once payment is made by the end user.

JSONCode
{ "data": { "id": "QR_XXXX", "referenceId": "XXXX", "amount": 32000, "status": "PAID", "createdAt": "2024-03-13T14:12:25.000+07:00", "paidAt": "2024-03-13T14:12:26.212+07:00", "qrisType": "STATIC", "merchant": "merchant_name", "merchantNmid": "merchant_Nmid" } }

📘 Setting up your QR Code callback URL

For now setting up callback QR Code need to be done manually. You can contact Brick team to setup your QR Code callback URL.

3. Status Check for QR Codes

Use the status endpoint to retrieve the latest Static QR Code status by passing the transaction referenceId.

Code
curl --location 'https://sandbox.onebrick.io/stg/v2/payments/gs/qris/static/{{referenceId}}' \ --header 'publicAccessToken: Bearer {{publicAccessToken}}'

You will get the response like below

JSONCode
{ "status": 200, "data": { "referenceId": "XXXX", "id": "QR_XXXX", "amount": 32000, "status": "completed", "qrData": "", "paidAt": "2024-03-05T01:51:01.000+07:00", "type": "STATIC", "merchant": "merchant_name", "merchantNmid": "merchant_Nmid" }, "metaData": { "source": "API", "entity": "Payment" }, "error": null }

QR Code status available are processing, paid, expired, and cancelled.


4. Static QR Code Get Merchant Details

Use this API to retrieve merchant details with the required token.

Code
curl --request GET \ --url https://sandbox.onebrick.io/v2/payments/gs/qris/merchant/id \ --header 'accept: application/json' \ --header 'publicAccessToken: Bearer {{publicAccessToken}}'

You will get the response like below

JSONCode
{ "status": 200, "data": { "id": 25, "name": "Brick Qris Merchant", "email": "merchant@mail.com", "ownerName": "Brick", "address": "JL Tulodong", "nmid": "ID2020088800402", "qrisImageUrl": "{{url_qr_code_merchant}}", "status": "VERIFIED" }, "metaData": { "source": "API", "entity": "Payment" }, "error": null }

5. Static QR Code Get Merchant List

Use this API to retrieve the merchant list with the required token.

Code
curl --request GET \ --url https://sandbox.onebrick.io/v2/payments/gs/qris/merchant/bulk \ --header 'accept: application/json' \ --header 'publicAccessToken: Bearer {{publicAccessToken}}'

You will get the response like below

JSONCode
{ "status": 200, "data": [ { "id": 25, "name": "Brick Qris Merchant", "email": "merchant@mail.com", "ownerName": "Brick", "address": "JL Tulodong", "nmid": "ID2020088800402", "qrisImageUrl": "{{url_qr_code_merchant}}", "status": "VERIFIED" } ], "metaData": { "source": "API", "entity": "Payment" }, "error": null
Last modified on