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.

OptionBest forHow it works
iOS/React native SDK integrationNative iOS apps that want the smoothest UXPresent 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 FlowCross‑platform or webview apps, or when you need full UI controlYour backend creates the workflow execution, then sends back redirect URL to Payrails HPP to client.
Classical Payrails payment flowFull control on UI, advanced payment flow setupsStandard 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)

StepWhat you doWhat the SDK does
1Install the Payrails SDKBundles the GenericRedirectElement and HPP
2Call Payrails.GenericRedirectButton()Displays UI button, which redirect the user to Payrails HPP where payments happens
4Listen for sdk authorization events and update your UISends 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)

  1. Configure Payrails acceptance workflow to include Payrails HPP option
  2. Create a Workflow execution with lookup as initial action.
  3. Take the redirection url from lookup result
  4. Redirect the user to Payrails Hosted Payment Page
  5. 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

  1. Implement your custom payment/checkout page by using Payrails SDKs
  2. Open it in webview, handle the payment flow inside the checkout page
  3. Update the status of the app