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.

MethodHow it works in the app
New cardSealed 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 cardThe customer picks a saved card and enters the CVV. Saved cards can be removed.
Manual bank wireThe customer picks a bank; the result screen shows the bank details.
Methods with fieldsThe 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 pageThe 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
  1. The customer pays. Praxis answers that the payment needs a 3-D Secure or provider page.
  2. The Cashier opens the page full screen, inside the Cashier, and sends the redirection event.
  3. The customer completes the page. Some pages hand the customer to a bank app and back.
  4. 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.
  5. The Cashier shows the result, and your app gets it in onResult when 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 happensWhat the Cashier does
The page goes to the session's app_return_urlStops that navigation (nothing loads or opens), closes the page and reads the payment status.
The customer taps the page's close buttonCloses the page and reads the payment status. The payment is often still pending at this point.
The page hands the customer to a bank appKeeps the page open. When your app is active again, reads the payment status.
The status is not final yetShows 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 payment

If 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 the apple-app-site-association file.

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 device

Provider 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 (amount in the Cashier Payment Request). A session amount shows as fixed text; set presetAmountEditable: true to 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 .editableAmount on, and within the method limits when .amountLimits is on.
  • With .currencyChange on, 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.fees decides 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.

See Features and Settings.

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.


Did this page help you?