2. How a payment works

A payment has three parts. The app never creates a session and never decides the final status.

StepWhoWhat happens
1 · SessionYour serverYour server creates a cashier session with Praxis, server to server, for the native SDK: with channel: ios_sdk and an app_return_url. It sends the app only the session token.
2 · CashierYour app + SDKThe app shows the cashier with that token and the service addresses of the Praxis environment. The customer pays inside the cashier.
3 · ResultSDKThe cashier closes and hands the app one CashierResult: completed, authorized, pending, failed or canceled.
4 · Final statusPraxis → your serverYour server gets the final status from the Praxis notification (webhook). Credit the customer from it, not from the device.
🚧

Important

A session made for the web cashier does not open in the SDK: it ends at once with the error code configuration_error. Create the session with channel: ios_sdk.

🚧

Important

"completed" on the device does not prove the money moved. Confirm the payment on your server from the Praxis notification before you credit the customer.

What the SDK talks to

ServiceUsed forAddress
Cashier-Service (GraphQL)The session's activation, its data and every write. The server signs the calls to the Praxis core.graphqlURL
PCI-Secure-FormThe card keys, the saved cards, and the card or the Apple Pay token in one submitpciURL
Event LogsOperational logs for Praxis support (optional, see section 14)logsURL

Praxis gives you the three addresses for the environment your server created the session in. The SDK holds no key and nothing is signed or encrypted with an app key: the card keys come from PCI-Secure-Form.

Session lifetime

  • Use one session for one payment. A closed session cannot start again.
  • The session ends with session_expired at its expiry time.
  • While a payment processes, the cashier keeps asking Praxis for its status until the session expires, when it ends with the status pending.

Did this page help you?