Mobile Integration Guidelines
Follow these guidelines when integrating Pay by Bank into a mobile application.
Mobile application integration
When Pay by Bank is used from a mobile app (native iOS, Android, or an in-app WebView), bank account linking uses multiple redirects, including a bank OAuth step. On mobile, the OAuth step must be handled by the merchant app using deep links so that the Paysafe Hosted Page can stay open and complete the flow.
These guidelines apply to Payments API integrations on mobile. They also apply when Checkout is embedded inside a mobile WebView.
Why mobile needs a different approach
On desktop, bank OAuth can open and return in the same browser session. On mobile:
- Only the merchant app can securely open the bank OAuth URL.
- After bank login, the consumer must return to the app where the Paysafe Hosted Page is still open.
- If the Hosted Page is closed or replaced during OAuth, enrollment or payment does not finish.
Guidelines
-
Use an out-of-process or in-app browser.
Render the Paysafe Hosted Page in an out-of-process WebView or in-app browser (for example, iOS SFSafariViewController / ASWebAuthenticationSession, Android Chrome Custom Tabs, or an equivalent in-app browser).
Keep the Hosted Page session alive for the full payment journey so it can receive authorization events and complete the flow inside the app.
Do not destroy or replace the Hosted Page when the consumer is redirected to their bank.
-
Support deep links in your app.
Your mobile app must register and handle a custom URI scheme (or universal / app links) so that:
- Paysafe can pass the bank OAuth URL to your app.
- The bank can return the consumer to your app after authentication.
-
Pass mobile parameters in the payByBank object.
On payment handle requests that start a mobile flow (typically transactionType: PAYMENT or STANDALONE_CREDIT when enrollment or linking is required), include:
| Parameter | Description |
|---|---|
| appScheme | Deep link prefix used by Paysafe to send the bank OAuth URL to your app. Your app must intercept this link, extract the OAuth URL, and open it externally (in a browser / separate session). |
| openAuthRedirectUrl | Deep link used after bank authorization to return the consumer to your app so the Hosted Page can continue. |
Example
"payByBank": {
"consumerId": "YOUR_CONSUMER_ID",
"openAuthRedirectUrl": "yourappscheme://",
"appScheme": "yourappscheme://hellopaybybank?url="
}
When these values are present, Paysafe treats the request as a mobile flow. The bank OAuth URL is appended to appScheme and delivered to your application.
Register these scheme values in your iOS and Android app configuration.
Consumer flow (mobile)
- The consumer starts a payment (or enrollment) in the merchant app.
- The consumer is taken to the Paysafe Hosted Page (keep this page open).
- The consumer selects their bank.
- The Paysafe Hosted Page provides the bank OAuth URL via the appScheme deep link.
- The merchant app opens the OAuth URL in a separate browser / session.
- The consumer authenticates and consents at the bank.
- The bank redirects to openAuthRedirectUrl, returning the consumer to the merchant app.
- The merchant app closes only the OAuth browser session. The original Hosted Page remains open and waiting.
- The flow continues on the Hosted Page (account selection, terms, and completion) as in the standard web journey.
Merchant implementation checklist
- Register a custom URI scheme (or universal / app links).
- Pass appScheme and openAuthRedirectUrl on the payment handle request for mobile.
- Open the Hosted Page in an out-of-process / in-app browser and keep it open.
- Intercept the appScheme deep link and open the appended bank OAuth URL in a separate session.
- On return from the bank, do not reload or close the Hosted Page; allow Pay by Bank to continue.
- Use webhooks or payment handle queries for the final status. Do not rely only on the consumer returning to the app.