Winpay — Virtual Account
Winpay's Virtual Account (VA) allows your customers to pay for their orders via a bank transfer that is automatically detected by the system. The generated VA number is a Closed Payment (the amount must be exact, and it can only be paid once).
Supported Banks
BCABRIBNIMANDIRIBSICIMBPERMATAMUAMALATSINARMASBNCMAYBANK
Note: Ensure you have enabled the above banks via the dashboard (Routing Rules menu) before using them.
How to Create
To create a Virtual Account, set method_type to virtual_account and provide method_detail containing 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
}Important Request Notes
- Amount: Use the smallest unit format (cents). Rp 100,000 is written as
10000000. - Phone Number (
customer_phone): Highly recommended to be filled. If left empty, the system will use a dummy number (089999999999) as a fallback for Winpay. - Expiry: You can control the payment expiration time via
expiry_minutes(e.g., 60 for 1 hour).
Response
If successful, you will receive a Payment object with method_data containing the Virtual Account instructions.
json
{
"success": true,
"data": {
"id": "...",
"status": "pending",
"amount": 10000000,
"expires_at": "2026-07-21T13:00:00Z",
"method_data": {
"type": "virtual_account",
"bank": "BCA",
"va_number": "88880123456789"
}
// ... other fields
}
}Important Data to Display to the Customer
method_data.va_number: The Virtual Account number the customer must transfer to.method_data.bank: The destination bank name.amount: Display in the local currency format (remember to divide by 100 back to full Rupiah).expires_at: Display a countdown for the payment deadline.
End-to-End Payment Flow
- Client Application: Sends
POST /v1/payments/createto Gerbang Pay. - Gerbang Pay: Returns the
va_number. - Client Application: Displays the VA number, amount, and deadline on the customer's screen/UI.
- Customer: Opens M-Banking/ATM and transfers funds to that VA number.
- Winpay: Detects the incoming funds and sends a callback to Gerbang Pay.
- Gerbang Pay: Changes the transaction status to
paidand sends a Webhook to your server. - Your Server: Receives the webhook, updates the order status in the database, and then (optionally) sends a success push notification/email to the customer.