Virtual Account APIs

There are two methods that available related to Virtual Account generation:

  1. Open VA
  2. Close VA

Minimum Amount

Maximum Amount

IDR 10.000

IDR 100.000.000

The VA generation is available for these banks:

Bank Name

Bank Shortcode

Open VA

Close VA

Bank Rakyat Indonesia

BRI

Available

Available

Bank Mandiri

MANDIRI

Available

Available

Bank Sahabat Sampoerna

SAHABAT_SAMPOERNA

Available

Available

Bank CIMB Niaga

CIMB_NIAGA

Available

Bank Danamon

DANAMON

Available

Bank Permata

PERMATA

Available

Bank Hana

HANA

Available

There are two methods that available related to Virtual Account generation:

A. Open VA

Use this method when a payment method with no pre-defined amount is needed to be linked for your end-user. Brick will send you callback notifications to your designated callback URL when we detect payments made through the open VA.

These are typically used when you want to create a specific payment channel that will be tightened to each of your users (example: as a top-up channel to your users' e-wallet or balance).

1. Generating an Open VA

To start generating an open VA, you can use Open VA API with these details:

{
    "bankShortCode": "BRI",
    "referenceId": "test_VA1",
    "displayName": "Open VA 1",
    "suffixNo": "88899902"
}

2. You will get the responses like below when successful:

{
    "status": 200,
    "message": "OK",
    "data": {
        "id": "OP_d8ed71ed64d64b2fa220ab5d86f2fe35",
        "type": "virtual_bank_account",
        "attributes": {
            "referenceId": "test_VA1",
            "instructions": {
                "bankShortCode": "BRI",
                "accountNo": "130432138889902",
                "displayName": "IKN-Open VA 1"
            }
        }
    }
}

3. Payment Callback Notification

Brick notifies you when the user has already made the payment via callbacks (you will be able to set up the callback in the Brick Dashboard )

The callback will be sent twice:

  1. When the payment is made (status: "paid")
  2. When the fund settlement is done in each Bank (status: "completed")
{
    "data":
    {
        "id": "OP_4a1bd45a9d724d49b834f72c2de20662",
        "type": "payment",
        "attributes":
        {
            "referenceId": "test_VA1",
            "amount": "100000.0",
            "status": "paid",
            "createdAt": "2021-12-01T15:43:56.000+07:00",
            "paymentMethod":
            {
                "paymentId": "PAY_5b89f0834a5646a790ee1829599a0b16",
                "type": "virtual_bank_account",
                "instructions":
                {
                   "bankShortCode": "BRI",
                   "accountNo": "130432138889902",
                   "displayName": "IKN-Open VA 1"
                }
            }
        }
    }
}
{
    "data":
    {
        "id": "OP_4a1bd45a9d724d49b834f72c2de20662",
        "type": "payment",
        "attributes":
        {
            "referenceId": "test_VA1",
            "amount": "100000.0",
            "status": "completed",
            "createdAt": "2021-12-01T15:43:56.000+07:00",
            "paymentMethod":
            {
                "paymentId": "PAY_5b89f0834a5646a790ee1829599a0b16",
                "type": "virtual_bank_account",
                "instructions":
                {
                   "bankShortCode": "BCA",
                   "accountNo": "130432138889902",
                   "displayName": "IKN-Open VA 1"
                }
            }
        }
    }
}

B. Close VA

Use this method when a static payment method with a pre-defined amount is needed to be linked for your end-user. Brick will send you callback notifications to your designated callback URL when we detect payments made through the close VA.

These are typically used when you want to create a specific payment channel that will be tightened to each of the transactions/bills of your users where the payment window is limited.

1. Generating a Close VA

To start generating a close VA, you can use Close VA API with these details:

{
    "paymentMethodType": "virtual_bank_account",
    "amount": 100000,
    "referenceId": "test_VA2",
    "expiredAt": "2021-12-31T09:07:04.000+07:00",
    "description": "Transaction 1 payment",
    "paymentMethodOptions":
    {
        "bankShortCode": "BRI",
        "displayName": "Close VA 1",
        "suffixNo": "91909265"
    }
}

2. You will get the responses like below when successful:

{
    "status": 200,
    "message": "OK",
    "data": {
        "id": "CL_77d16e55300146c487c22f02f904c43e",
        "type": "payment",
        "attributes": {
            "referenceId": "test_VA2",
            "description": "Transaction 1 payment",
            "amount": "15000.0",
            "status": "pending",
            "createdAt": "2021-12-13T14:26:43.000+07:00",
            "expiredAt": "2021-12-31T09:07:04.000+07:00",
            "paymentMethod": {
                "type": "virtual_bank_account",
                "instructions": {
                    "bankShortCode": "BRI",
                    "accountNo": "1304421991909265",
                    "displayName": "IKN-Close VA 1"
                }
            }
        }
    }
}

3. Payment Callback Notification

Brick notifies you when the user has already made the payment via callbacks (you will be able to set up the callback in the Brick Dashboard )

The callback will be sent twice:

  1. When the payment is made (status: "paid")
  2. When the fund settlement is done in each Bank (status: "completed")
{
    "data":
    {
        "id": "CL_77d16e55300146c487c22f02f904c43e",
        "type": "payment",
        "attributes":
        {
            "referenceId": "test_VA2",
            "description": "Transaction 1 payment",
            "amount": "100000.0",
            "status": "paid",
            "createdAt": "2021-12-13T14:26:43.000+07:00",
            "expiredAt": "2021-12-31T09:07:04.000+07:00",
            "paymentMethod":
            {
                "paymentId": "PAY_5a6c5cd44bfa4db8bbb060994e01bc44",
                "type": "virtual_bank_account",
                "instructions":
                {
                    "bankShortCode": "BRI",
                    "accountNo": "1304421991909265",
                    "displayName": "IKN-Close VA 1"
                }
            }
        }
    }
}
{
    "data":
    {
        "id": "CL_77d16e55300146c487c22f02f904c43e",
        "type": "payment",
        "attributes":
        {
            "referenceId": "test_VA2",
            "description": "Transaction 1 payment",
            "amount": "100000.0",
            "status": "completed",
            "createdAt": "2021-12-13T14:26:43.000+07:00",
            "expiredAt": "2021-12-31T09:07:04.000+07:00",
            "paymentMethod":
            {
                "paymentId": "PAY_5a6c5cd44bfa4db8bbb060994e01bc44",
                "type": "virtual_bank_account",
                "instructions":
                {
                    "bankShortCode": "BCA",
                    "accountNo": "1304421991909265",
                    "displayName": "IKN-Close VA 1"
                }
            }
        }
    }
}

What’s Next

The details of the APIs can be found here:

Did this page help you?