Singapay Home Page
Logo Icon
  1. Virtual Account
  2. Destroy Virtual Accounts

Information

MethodPathFormatAuthentication
DELETE/api/v1.0/virtual-accounts/{account_id}/{virtual_account_id}jsonOAuth 2.0 with Access Token

Request Details

Headers Structure

FieldValueTypeMandatoryLengthDescriptionExample
X-PARTNER-IDapi_keyAlphanumericMandatoryAPI key obtained from the merchant dashboard.b3ed7d4b-a96c-6c08-b3c7-12c3124242d9
Acceptapplication/jsonAlphabeticMandatorySpecifies JSON as the expected response format.application/json
AuthorizationBearer {bearerToken}AlphanumericMandatoryBearer token obtained from the get access token endpoint.Bearer eyJ0eXAiOiJKV1{…}

Body Structure

FieldTypeMandatoryLengthDescriptionExample
amountNumericMandatory-Amount of transaction99000
bank_codeAlphanumericMandatory-Bank code, e.g., BRI, BNI, BCABRI
currencyAlphanumeric--Currency code-
kindEnumMandatory-Type of account: temporary or permanenttemporary
expired_atTimestampMandatory-Expiration timestamp in Unix milliseconds format1714122693

Body Example

{
  "amount": 99000,
  "bank_code": "BRI",
  "currency": null,
  "kind": "temporary",
  "expired_at": 1714122693
}

Response Details

Response Structure

FieldTypeMandatoryLengthDescriptionExample
statusNumericMandatory3HTTP Status Code200
successBooleanMandatory1Indicates whether the request was successful (2xx is true, 4xx-500 is false)true
dataArray ObjectConditional-Contains details about the virtual account-
> idNumericMandatory-Virtual account ID23643
> amountObjectMandatory-Contains balance amount and currency-
>> valueNumericMandatory-Balance amount; if kind is “permanent”, value will be 099000
>> currencyAlphabeticMandatory3Currency codeIDR
> kindEnumMandatory-Indicates whether the account is temporary or permanenttemporary
> bank_codeAlphanumericMandatory-Bank code like BRI, BCA, BNIBRI
> numberNumericMandatory16Virtual account number with a length of 16 digits6343654354
> statusAlphabeticMandatory-Status of the virtual account (values are “active” or “expired”)active
> created_atTimestampMandatory-Date created in Unix millisecond timestamp1714616095080

Response Example

Success: Here’s an example of a successful response.

{
  "status": 200,
  "success": true,
  "data": {
      "id": "2374354",
      "amount": {
        "value": "11000.00",
        "currency": "IDR"
      },
      "kind": "temporary",
      "status": "expired",
      "bank_code": "BRI",
      "number": "465436543564546",
      "created_at": "1714616095080"
  }
}

Error: This is an example of an unsuccessful request.

{
    "status": 401,
    "success": false,
    "error": {
        "code": 401,
        "message": "Unauthorized partner, please sign in"
    }
}