Brick API Documentation
Brick
Brick API

QR Code SNAP

Server

Create and query QRIS payments using SNAP-compatible endpoints and headers. Use these endpoints when your integration follows Indonesian SNAP standards for access tokens, signatures, timestamps, and QR MPM flows.


Get Access Token (SNAP)

POST
https://sandbox.onebrick.io
/v2/payments/acceptance/1.0/access-token/b2b

Generate the SNAP B2B access token required for QR Code SNAP endpoints. Send the required SNAP headers, signature, timestamp, and client key according to your Brick SNAP credential setup. Use the returned token when creating QR MPM payments or querying QR payment status through SNAP-compatible flows.

Get Access Token (SNAP) › Headers

Content-Type
​string · required

String represents indicate the media type of the resource

Default: application/json
X-CLIENT-KEY
​string · required

Client’s client_id

Default: YOUR_CLIENT_ID
X-TIMESTAMP
​string · date · required

Client's current local time in yyyy-MM- ddTHH:mm:ss.SSSTZD format

Default: 2024-11-11T18:44:33+07:00
X-SIGNATURE
​string · required

Non-Repudiation & Integrity check signature for the requesting

Default: YOUR_SIGNATURE

Get Access Token (SNAP) › Request Body

grant_type
​string · required

Must be "client_credentials"

Default: client_credentials

Get Access Token (SNAP) › Responses

200

responseCode
​string
responseMessage
​string
accessToken
​string
tokenType
​string
expiresIn
​string

Generate Dynamic QR Code (SNAP)

POST
https://sandbox.onebrick.io
/v2/payments/acceptance/1.0/qr/qr-mpm-generate

Create a dynamic QRIS MPM payment using SNAP-compatible request headers and payload structure. Use this endpoint when your integration follows Indonesian SNAP standards for QR payment creation, including signature, timestamp, partner reference, and merchant information. The response returns QR content and identifiers that should be reconciled through SNAP status inquiry or callbacks.

Generate Dynamic QR Code (SNAP) › Headers

Content-Type
​string · required

String represents indicate the media type of the resource

Default: application/json
X-CLIENT-KEY
​string · required

Client’s client_id

Default: YOUR_CLIENT_ID
X-TIMESTAMP
​string · date · required

Client's current local time in yyyy-MM- ddTHH:mm:ss.SSSTZD format

Default: 2024-11-15T18:44:33+07:00
Authorization
​string · required

One time access-token generated using the auth token API

Default: Bearer YOUR_ACCESS_TOKEN
X-SIGNATURE
​string · required

Non-Repudiation & Integrity check signature for the requesting

Default: YOUR_SIGNATURE
X-PARTNER-ID
​string · required

Brick's client ID

Default: YOUR_PARTNER_ID
X-EXTERNAL-ID
​string · required

Unique external identifier for the API request that can be found on Brick Dashboard Credentials

Default: external-id-unique-per-request
CHANNEL-ID
​string · required

Brick's channel id

Default: A0

Generate Dynamic QR Code (SNAP) › Request Body

partnerReferenceNo
​string · required

Unique reference number provided by the partner to identify the transaction. Maximum length of 25 characters)

Default: 2025111500000000000001
validityPeriod
​string · required

Minimum 600 seconds (10 minutes), maximum 86,400 seconds (24 hours) from the creation time. If not set, the default value will be 86,400 seconds (24 hours)

Default: 600
​object

Generate Dynamic QR Code (SNAP) › Responses

200

responseCode
​string
responseMessage
​string
referenceNo
​string
partnerReferenceNo
​string
qrContent
​string

Status for Dynamic QR Code

POST
https://sandbox.onebrick.io
/v2/payments/acceptance/1.0/qr/qr-mpm-query

Query the latest payment status for a dynamic QRIS SNAP transaction. Use this endpoint when your system needs to confirm a QR MPM payment state using SNAP headers, timestamps, signatures, and original partner reference data. The response helps reconcile pending, successful, failed, or expired QR transactions in SNAP-based integrations.

Status for Dynamic QR Code › Headers

Content-Type
​string · required

String represents indicate the media type of the resource

Default: application/json
X-CLIENT-KEY
​string · required

Client’s client_id

Default: YOUR_CLIENT_ID
X-TIMESTAMP
​string · date · required

Client's current local time in yyyy-MM- ddTHH:mm:ss.SSSTZD format

Default: 2024-11-15T18:44:33+07:00
Authorization
​string · required

One time access-token generated using the auth token API

Default: Bearer YOUR_ACCESS_TOKEN
X-SIGNATURE
​string · required

Non-Repudiation & Integrity check signature for the requesting

Default: YOUR_SIGNATURE
X-PARTNER-ID
​string · required

Brick's client ID

Default: YOUR_PARTNER_ID
X-EXTERNAL-ID
​string · required

Unique external identifier for the API request that can be found on Brick Dashboard Credentials

Default: external-id-unique-per-request
CHANNEL-ID
​string · required

Brick's channel id

Default: A0

Status for Dynamic QR Code › Request Body

originalReferenceNo
​string

Unique identifier for the original transaction. e.g. QR_75ae1b56c40449ecbc42010e3d2589cc

Default: QR_75ae1b56c40449ecbc42010e3d2589cc
originalPartnerReferenceNo
​string

Unique identifier for the original transaction assigned by the partner. e.g. 20241115000000189723

Default: 20241115000000189723
serviceCode
​string

Must be set to '51'

Default: 51

Status for Dynamic QR Code › Responses

200

responseCode
​string
responseMessage
​string
originalReferenceNo
​string
originalPartnerReferenceNo
​string
serviceCode
​string
latestTransactionStatus
​string
transactionStatusDesc
​string
​object