Brick API Documentation
Brick API

Close VA

Server

Generate, monitor, and simulate fixed-amount Close VA payments. Use these endpoints for order or invoice flows that require exact amounts, expiry windows, and Close VA payment status checks.


Status of Close VA

GET
https://sandbox.onebrick.io
/v2/payments/gs/va/close
publicAccessToken (header)

Check the latest payment status for a Close Virtual Account. Use this endpoint to confirm whether a fixed-amount VA has been paid, expired, or is still pending. It is useful for order reconciliation, customer support, and scheduled jobs that need to resolve unpaid or delayed bank transfer payments.

Status of Close VA › query Parameters

vaId
​string

Unique id of virtual account ex: CL_xxxx

Status of Close VA › Responses

200

status
​integer
Default: 0
​object
​object
error
​

Generate Close VA

POST
https://sandbox.onebrick.io
/v2/payments/gs/va/close
publicAccessToken (header)

Generate a Close Virtual Account for a fixed payment amount, customer reference, and expiration window. Use Close VA when each order or invoice should be paid with an exact amount and controlled validity period. The response returns VA details that can be shown to the customer and later reconciled through callback or status inquiry.

Generate Close VA › Request Body

referenceId
​string · required

Unique ID that is being generated by the client to track each VA generation

Default: test-closeVA-1
bankShortCode
​string · required
Default: MANDIRI
amount
​integer · int32 · required

The amount that will be stated in the virtual account

Default: 10000
expiredAt
​string · required

The expiration time of the close VA in Minute

Default: 60
displayName
​string · required

Displayed name of VA

Default: Close VA test
description
​string

The description that will be stated in the virtual account (maximum 255 characters)

Default: test-closeVA-1

Generate Close VA › Responses

200

status
​integer
Default: 0
​object
​object
error
​

Simulate Close VA Payment [PAID/COMPLETED]

POST
https://sandbox.onebrick.io
/v2/payments/gs/va/close/status/{vaIdCL}
publicAccessToken (header)

Simulate a Close VA payment status change in the sandbox environment. Use this endpoint during development to test callbacks, reconciliation logic, paid-state handling, and failure recovery without moving real funds. This endpoint is not intended for production traffic and should only be used with sandbox VA test data.

Simulate Close VA Payment [PAID/COMPLETED] › path Parameters

vaIdCL
​string · required

ID of VA that is generated by Brick in the VA generation API response for simulating "paid" status, ID of Payment that is generated by Brick in the VA callback response for simulating "PAID/COMPLETED" status. Ex: CL_xxx

Simulate Close VA Payment [PAID/COMPLETED] › Request Body

action
​string · required

The status that want to be achieved (PAID / COMPLETED)

Default: PAID/COMPLETED

Simulate Close VA Payment [PAID/COMPLETED] › Responses

200