Transaction, the SDK takes the shopper to a final status and reports it to onStatus, and Yuno confirms the outcome to your backend. What changes between integrations is who creates the payment and which session you pass. The three flows below cover every case.
The default flow: the SDK creates the payment
Create the checkout session withworkflow: "SDK_SEAMLESS" and do not override createPayment. The SDK does everything between start and onStatus.
- Your backend creates the checkout session and hands its ID to your app.
- Your app initializes the SDK once, builds a
TransactionConfigwith the session and your controller, and callsstartwith the method the shopper picked. - The SDK renders the method’s form, or skips it when you pass
transactionData, and tokenizes the details into a one-time token. - The SDK creates the payment with that token, runs 3DS or any other action the method needs, and polls the status until it is final.
onStatusreceives the final status. On iOS, asynchronous methods reportPENDINGfirst; seeonStatus. IfshowStatusScreenistrue, the SDK also shows its result screen.- Yuno sends the payment webhook to your backend. Confirm the outcome there before fulfilling the order.
When your backend creates the payment
OverridecreatePayment and keep the default session workflow (SDK_CHECKOUT). The SDK pauses after tokenization, hands you the token, and resumes when your handler returns.
The difference is steps 9 to 13: the SDK delivers the one-time token to createPayment, your backend creates the payment, and returning from the handler is what resumes the flow. If the handler throws, the flow stops and onStatus is not called. Set autoContinuePayment to false only if you need the SDK to stop right after the payment is created. On Web it applies only when you override createPayment; on iOS it applies to the SDK’s own payment creation too. The SDK then runs no 3DS, polls no status, and reports nothing to onStatus for that attempt. On Web, PayPal ignores the flag and always continues. See autoContinuePayment.
Enrollment: save a method without charging
Pass acustomerSession instead of a checkoutSession. There is no payment to create, so createPayment is never invoked.
The vaulted token is never delivered to the app. After onStatus reports success, your backend reads the enrolled method from Yuno and uses its vaulted token for future payments.