Accept in-app payments
Use the Payrails native SDKs to accept payments from within your mobile apps
Why Payrails agnostic in‑app payments
- No platform lock‑in – The April 30 U.S. court ruling lets you link to external payment methods, keeping revenue you once lost to up‑to‑30 % app‑store fees.
- Any PSP, any market – Connect to any global or local processor (or Merchant‑of‑Record) and switch at will, without code rewrites.
- Optimise cost and conversion – Dynamically route transactions for lower fees, higher authorisation rates, or reduced risk, and A/B test strategies in real time.
- Unified data and control – Consolidate web and app payments in one dashboard and experiment from a single rule engine.
- Security built‑in – Payrails tokenises data and keeps you in PCI SAQ‑A scope.
Intro: your implementation options
Payrails offers two ways to bring checkout into a mobile experience.
Option | Best for | How it works |
---|---|---|
iOS/React native SDK integration | Native iOS apps that want the smoothest UX | Present the Payrails Payment Sheet inside your app; if the chosen method requires a bank or wallet redirect, the Generic Redirect Element opens an in‑app Safari view and returns when the flow completes. |
Server‑to‑Server Redirect Flow | Cross‑platform or webview apps, or when you need full UI control | Your backend creates the workflow execution, then sends back redirect URL to Payrails HPP to client. |
Classical Payrails payment flow | Full control on UI, advanced payment flow setups | Standard payment process through Payrails, without any UI limitations |
Either option lets you decide where the final checkout UI lives:
- Use the Payrails Hosted Payment Page – quickest path, fully branded to your colours and logo.
- Render your own page – host the redirect yourself and retain total design control while relying on Payrails for compliance and payment logic.
Client‑side integration options
Option 1 — iOS/RN SDK with Generic Redirect Element (recommended for native apps)
Step | What you do | What the SDK does |
---|---|---|
1 | Install the Payrails SDK | Bundles the GenericRedirectElement and HPP |
2 | Call Payrails.GenericRedirectButton() | Displays UI button, which redirect the user to Payrails HPP where payments happens |
4 | Listen for sdk authorization events and update your UI | Sends the authorizaiton result to the app and the final webhook to your server. |
Why pick this? Fastest time‑to‑market and best user experience—no context switch to the browser, and Payrails maintains the redirect handler for new payment methods.
For complete element documentation, read here - iOS SDK
Option 2 — Server‑to‑Server Redirect Flow (works for any platform)
- Configure Payrails acceptance workflow to include Payrails HPP option
- Create a Workflow execution with lookup as initial action.
- Take the redirection url from lookup result
- Redirect the user to Payrails Hosted Payment Page
- Handle the return on
return_url
, then verify status via API or webhook.
Why pick this? Works in any environment, gives full design control, and enables out‑of‑band use cases such as pay‑links or email invoices.
Option 3 - Payrails payment inside the iframe
- Implement your custom payment/checkout page by using Payrails SDKs
- Open it in webview, handle the payment flow inside the checkout page
- Update the status of the app
Updated 9 days ago