Webhooks
The Virtual Account Transaction Webhooks API allows you to receive real-time notifications for transactions associated with virtual accounts. This feature helps you monitor and manage virtual account transactions efficiently, ensuring you can act promptly on any transaction events.
Method | Path | Format | Authentication |
---|---|---|---|
POST | https://merchant-virtual-account-transaction-url | 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 | 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 | - | - | - |
> transaction_id | Numeric | Mandatory | - | Transaction ID | 3645345 |
> account | Object | - | - | - | - |
>> name | Alphabetic | - | - | Account name | - |
>> id | Numeric | - | - | Account ID | - |
> bank_code | Alphabetic | Mandatory | - | Code of bank like: BRI, BNI, DANAMON, etc | BRI |
> va_number | Numeric | Mandatory | - | Virtual account bank number | 5588804221231232 |
> status | Alphabetic | Mandatory | - | Transaction status (e.g., paid, pending, unpaid) | paid |
> amount | Object | Mandatory | - | Amount of transaction | - |
>> value | Decimal | Mandatory | - | Transaction amount | 99000 |
>> currency | Alphabetic | Mandatory | 3 | Currency type | IDR |
> fees | Array | - | - | List of fees related to the transaction | - |
>> name | Alphabetic | - | - | Fee name | - |
>> amount | Decimal | - | - | Fee amount | - |
>> currency | Alphabetic | - | - | Currency type | - |
> total_amount | Object | Mandatory | - | Total amount of transaction | - |
>> value | Decimal | Mandatory | - | Total transaction amount | 99000 |
>> currency | Alphabetic | Mandatory | 3 | Currency type | IDR |
> post_timestamp | Timestamp | Mandatory | - | Date requested with Unix Timestamp millisecond format | 1714122259 |
> processed_timestamp | Timestamp | - | - | Date finished with Unix Timestamp millisecond format | - |
> balance_after | Numeric | Mandatory | - | Balance account after transaction | - |
>> value | Numeric | Mandatory | - | Balance after transaction | 99000 |
>> currency | Alphabetic | Mandatory | 3 | Currency type | IDR |
Success: Here’s an example of a successful response.
{
"status": 200,
"success": true,
"data": {
"transaction_id": "645345445",
"account": {
"name": "Julian Pratama",
"id": "465454"
},
"bank_code": "BRI",
"va_number": "5588804221231232",
"status": "paid",
"notes": "lorem ipsum",
"amount": {
"value": "11000.00",
"currency": "IDR"
},
"fees": [
{
"name": "Service Fee",
"amount": "2000.00",
"currency": "IDR"
}
],
"total_amount": {
"value": "13000.00",
"currency": "IDR"
},
"post_timestamp": "1714618220440",
"processed_timestamp": "1714618220440",
"balance_after": {
"value": "11000.00",
"currency": "IDR"
}
}
}
Error: This is an example of an unsuccessful request.
{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized partner, please sign in"
}
}