| Method | Path | Format | Authentication |
|---|
| PUT | /api/v1.0/virtual-accounts/{account_id}/{virtual_account_id} | json | OAuth 2.0 with Access Token |
| PATCH | /api/v1.0/virtual-accounts/{account_id}/{virtual_account_id} | json | OAuth 2.0 with Access Token |
| Field | Value | Type | Mandatory | Length | Description | Example |
|---|
| X-PARTNER-ID | api_key | Alphanumeric | Mandatory | | API key obtained from the merchant dashboard. | b3ed7d4b-a96c-6c08-b3c7-12c3124242d9 |
| Accept | application/json | Alphabetic | Mandatory | | Specifies JSON as the expected response format. | application/json |
| Authorization | Bearer {bearerToken} | Alphanumeric | Mandatory | | Bearer token obtained from the get access token endpoint. | Bearer eyJ0eXAiOiJKV1{…} |
| Field | Type | Mandatory | Length | Description | Example |
|---|
| amount | Numeric | Conditional | - | Amount of transaction. Required for closed VA. Not used for open VA. Min: 10,000, Max: 100,000,000 | 1000000 |
| min_amount | Numeric | No | - | Minimum payment amount for open VA. Optional — if not provided, keeps the current value. | 10000 |
| max_amount | Numeric | No | - | Maximum payment amount for open VA. Optional — if not provided, keeps the current value. Must be >= min_amount. | 5000000 |
| name | String | No | 255 | Name or description for the virtual account | Payment for Invoice #123 |
| status | Enum | Yes | - | Status of the VA: active, inactive, or expired | active |
| expired_at | Timestamp | Conditional | 13 | Expired at in Unix timestamp millisecond format. Required if VA kind is temporary. | 1760643599000 |
| max_usage | Numeric | Conditional | - | Maximum number of times the VA can be used. Required if VA kind is temporary. Min: 1, Max: 255. | 255 |
Virtual Account Type (kind) | Editable Fields |
|---|
| permanent (closed) | amount, name, status |
| temporary (closed) | amount, name, status, expired_at, max_usage |
| permanent (open) | min_amount, max_amount, name, status |
| temporary (open) | min_amount, max_amount, name, status, expired_at, max_usage |
{
"amount": 1500000,
"name": "Updated VA Name",
"status": "active"
}
{
"amount": 2000000,
"name": "Updated Temporary VA",
"status": "active",
"expired_at": 1760643599000,
"max_usage": 100
}
{
"min_amount": 20000,
"max_amount": 10000000,
"name": "Updated Open VA Name",
"status": "active"
}
{
"name": "Updated Open VA Name",
"status": "active"
}
| Field | Type | Mandatory | Length | Description | Example |
|---|
| status | Numeric | Mandatory | 3 | HTTP status code of the response | 200 |
| success | Boolean | Mandatory | 1 | Indicates whether the request was successful | true |
| data | Object | Conditional | - | Contains updated details about the virtual account | - |
| > id | Alphanumeric | Mandatory | - | Unique identifier for the virtual account | 01K6D34A9GNATKP76AQ1DGPQBG |
| > number | Numeric | Mandatory | 16 | Virtual account number | 9090777158248126 |
| > merchant_reff_no | String | Optional | 255 | Merchant reference number for tracing | INV-2026-001 |
| > code | Alphanumeric | Mandatory | - | Virtual account bank code (e.g., VA_BRI) | VA_BRI |
| > bank | Object | Mandatory | - | Contains bank details | - |
| >> short_name | Alphabetic | Mandatory | - | Bank’s short name | BRI |
| >> number | Alphanumeric | Mandatory | - | Bank’s internal numeric code | 002 |
| >> swift_code | Alphanumeric | Optional | - | SWIFT code of the bank (if applicable) | BRINIDJA |
| > amount | Object | Mandatory | - | Contains amount value and currency | - |
| >> value | Decimal | Mandatory | - | Amount value in string format | 1500000.00 |
| >> currency | Alphabetic | Mandatory | 3 | Currency code in ISO 4217 format | IDR |
| > amount_type | Enum | Mandatory | - | Type of amount: open or closed | closed |
| > min_amount | Object/Null | Conditional | - | Min amount details (only for open VA, null for closed) | - |
| >> value | Decimal | Conditional | - | Min amount value | 10000.00 |
| >> currency | Alphabetic | Conditional | 3 | Currency code | IDR |
| > max_amount | Object/Null | Conditional | - | Max amount details (only for open VA, null for closed) | - |
| >> value | Decimal | Conditional | - | Max amount value | 5000000.00 |
| >> currency | Alphabetic | Conditional | 3 | Currency code | IDR |
| > status | Enum | Mandatory | - | Status of the virtual account (e.g., “active”, “expired”) | active |
| > kind | Enum | Mandatory | - | Type of virtual account (“permanent” or “temporary”) | permanent |
| > current_usage | Numeric | Mandatory | - | Current number of times the VA has been used | 5 |
| > name | String | Optional | - | Name or description of the virtual account | Updated VA Name |
| > expired_at | Timestamp | Optional | 13 | Expiration timestamp (only for temporary VAs) | 1760643599000 |
| > max_usage | Numeric | Optional | - | Maximum usage limit (only for temporary VAs) | 255 |
Success: Here’s an example of a successful response.
{
"status": 200,
"success": true,
"data": {
"id": "01K6D34A9GNATKP76AQ1DGPQBG",
"number": "9090777158248126",
"merchant_reff_no": "INV-2026-001",
"code": "VA_BRI",
"bank": {
"short_name": "BRI",
"number": "002",
"swift_code": "BRINIDJA"
},
"amount": {
"value": "1500000.00",
"currency": "IDR"
},
"status": "active",
"kind": "permanent",
"current_usage": 5,
"name": "Updated VA Name"
}
}
Error: This is an example of an unsuccessful request with validation errors.
{
"status": 422,
"success": false,
"error": {
"code": 422,
"message": "Validation error",
"errors": {
"amount": [
"Min amount is Rp. 10.000,-"
],
"status": [
"Status must be active, inactive, or expired"
]
}
}
}
Error: Virtual account not found.
{
"status": 404,
"success": false,
"error": {
"code": 404,
"message": "Virtual account not found"
}
}
| Field | Rules | Error Messages |
|---|
| amount | Required, Numeric, Min: 10000, Max: 100000000 | “Min amount is Rp. 10.000,-” / “Max amount is Rp. 100.000.000,-” |
| name | Optional, String, Max: 255 characters | “Name cannot exceed 255 characters” |
| status | Required, Must be one of: active, inactive, expired | “Status must be active, inactive, or expired” |
| expired_at | Required if VA kind is temporary, Date, Must be in the future | “Expiration date is required for temporary VA” / “Expiration date must be in the future” |
| max_usage | Required if VA kind is temporary, Integer, Min: 1, Max: 255 | “Min usage is 1” / “Max usage is 255” |
- The
kind field (permanent/temporary) cannot be changed after the virtual account is created
- The
amount_type field (open/closed) cannot be changed after creation
- For permanent closed virtual accounts, you can only update:
amount, name, and status
- For temporary closed virtual accounts, you can additionally update:
expired_at and max_usage
- For permanent open virtual accounts, you can only update:
min_amount, max_amount, name, and status
- For temporary open virtual accounts, you can additionally update:
expired_at and max_usage
- The virtual account number cannot be changed
- Both PUT and PATCH methods are supported and behave identically
- All changes are logged in the virtual account event log