post
https://sandbox.onebrick.io/v1/payments/checkout
Creates a hosted checkout session and returns a unique checkoutUrl.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string | Yes | Merchant-defined unique identifier for the checkout session. |
currency | string | Yes | Transaction currency. Use IDR for current acceptance flow. |
description | string | Yes | Checkout label shown to the customer and used for reconciliation. |
amount | number | No | Fixed payment amount. If omitted, the checkout may behave as an open-amount flow. |
type | string | No | Payment type. The tested collection supports qris and virtual_account. |
Response Fields
| Field | Type | Description |
|---|---|---|
data.id | string | Brick-generated checkout identifier. |
data.externalId | string | Your original merchant reference. |
data.status | string | Initial checkout status, such as CREATED. |
data.checkoutUrl | string | Hosted page URL to present to the customer. |
data.currency | string | Currency code. |
data.amount | number or null | Fixed amount if configured. |
data.type | string | Payment type when explicitly set. |
data.createdAt | string | ISO-8601 session creation timestamp. |
data.description | string | Session description. |
