Singapay Home Page
Logo Icon
  1. Virtual Account
  2. Update

Information

MethodPathFormatAuthentication
PUT/api/v1.0/virtual-accounts/{account_id}/{virtual_account_id}jsonOAuth 2.0 with Access Token
PATCH/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
amountNumericConditional-Amount of transaction. Required for closed VA. Not used for open VA. Min: 10,000, Max: 100,000,0001000000
min_amountNumericNo-Minimum payment amount for open VA. Optional — if not provided, keeps the current value.10000
max_amountNumericNo-Maximum payment amount for open VA. Optional — if not provided, keeps the current value. Must be >= min_amount.5000000
nameStringNo255Name or description for the virtual accountPayment for Invoice #123
statusEnumYes-Status of the VA: active, inactive, or expiredactive
expired_atTimestampConditional13Expired at in Unix timestamp millisecond format. Required if VA kind is temporary.1760643599000
max_usageNumericConditional-Maximum number of times the VA can be used. Required if VA kind is temporary. Min: 1, Max: 255.255

Notes on Editable Fields

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

Body Example

Update Permanent Virtual Account

{
    "amount": 1500000,
    "name": "Updated VA Name",
    "status": "active"
}

Update Temporary Virtual Account

{
    "amount": 2000000,
    "name": "Updated Temporary VA",
    "status": "active",
    "expired_at": 1760643599000,
    "max_usage": 100
}

Update Open Virtual Account (with new limits)

{
    "min_amount": 20000,
    "max_amount": 10000000,
    "name": "Updated Open VA Name",
    "status": "active"
}

Update Open Virtual Account (keep current limits)

{
    "name": "Updated Open VA Name",
    "status": "active"
}

Response Details

Response Structure

FieldTypeMandatoryLengthDescriptionExample
statusNumericMandatory3HTTP status code of the response200
successBooleanMandatory1Indicates whether the request was successfultrue
dataObjectConditional-Contains updated details about the virtual account-
> idAlphanumericMandatory-Unique identifier for the virtual account01K6D34A9GNATKP76AQ1DGPQBG
> numberNumericMandatory16Virtual account number9090777158248126
> merchant_reff_noStringOptional255Merchant reference number for tracingINV-2026-001
> codeAlphanumericMandatory-Virtual account bank code (e.g., VA_BRI)VA_BRI
> bankObjectMandatory-Contains bank details-
>> short_nameAlphabeticMandatory-Bank’s short nameBRI
>> numberAlphanumericMandatory-Bank’s internal numeric code002
>> swift_codeAlphanumericOptional-SWIFT code of the bank (if applicable)BRINIDJA
> amountObjectMandatory-Contains amount value and currency-
>> valueDecimalMandatory-Amount value in string format1500000.00
>> currencyAlphabeticMandatory3Currency code in ISO 4217 formatIDR
> amount_typeEnumMandatory-Type of amount: open or closedclosed
> min_amountObject/NullConditional-Min amount details (only for open VA, null for closed)-
>> valueDecimalConditional-Min amount value10000.00
>> currencyAlphabeticConditional3Currency codeIDR
> max_amountObject/NullConditional-Max amount details (only for open VA, null for closed)-
>> valueDecimalConditional-Max amount value5000000.00
>> currencyAlphabeticConditional3Currency codeIDR
> statusEnumMandatory-Status of the virtual account (e.g., “active”, “expired”)active
> kindEnumMandatory-Type of virtual account (“permanent” or “temporary”)permanent
> current_usageNumericMandatory-Current number of times the VA has been used5
> nameStringOptional-Name or description of the virtual accountUpdated VA Name
> expired_atTimestampOptional13Expiration timestamp (only for temporary VAs)1760643599000
> max_usageNumericOptional-Maximum usage limit (only for temporary VAs)255

Response Example

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"
    }
}

Validation Rules

FieldRulesError Messages
amountRequired, Numeric, Min: 10000, Max: 100000000“Min amount is Rp. 10.000,-” / “Max amount is Rp. 100.000.000,-”
nameOptional, String, Max: 255 characters“Name cannot exceed 255 characters”
statusRequired, Must be one of: active, inactive, expired“Status must be active, inactive, or expired”
expired_atRequired 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_usageRequired if VA kind is temporary, Integer, Min: 1, Max: 255“Min usage is 1” / “Max usage is 255”

Important Notes

  • 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