Brick API Documentation
Brick API

Checkout Page

Server

Create and monitor hosted Brick Checkout Page sessions. Checkout Page is useful when you want a shareable payment link or hosted payment page without building every payment method UI yourself.


Create Checkout Page Session

POST
https://sandbox.onebrick.io
/v1/payments/checkout
publicAccessToken (header)

Create a hosted Brick Checkout Page session and receive a checkoutUrl that can be shared with customers. Use Checkout Page when you want Brick to host the payment experience across supported methods instead of building each payment UI yourself. The request defines amount, currency, customer details, expiry, and callback context for later reconciliation.

Create Checkout Page Session › Headers

publicAccessToken
​string · required

Bearer `. check /getting-started/generate-public-access-token-jwt-token

Create Checkout Page Session › Request Body

externalId
​string · required

Merchant-defined unique identifier for the checkout session

currency
​string · required

Transaction currency. Use IDR for current Receive Money flow.

description
​string · required

Checkout label shown to the customer and used for reconciliation.

amount
​number · double

Fixed payment amount. If omitted, the checkout may behave as an open-amount flow.

type
​string

Payment type. The tested collection supports qris and virtual_account.

Create Checkout Page Session › Responses

200

status
​integer
Default: 0
​object
errors
​
hashcode
​string

Checkout Status

GET
https://sandbox.onebrick.io
/v1/payments/checkout/status
publicAccessToken (header)

Retrieve the latest status of a hosted Checkout Page session. Use this endpoint to reconcile payment links, order payments, or customer support cases when you have the checkout session reference. The response confirms whether the session is pending, paid, expired, failed, or otherwise ready for follow-up in your system.

Checkout Status › query Parameters

checkoutId
​string

Brick-generated checkout identifier returned from POST /v1/payments/checkout.

externalId
​string

checkout externalId

Checkout Status › Responses

200

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
type = object
type = object
type = object
Properties for Created:
status
​integer
Default: 0
​object
errors
​
hashcode
​string