Virtual Accounts
Fetch by Account Number

Fetch Virtual Account by Account Number

Get the virtual accounts matching an account number.

Endpoint: GET https://api.budpay.com/api/v2/collection/virtual-accounts/:accountNumber

This path uses virtual-accounts (plural), unlike Fetch by Reference, which uses virtual-account. The response data is an array.

Parameters

This section details the header information required for fetching a virtual account by its account number.

Field NameDescription
URLhttps://api.budpay.com/api/v2/collection/virtual-accounts/:accountNumber
MethodGET
AuthorizationBearer YOUR_SECRET_KEY (Replace with your actual BudPay secret key)
Path Parameters
ParameterTypeRequiredDescription
accountNumberStringYesThe virtual account number

Sample Request

Endpoint: GET https://api.budpay.com/api/v2/collection/virtual-accounts/9888145123

1curl -X GET 'https://api.budpay.com/api/v2/collection/virtual-accounts/9888145123' \2  -H 'Authorization: Bearer YOUR_SECRET_KEY'
{  "status": true,  "message": "Virtual Account List Retrieved",  "data": [    {      "accountNumber": "9888145123",      "accountName": "Test Customer Surname",      "bankCode": "000027",      "bankName": "Globus Bank",      "accountType": "reserved",      "accountStatus": "active",      "expiryInMinutes": 0,      "reference": "2026e3431VA0000001",      "createdAt": "2026-10-21T16:29:02"    }  ]}

Response Fields

Each item in data contains:

FieldDescription
accountNumberVirtual account number
accountNameName on the virtual account
bankCodeCode of the partner bank
bankNameName of the partner bank
accountTypereserved or checkout
accountStatusAccount status (e.g. active)
expiryInMinutesMinutes until the account expires (0 for reserved accounts)
referenceReference supplied at creation
createdAtTime the account was created (UTC)