Midtrans — Virtual Account
Virtual Account (VA) through Midtrans allows you to receive payments via bank transfers directly detected by the system.
Supported Banks
BCABNIBRIMANDIRIPERMATACIMBDANAMON
How to Create
Set method_type to virtual_account, and method_detail contains the bank field.
http
POST /v1/payments/createjson
{
"amount": 10000000,
"currency": "IDR",
"method_type": "virtual_account",
"method_detail": {
"type": "virtual_account",
"bank": "BCA"
},
"customer_name": "Budi Santoso",
"customer_phone": "081234567890",
"expiry_minutes": 60
}Response
json
{
"success": true,
"data": {
"id": "...",
"status": "pending",
"amount": 10000000,
"method_data": {
"type": "virtual_account",
"bank": "BCA",
"va_number": "123456789012"
}
}
}Display va_number to your customer. Once the customer pays via ATM or M-Banking, Midtrans will notify Gerbang Pay, and you will receive a webhook.