Cancel VA API

Cancel one specific VA of an order via SePay API. Only VAs in Unpaid status can be cancelled, which prevents duplicate payment processing.

||

Cancel VA

DELETE
https://userapi.sepay.vn/v2/bank-accounts/{ba_xid}/orders/{order_xid}/va/{va_number}
Note

Only VAs with Unpaid status can be cancelled. This endpoint cancels a single VA only; the parent order keeps its current status.

Path Parameters

ba_xidstringrequired

Bank account UUID

order_xidstringrequired

Order UUID

va_numberstringrequired

VA number

Code Examples

>
>
>
curl --request DELETE \
--url https://userapi.sepay.vn/v2/bank-accounts/f9e8d7c6-b5a4-3210-fedc-ba0987654321/orders/b2c3d4e5-f6a7-8901-bcde-f12345678902/va/963NQDORD1234567890AB \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response (HTTP 204)

Empty body.

Cancellation rules by bank

BehaviorBIDVSacombankVietcombankVietinBankShinhan Bank
Move VA to CancelledYesYesYesYesYes
May refuse to cancelNoNoYes: 403 vcb_cancel_not_allowed, 500 vcb_cancel_error, or 503 vcb_connection_errorNoYes: 500 shinhan_cancel_error or 503 shinhan_connection_error
Vietcombank VAs

A Vietcombank VA may not be cancellable if the invoice is already paid or cancelled on the Vietcombank side. See the error table below.

Shinhan Bank VAs

SePay cancels the VA number at the bank first, then moves it to Cancelled. If the bank reports the number no longer exists, SePay treats the cancellation as successful, so repeated calls stay safe.

Errors

HTTPerror_codeDescription
403vcb_cancel_not_allowedVietcombank: invoice is already paid or cancelled, can no longer be cancelled. Contact SePay if you need help.
404-VA not found, or does not belong to the order / authenticated account
422invalid_stateVA status does not allow cancellation (only Unpaid VAs can be cancelled)
500vcb_cancel_errorVietcombank: unexpected error while cancelling. Contact SePay support.
503vcb_connection_errorVietcombank: service temporarily disrupted. Please try again in a few minutes.