Midtrans — E-Wallet
Midtrans provides deep integration for GoPay (and other E-Wallets).
Supported Wallets
GOPAY
How to Create
http
POST /v1/payments/createjson
{
"amount": 10000000,
"currency": "IDR",
"method_type": "e_wallet",
"method_detail": {
"type": "e_wallet",
"wallet_type": "GOPAY"
}
}Response & Payment Flow
For GoPay via Midtrans, the response contains deep links.
json
{
"success": true,
"data": {
"status": "pending",
"method_data": {
"type": "e_wallet",
"wallet_type": "GOPAY",
"deeplink": "gojek://gopay/checkout?id=xxxxx",
"qr_image_url": "https://api.midtrans.com/v2/gopay/..."
}
}
}Implementation Options:
- Desktop Web: Display the QR code using
qr_image_urlfor the customer to scan with their phone. - Mobile Web/App: Use
deeplinkto redirect the customer directly to the Gojek app on their phone.