E-wallets

How e-wallets integrate with PayMongo — the integration pattern, how they attach to a Payment Intent, supported providers, and the redirect flow.

Overview

E-wallets are one of the most widely used payment methods in the Philippines. PayMongo supports four providers — GCash, Maya, GrabPay, and ShopeePay — through the same Payment Intent workflow. Each e-wallet follows a redirect pattern: after attachment, the customer is redirected to the provider's app or website to authorize the payment.


Supported providers

ProviderPayment method type
GCashgcash
Mayapaymaya
GrabPaygrab_pay
ShopeePayshopeepay

How e-wallets attach to a Payment Intent

The flow is the same for all four providers:

  1. Create a Payment Intent with the provider's method type in payment_method_allowed
  2. Create a Payment Method with the appropriate type
  3. Attach the Payment Method — the response includes next_action.redirect.url
  4. Redirect the customer to the URL — they complete authorization in the provider's app or website
  5. Customer returns to your return_url after authorization
  6. Confirm via webhookpayment.paid or payment.failed
if (intent.data.attributes.status === 'awaiting_next_action') {
  window.location.href = intent.data.attributes.next_action.redirect.url;
}

Expiry windows

Each e-wallet has a time limit for the customer to complete authorization:

ProviderDefault expiryConfigurable
GCash4 hoursNo
Maya30 minutesNo
GrabPay15 minutesNo
ShopeePay20 minutesYes — 1 to 3600 seconds

If the customer doesn't complete authorization within the window, the Payment Intent returns to awaiting_payment_method.

To customize ShopeePay's expiry window, set payment_method_options.shopeepay.expiry_seconds when attaching.


Mobile apps and deep links

If your integration runs inside a mobile app (iOS or Android), GCash payments require additional implementation to work correctly. GCash now requires payment completion inside the GCash mobile app, which means your app must handle the gcash:// deep link scheme to open the GCash app directly instead of a browser.

Without this implementation, the "Open in GCash" button may fail silently — the customer sees the button but tapping it does nothing.

See Handle Deep Links for implementation details for Android and iOS.

Merchants using a mobile browser (not a native app) do not need to implement deep links — the browser handles the redirect automatically.