Create VA for Order
Create a new VA for an existing order via SePay API v2. Sacombank only allows adding VA on Pending orders.
Create a New VA for Order
POST
https://userapi.sepay.vn/v2/bank-accounts/{ba_xid}/orders/{order_xid}/vaInformation
Order must be Pending or Partially. Sacombank has no Partially, only allows Pending.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
ba_xid | string (UUID) | Bank account UUID |
order_xid | string (UUID) | Order UUID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
amount | int | No | Must not exceed the order amount |
va_holder_name | string | Conditional | Required if the enterprise has the custom display name feature enabled |
duration | int | No | VA validity period in seconds |
Code Examples
>
>
>
>
>
curl --request POST \--url https://userapi.sepay.vn/v2/bank-accounts/f9e8d7c6-b5a4-3210-fedc-ba0987654321/orders/b2c3d4e5-f6a7-8901-bcde-f12345678902/va \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \--header 'content-type: application/json' \--data '{"amount":0,"va_holder_name":"string","duration":0}'
Response (HTTP 201)
Response 201 - VA created successfully
{
"status": "success",
"message": "VA created successfully",
"data": {
"va_number": "963NQDORD1234567890CD",
"va_holder_name": "TRAN THI B",
"amount": 500000,
"status": "Unpaid",
"expired_at": "2025-12-19 08:15:00"
}
}Errors
| HTTP | error_code | Description |
|---|---|---|
| 422 | invalid_state | Order status is not Pending or Partially |