Brick API Documentation
Virtual Account

Callback Virtual Account

Brick sends this callback to your configured URL when a Virtual Account payment status changes.

Use this callback to update the matching VA transaction, reconcile the paid amount, and trigger fulfillment or balance update workflows in your system.

Callback Handling

  • Match the callback using the Brick payment id, referenceId, and VA account number.
  • Store the payment method details, including bank short code, account number, and display name.
  • Return HTTP 200 only after your system has accepted the callback. Dashboard Test URL / Save & Test also requires a JSON ACK with the exact Brick test referenceId.
  • Make your handler idempotent because the same callback can be retried.
  • Use the VA status endpoint if the callback is delayed or your internal state is unclear.

Key Fields

FieldDescription
idBrick VA payment identifier.
referenceIdYour transaction or order reference.
amountPaid amount.
feeAmountFee amount applied to the payment.
statusLatest VA payment status.
paymentMethod.instructionsBank and VA account details used by the payer.

Sample Callback for VA Payment Status Update:

When a payment status changes, we will send a status update to your callback URL. Below is an example of the payload:

Open VA

JSONCode
{ "data": { "id": "OP_a586fb49972e43ac9d92dc5199d361fc", "type": "virtual_account", "referenceId": "ref1234", "amount": "10000", "feeAmount": "155", "status": "completed", "createdAt": "2026-06-30T16:11:06.000+07:00", "paymentId": "PAY_d2a60413161158d4ea7334957012bec1", "bankShortCode": "bank_name", "accountNo": "16047686796", "displayName": "customer bank holder name", "metadata": { "orderId": "ORD-123", "customerId": "CUS-999" }, "paymentMethod": { "paymentId": "PAY_d2a60413161158d4ea7334957012bec1", "type": "virtual_bank_account", "instructions": { "bankShortCode": "bank_name", "accountNo": "16047686796", "displayName": "customer bank holder name" } }, "attributes": { "referenceId": "ref1234", "amount": "10000", "feeAmount": "155", "status": "completed", "createdAt": "2026-06-30T16:11:06.000+07:00", "paymentMethod": { "paymentId": "PAY_d2a60413161158d4ea7334957012bec1", "type": "virtual_bank_account", "instructions": { "bankShortCode": "bank_name", "accountNo": "16047686796", "displayName": "customer bank holder name" } }, "metadata": { "orderId": "ORD-123", "customerId": "CUS-999" } } } }

Close VA

JSONCode
{ "data": { "id": "CL_a30baa40a98d4c95aca2226cf1d1ef8e", "type": "virtual_account", "referenceId": "ref1234", "description": "Test Initial VA Close", "amount": "10000.0", "feeAmount": "155", "status": "completed", "createdAt": "2026-06-30T16:11:30.000+07:00", "expiredAt": "2026-06-30T17:12:29.000+07:00", "paymentId": "PAY_a051cbf3abed1b1ff6c9d45167fed1d7", "bankShortCode": "bank_name", "accountNo": "16047686796", "displayName": "customer bank holder name", "metadata": { "orderId": "ORD-123", "customerId": "CUS-999" }, "paymentMethod": { "paymentId": "PAY_a051cbf3abed1b1ff6c9d45167fed1d7", "type": "virtual_bank_account", "instructions": { "bankShortCode": "bank_name", "accountNo": "16047686796", "displayName": "customer bank holder name" } }, "attributes": { "referenceId": "ref1234", "description": "Test Initial VA Close", "amount": "10000.0", "feeAmount": "155", "status": "completed", "createdAt": "2026-06-30T16:11:30.000+07:00", "expiredAt": "2026-06-30T17:12:29.000+07:00", "paymentMethod": { "paymentId": "PAY_a051cbf3abed1b1ff6c9d45167fed1d7", "type": "virtual_bank_account", "instructions": { "bankShortCode": "bank_name", "accountNo": "16047686796", "displayName": "customer bank holder name" } }, "metadata": { "orderId": "ORD-123", "customerId": "CUS-999" } } } }
Last modified on