Payment methods and flows
Payment methods
The Cashier shows the payment methods configured for your application at Praxis, as the web Cashier does. A method added or changed at Praxis works in the app without an SDK update, as long as its type is supported.
| Method | How it works in the app |
|---|---|
| New card | Sealed card fields inside the SDK. The card is encrypted on the device and sent only to Praxis. 3-D Secure opens inside the Cashier when the issuer asks for it (see 3-D Secure and provider pages). |
| Saved card | The customer picks a saved card and enters the CVV. Saved cards can be removed. |
| Manual bank wire | The customer picks a bank; the result screen shows the bank details. |
| Methods with fields | The Cashier draws the method's fields from the Praxis configuration, including fields with server-loaded options. Saved accounts can be removed. |
| Methods with a provider page | The provider's page opens inside the Cashier. See 3-D Secure and provider pages. |
3-D Secure and provider pages
Some payments need a page outside the Cashier's own screens:
- a 3-D Secure challenge from the card issuer, where the customer confirms the card payment;
- a provider page of the payment service provider or alternative payment method, where the customer logs in, confirms or pays.
Praxis returns the page in the payment answer, and the Cashier opens it on its own. Your app writes no code for it and needs no web view of its own.
How it works
sequenceDiagram
autonumber
actor Customer
participant Cashier as Cashier (in your app)
participant Praxis
participant Page as Issuer or provider page
participant Bank as Bank app (optional)
Customer->>Cashier: Pays
Cashier->>Praxis: Payment
Praxis-->>Cashier: Answer: open a 3-D Secure or provider page
Cashier->>Page: Opens the page full screen inside the Cashier
opt The page hands over to a bank app
Page->>Bank: Opens the bank app
Bank-->>Cashier: The customer returns to your app (app_return_url)
end
Page-->>Cashier: The page goes to the session's app_return_url
Cashier->>Praxis: Reads the payment status
Cashier-->>Customer: Result screen
- The customer pays. Praxis answers that the payment needs a 3-D Secure or provider page.
- The Cashier opens the page full screen, inside the Cashier, and sends the
redirectionevent. - The customer completes the page. Some pages hand the customer to a bank app and back.
- When the page finishes, the provider sends it to the session's
app_return_url. The Cashier catches this, closes the page and reads the payment status from Praxis. - The Cashier shows the result, and your app gets it in
onResultwhen the Cashier closes.
What the customer sees
The page fills the Cashier, with a close button above it. The Cashier's own close button stays hidden and a swipe down is refused while the payment runs, so the customer leaves the page only through its close button.
How the page ends
| What happens | What the Cashier does |
|---|---|
| The page goes to the session's app_return_url | Stops that navigation (nothing loads or opens), closes the page and reads the payment status. |
| The customer taps the page's close button | Closes the page and reads the payment status. The payment is often still pending at this point. |
| The page hands the customer to a bank app | Keeps the page open. When your app is active again, reads the payment status. |
| The status is not final yet | Shows the processing screen and keeps reading the status until the session expires, then ends with .pending. |
app_return_url matches on the scheme for a custom-scheme link, and on the host and path for an https link.
The result follows the payment status: .completed or .authorized, .failed with an error code, or .pending. A pending payment reaches its final status on your server through the Payment Notification.
Closing early does not cancel the paymentIf the customer closes the page or the Cashier before the provider confirms, the payment may still complete. The result is then
.pending. Credit the customer only from the Payment Notification.
Bank apps
A 3-D Secure or provider page may open the customer's bank app, for example to approve the payment in the app. To bring the customer back to your app automatically afterwards, register the session's app_return_url in your app:
- Custom scheme (
merchantapp://praxis/return): add the scheme under Target → Info → URL Types. - Universal Link (
https://merchant.example/praxis/return): add the Associated Domains capability and host theapple-app-site-associationfile.
You need no URL-handling code and no LSApplicationQueriesSchemes entries: the Cashier reads the payment status when your app is active again. If your app does not register the app_return_url, the customer switches back to your app by hand, and the Cashier still reads the status. When iOS opens your app with the app_return_url, your app's URL handler (onOpenURL, application(_:open:options:) or your Universal Link handler) also receives it: ignore that URL rather than treating it as an unknown deep link.
The page may open another app only from the page itself, not from a frame inside it, and at most once per page load. System and settings apps, and your app's own URL schemes, are never opened this way. If iOS cannot open the app, the page stays as it is.
The page's web view
The page runs in a web view that the SDK owns and controls:
- No stored data. It keeps no cookies, logins or other website data. The customer may need to sign in to their bank or provider each time.
- HTTPS only. Pages load only over
https; other web addresses are not loaded. - New windows. When the page itself opens a new window, for example from a script, it loads in the same view. When the customer taps a link that opens in a new window, the link opens in Safari, or in the app of a Universal Link.
- Isolated from your app. Your app cannot read or change the page, and the SDK adds no scripts to it.
Test every provider on a real deviceProvider pages open only in the Cashier's own web view. Before you go live, complete a payment with every method that opens a provider page, on a real device, including the bank app hand-off.
Amount, currency and promotions
- The amount comes from the session (
amountin the Cashier Payment Request). A session amount shows as fixed text; setpresetAmountEditable: trueto let the customer change it. Without a session amount, the field starts with the customer's last deposit, else the quick amount starting amount, else empty, and the customer enters the amount. The customer can change the amount only with.editableAmounton, and within the method limits when.amountLimitsis on. - With
.currencyChangeon, the customer can pay in another currency of their profile; the amount is converted. - Quick amount buttons show when you set them up in
amount.quickAmounts: your own lists per currency, method and transaction type, or buttons built from the customer's last deposit. - Promotions show when you set
promotions.style: the bonuses that Praxis offers for the session (.bonusList) or a promotion code field (.codeField). - Fees come from Praxis;
paymentMethods.feesdecides whether they show on the method rows. The total to pay always shows. - When the merchant requires terms acceptance, the customer must tick the terms box before paying.
Partial approval
When a payment is partially approved, the Cashier shows the approved part and asks the customer to accept or cancel it, with a countdown, as the web Cashier does. See Transaction Statuses.
Decline recovery and retry
After a declined payment, when the Praxis answer offers it, the Cashier shows one of two pages in place of the declined result:
- Retry: pay again with a lower amount, for example after insufficient funds.
- Recovery: pay the same amount with another payment method.
While one of these pages shows, CashierSnapshot.step is .result. If the customer closes the Cashier on one of these pages, it ends with the declined result. These pages send no result events (transaction, createResultPage, thank_you_page_loaded); the screen that follows them does.
A recovery the customer confirmed lasts only while the Cashier is open. It is not kept when the Cashier is opened again.
Withdrawals
Create a session with intent: "withdrawal" to open the withdrawal Cashier. The Cashier covers:
- the balance check: a preset amount must not be above the balance;
- payout methods and saved payout accounts;
- the list of pending withdrawals, with cancel.
A session with more than one intent (secondary_intents) shows Deposit and Withdraw tabs. CashierSnapshot.intent follows the tab that shows, and step is .loading while a tab loads.
On a withdrawal, the total line, CashierSnapshot.total and the live amount carry the withdrawal figures: what leaves the balance and what the customer receives.
Two withdrawal error pages end the Cashier with the payment_method_unavailable code: a card withdrawal with no saved card, no new card allowed and no other method, and a method that pays only to an account the customer has none of.
The result says intent = .withdrawal and carries withdrawalStatus. A request Praxis accepted but has not paid out yet ends with .pending and withdrawalStatus .requested. See Withdrawals.
Authorization
A session with intent: "authorization" authorizes the card without charging it. A card that was authorized and not charged ends with the .authorized status. With amount 0 it is a zero-amount authorization and the amount stays fixed at 0; without an amount it runs like a deposit and the customer enters the amount. Events of an authorization session report the .deposit intent.
Updated 8 days ago