Skip to content

Midtrans — E-Wallet

Midtrans provides deep integration for GoPay (and other E-Wallets).

Supported Wallets

  • GOPAY

How to Create

http
POST /v1/payments/create
json
{
  "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:

  1. Desktop Web: Display the QR code using qr_image_url for the customer to scan with their phone.
  2. Mobile Web/App: Use deeplink to redirect the customer directly to the Gojek app on their phone.

Gerbang Pay API Documentation