Skip to main content
POST
/
api
/
v1.0
/
virtual-accounts
/
{account_id}
Create
curl --request POST \
  --url https://sandbox-payment-b2b.singapay.id/api/v1.0/virtual-accounts/{account_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-PARTNER-ID: <api-key>' \
  --data '
{
  "bank_code": "BRI",
  "kind": "temporary",
  "amount_type": "closed",
  "name": "Bakso Enak- John Doe",
  "merchant_reff_no": "INV-2026-001",
  "expired_at": "1774000000000",
  "max_usage": 1,
  "amount": 100000,
  "min_amount": 10000,
  "max_amount": 100000
}
'
{
  "status": 200,
  "success": true,
  "data": {
    "id": "01K946KF851RK7FX075GJHBVKF",
    "number": "9090583126022726",
    "code": "VA_BNI",
    "bank": {
      "short_name": "BRI",
      "number": "002",
      "swift_code": "BRINIDJA"
    },
    "amount": {
      "value": "1234.56",
      "currency": "IDR"
    },
    "amount_type": "closed",
    "status": "active",
    "kind": "temporary",
    "current_usage": 0,
    "expired_at": 1774000000000,
    "name": "Bakso Enak- John Doe",
    "merchant_reff_no": "INV-2026-001",
    "min_amount": {
      "value": "1234.56",
      "currency": "IDR"
    },
    "max_amount": {
      "value": "1234.56",
      "currency": "IDR"
    }
  }
}

Authorizations

Authorization
string
header
required

JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.

X-PARTNER-ID
string
header
required

Merchant API key (Credential.api_key). Required on every request.

Path Parameters

account_id
string
required

Account identifier in ULID format.

Body

application/json
bank_code
enum<string>
required

Issuing bank for the virtual account.

Available options:
BCA,
BNI,
BRI,
MANDIRI,
PERMATA,
MAYBANK,
CIMB,
BSI,
MUAMALAT,
BNC,
OCBC,
DANAMON
Example:

"BRI"

kind
enum<string>
required

Virtual account duration type.

Available options:
temporary,
permanent
Example:

"temporary"

amount_type
enum<string>

Amount model: closed (fixed amount) or open (min/max range). Defaults to closed when omitted.

Available options:
open,
closed
Example:

"closed"

name
string | null

Display name for the virtual account.

Maximum string length: 200
Example:

"Bakso Enak- John Doe"

merchant_reff_no
string | null

Merchant reference number for this virtual account.

Maximum string length: 255
Example:

"INV-2026-001"

expired_at
string

Expiration time as a Unix timestamp in milliseconds (13 digits). Required when kind is temporary.

Pattern: ^\d{13}$
Example:

"1774000000000"

max_usage
integer

Maximum number of successful payments allowed. Required when kind is temporary.

Required range: 1 <= x <= 255
Example:

1

amount
number

Fixed payment amount. Required for closed virtual accounts. Minimum and maximum limits depend on merchant configuration.

Example:

100000

min_amount
number

Minimum payment amount. Required for open virtual accounts.

Example:

10000

max_amount
number

Maximum payment amount. Required for open virtual accounts and must be greater than or equal to min_amount.

Example:

100000

Response

Created

status
integer
required

HTTP status code.

Example:

200

success
boolean
required

Indicates whether the request was successful.

Example:

true

data
object

Virtual account resource payload.