Virtual Account
This feature is used to find out information regarding the list of virtual accounts in an account.
Method | Path | Format | Authentication |
---|---|---|---|
GET | /api/v1.0/virtual-accounts/{account_id} | json | OAuth 2.0 with Access Token |
Field | Value | Type | Mandatory | Length | Description | Example |
---|---|---|---|---|---|---|
X-PARTNER-ID | api_key | Alphanumeric | Mandatory | API key obtained from the merchant dashboard. | b3ed7d4b-a96c-6c08-b3c7-12c3124242d9 | |
Accept | application/json | Alphabetic | Mandatory | Specifies JSON as the expected response format. | application/json | |
Authorization | Bearer {bearerToken} | Alphanumeric | Mandatory | Bearer token obtained from the get access token endpoint. | Bearer eyJ0eXAiOiJKV1{…} |
Field | Value | Type | Mandatory | Length | Description | Example |
---|---|---|---|---|---|---|
kind | - | Alphabetic | Mandatory | - | temporary or permanent | permanent |
{
"kind": "temporary"
}
Field | Type | Mandatory | Length | Description | Example |
---|---|---|---|---|---|
status | Numeric | Mandatory | 3 | HTTP Status Code | 200 |
success | Boolean | Mandatory | 1 | 2xx is true. 4xx-500 is false. | true |
data | Array Object | Conditional | - | - | - |
> id | Numeric | Mandatory | - | virtual account id | 23643 |
> amount | Object | Mandatory | - | - | - |
>> value | Numeric | Mandatory | - | Balance amount, if kind is “permanent” value will be 0 | 99000 |
>> currency | Alphabetic | Mandatory | 3 | currency | IDR |
> kind | Enum | Mandatory | - | temporary or permanent | temporary |
> bank_code | Alphanumeric | Mandatory | - | Bank code like BRI, BCA, BNI | BRI |
> number | Numeric | Mandatory | 16 | 16 length va number | 6343654354 |
> status | Alphabetic | Mandatory | - | Status of virtual account Values is active or expired | active |
> created_at | Timestamp | Mandatory | - | Date created in unix millisecond timestamp | 1714616095080 |
pagination | Object | Conditional | - | - | - |
> count | Numeric | Mandatory | - | Data quantity | 2 |
> total | Numeric | Mandatory | - | Total of all data | 100 |
> perPage | Numeric | Mandatory | - | Total data per page | 10 |
> currentPage | Numeric | Mandatory | - | current page | 1 |
> totalPages | Numeric | Mandatory | - | Total page | 3 |
> links | Object | Mandatory | - | Next or previous links | - |
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"
}
],
"pagination": {
"count": 1,
"total": 1,
"perPage": 10,
"currentPage": 1,
"totalPages": 1,
"links": {}
}
}
Error: This is an example of an unsuccessful request.
{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized partner, please sign in"
}
}