Results, Errors & Troubleshooting
What the Cashier returns, the error codes and how to fix common problems.
This page explains what the Cashier returns when it closes and what each error code means (§1), and how to fix common problems (§2).
1. Results and error codes
1.1 CashierResult
CashierResultYour app gets one CashierResult when the Cashier closes, in onResult.
A result is not a payment confirmation
completedon the device does not prove that the money moved. Confirm every payment on your server from the Payment Notification before you credit or debit the customer.
| Property | Description | Format |
|---|---|---|
status | How the Cashier ended (§1.2). | CashierResult.Status |
closedBy | Who closed it (§1.3). | CashierResult.ClosedBy |
errorCode | Why the payment did not complete. Set only when status is .failed. | CashierErrorCode? |
transactionID | The Praxis transaction ID, when a transaction exists. Use it to find the payment on your server. | String? |
traceID | The Praxis trace ID, for support requests. | String? |
amount | The amount of the transaction, in major units (for example 50.00). Nil without a transaction. | Decimal? |
currency | The ISO 4217 currency code of amount. | String? |
paymentMethod | The Praxis name of the payment method that paid. Use it to match the result with your records, not for display. | String? |
orderID | Your order_id of the session. | String? |
cardBrand | The card brand, for example "Visa". Never a card number or any part of one. | String? |
intent | .deposit or .withdrawal. Nil when the Cashier closed before the session was read. | CashierIntent? |
withdrawalStatus | The Praxis status of a withdrawal's transaction (§1.4). Nil for a deposit, for a withdrawal without a transaction, and for a status the SDK does not list. Your server's Payment Notification is the source of truth. | CashierResult.WithdrawalStatus? |
The result never carries error text, customer data or card data.
1.2 Status
| Status | Raw value | Meaning |
|---|---|---|
.completed | completed | The payment was approved. |
.authorized | authorized | The card was authorized and not charged yet, for example a zero-amount authorization. |
.pending | pending | The payment is still processing, or a withdrawal request was accepted and waits to be paid out. The final status reaches your server later. |
.failed | failed | The payment did not go through. errorCode says why. |
.canceled | canceled | The Cashier closed before a payment started. |
Status, closed-by, withdrawal status, step, intent, error code and error category values are structs with static values, not enums, so new values do not break your build. Always keep a default branch when you switch over them.
1.3 Closed by
| Value | Meaning |
|---|---|
.customer | The customer tapped the close button, or a button under the result. |
.code | Your app closed the Cashier: it called close() on the session or the slot context, dismissed the CashierView or CashierViewController that made the session, or set the .cashierSheet binding to false. |
.sdk | The SDK ended the session itself, for example with returnsAfterResult. |
1.4 Withdrawals
A withdrawal ends with the same statuses as a deposit. result.intent is .withdrawal, and result.withdrawalStatus carries the Praxis status of the withdrawal. A request Praxis accepted but has not paid out yet ends with .pending and withdrawalStatus .requested:
if result.intent == .withdrawal, result.withdrawalStatus == .requested {
showRequestAccepted()
}withdrawalStatus | Raw value | Meaning |
|---|---|---|
.approved | approved | Paid out. |
.authorized | authorized | Authorized and waits to be paid out. The result status is .authorized. |
.requested | requested | The withdrawal request was accepted and waits to be paid out. |
.requestedPayout | requested_payout | The payout request was accepted and waits to be paid out. |
.partialPayout | partial_payout | Only part of the amount was paid out. The result status is .pending; confirm the paid amount on your server. |
.pending | pending | Still processing. |
.pendingAsync | pending_async | Still processing at the provider. |
.initialized | initialized | Created, not processing yet. |
.verification | verification | Being verified. |
.declined | declined | Refused. |
.error | error | Failed. |
.canceled | cancelled | Canceled. |
See Transaction Statuses.
1.5 Error codes
The SDK never sends error text to your app. Map each code to your own message, in your own language:
func message(for code: CashierErrorCode?) -> LocalizedStringResource {
switch code {
case .declined: "Your bank declined the payment. Try another card."
case .network: "Check your connection. If you were charged, the payment will appear shortly."
case .sessionExpired: "This payment session expired. Please start again."
default: "The payment did not go through. Please try again."
}
}| Code | Raw value | Category | Money taken? | What your app can do |
|---|---|---|---|---|
.declined | declined | payment | No | Ask for another card or method. |
.cardInvalid | card_invalid | payment | No | Ask the customer to check the card. |
.cardNotAccepted | card_not_accepted | payment | No | Try again later. |
.transactionCanceled | transaction_canceled | payment | No | The payment was canceled. The customer may pay again. |
.noPaymentMethod | no_payment_method | payment | No | No payment method is available for this session and currency. |
.walletUnavailable | wallet_unavailable | payment | No | Apple Pay could not complete the payment. Nothing was sent. Offer the card instead. Apple Pay can then stay hidden for the session; when the sheet cannot open, the event wallet_not_presented is also sent. |
.network | network | network | Maybe | Check the final status on your server. |
.sessionExpired | session_expired | session | No | Create a new session. |
.sessionUnavailable | session_unavailable | session | No | The Cashier could not read the session when it opened. Create a new session. |
.invalidToken | invalid_token | session | No | The token was empty; nothing was sent. Pass the token your server got. |
.validationFailed | validation_failed | validation | No | Check the amount and the session settings. A withdrawal's preset amount must not be above the balance. |
.serverError | server_error | server | Maybe | Check the final status on your server. |
.unexpectedResponse | unexpected_response | server | Maybe | Check the final status. |
.unknown | unknown | server | Maybe | Check the final status on your server. |
.configurationError | configuration_error | configuration | No | The session was created for the web Cashier (create it with channel: ios_sdk), a payment method needs a native SDK this Cashier does not have, or your method filter returned no id from the list it got. Check the session and your filter. |
.paymentMethodUnavailable | payment_method_unavailable | configuration | No | The selected method could not be shown; nothing was sent. Try again or use another method. On a withdrawal it also ends the error page of a card withdrawal with no saved card, no new card allowed and no other method, or of a method that pays only to an account the customer has none of. |
Use errorCode.category (.session, .network, .server, .validation, .configuration, .payment) to group codes instead of handling each one.
A code never changes its meaning. New codes can be added, so always keep a default branch.
When the Cashier cannot open (an empty token or a session it cannot read), it shows an error screen and, once closed, ends with .failed and the code of that screen.
Support requestsLog the
orderID,transactionID,traceIDanderrorCode.rawValueof each result. When you contact your CSM about a payment, include them with the iOS version and the sequence of event names you received.
2. Troubleshooting
2.1 Session creation
| Symptom | Cause | Fix |
|---|---|---|
The iOS SDK is not available for your application | The iOS SDK is not enabled for the application. | Ask your CSM to enable it, for the sandbox and live applications. |
The iOS SDK needs the PCI card form for your application | The application does not use the PCI card form. | Ask your CSM to enable the PCI card form, for the sandbox and live applications. |
Incorrect app return url | app_return_url is missing or is not a custom-scheme link or an https URL with a host. | Send a valid app_return_url with every channel: ios_sdk session. |
Incorrect channel | channel has a value other than web or ios_sdk. | Send ios_sdk. |
The iOS SDK channel is not available for this session type | The session is not a regular cashier session (session_type missing or cashier), for example a payment_link session. | Create a regular cashier session. |
The response has no redirect_url | Expected for iOS SDK sessions. | Use session.auth_token with the SDK. |
2.2 Opening the Cashier
| Symptom | Cause | Fix |
|---|---|---|
The Cashier ends at once with configuration_error | The session was created without channel: "ios_sdk" (a web session). | Add channel and app_return_url to the Cashier Payment Request. |
The Cashier ends with invalid_token | The token is empty. Nothing was sent. | Pass session.auth_token from your server. |
The Cashier ends with session_unavailable | The Cashier could not read the session: for example, the token is from another environment, or the session no longer exists. | Check that the session was created in the environment you pass (.sandbox or .live), and create a new session. |
The Cashier ends with session_expired | More than 15 minutes have passed since the Cashier first opened the session. | Create a new session. |
A compile error when you store a CashierView | CashierView is generic over its layout. | Write the full type, for example CashierView<Cashier.AmountFirstLayout>. |
2.3 Payment methods
| Symptom | Cause | Fix |
|---|---|---|
| The method list is empty when the Cashier opens | The methods load once an amount above zero and a currency are set. | Send amount with the session, or let the customer enter one. |
The Cashier shows "no payment methods" and ends with no_payment_method | No method is available for the session, intent and currency. | Check the gateways configured for your application and currency with your CSM. |
The Cashier ends with configuration_error after it loads | Your methodFilter returned no id from the list it got. | Check your filter, and that it returns ids from the list it gets. |
| A saved card is missing | .savedInstruments is off, or your filter removed saved-<n> rows. | Turn the feature on, or keep the rows in your filter. |
2.4 Payments and returns
| Symptom | Cause | Fix |
|---|---|---|
| The customer does not come back from a bank app | Your app does not register the app_return_url. | Register the URL scheme or Universal Link (see Integration Guide §1.2.5). |
| A 3-D Secure or provider page does not load, or stays blank | The page is not https, or the provider does not support in-app web views. | Check the method on a real device and contact your CSM with the traceID. See 3-D Secure and provider pages. |
The result is .pending after a 3-D Secure or provider page | The customer closed the page before the provider confirmed, or the provider confirms later. | Wait for the Payment Notification; do not ask the customer to pay again. |
The result is .pending | The payment is still processing at the provider, or the Cashier was closed while it ran. | Wait for the Payment Notification on your server. |
The result is .completed but no Payment Notification arrived | The notification is delayed or your endpoint refused it. | Check that notification_url is reachable over HTTPS and answers successfully. Never credit the customer without the notification. |
| A card brand error shows on the card number after paying | The brand is not allowed for the session. | Expected: brands are checked when the card is submitted, not while the customer types. |
2.5 Layouts and customization
| Symptom | Cause | Fix |
|---|---|---|
The main button stays disabled, and layout_incomplete is sent with reason requiredBlock | Your layout leaves out a block the payment needs. | Add the block. Put Terms in the bottom area of every page. See Required blocks. |
layout_incomplete with reason duplicateSealed | Two card blocks are on screen at once. | Show one card block at a time. |
layout_incomplete with reason presentation; only the amount section opens | Your layout places blocks outside Cashier.Pages. | Put the blocks inside Cashier.Pages. For one screen, use one Cashier.Page. See Layouts. |
| The app stops when slot content reads the session | @Environment(CashierSession.self) is nil inside slot content. | Read @Environment(\.cashierSlotContext) instead. |
| The Deposit / Withdraw tabs are missing | The header was replaced or hidden. | Keep Cashier.Header in sessions with more than one intent. |
A configuration value or text has no effect, and configuration_value_ignored is sent | The value is invalid (for example a hex color without #, a negative corner radius or amount, a URL that is not https) or the text key is unknown. | Read ignoredName in the event and fix that value. |
| No quick amount buttons or promotions show | Both are off by default. Or no quick amount list matches the session's method, currency and transaction type. | Set amount.quickAmounts or promotions.style. Check the currency and intent of your lists. |
| A setting changed in the Praxis Backoffice (Theme Editor) has no effect in the app | The SDK does not read those settings. | Set the value in CashierConfiguration. |
| Your font does not show | The font is not registered in your app. The Cashier falls back to a system font. | Register the font in your app and pass its family name. |
| A text shows its key instead of wording | No text exists for that key in the session language. | Set the text with CashierTexts. |
2.6 Contacting support
When you contact your CSM about a payment, include the orderID, transactionID, traceID and errorCode.rawValue of the CashierResult, the iOS version and the sequence of event names you received.
What's next
Updated about 18 hours ago