- Web SDK integration
- iOS
- Android
1. Install
2. Initialize and process payment
3. Add HTML container and trigger payment
Handling a failed payment
The Web SDK can recover from a failed payment without reloading the page. Two mechanisms work together:-
Payment retry — inline card retry when the payment returns
DECLINEDorERROR. In Seamless the SDK handles retry automatically. In Full Checkout, Lite, and Secure Fields you callcontinuePaymentafter your backend confirms the decline. Works for non-enrolled credit and debit cards. See Payment retry for the full reference. -
Switching payment methods — call
updateCheckoutSession(newSession)to inject a fresh checkout session without unmounting the SDK. Picking from the already-rendered payment-method list after a session swap works; a different set of payment methods requires unmounting and re-mounting the SDK — not a page reload. See updateCheckoutSession.
On a retried attempt the SDK does not fire
yunoPaymentResult. It delivers the cloned checkout session to your onLoading callback as { type: 'PAYMENT_RETRY', data: { newCheckoutSession } }. Register onLoading in your startCheckout configuration to receive it:Backend integration
Your backend must implement two API endpoints to work with Yuno:1. Create checkout session
Before displaying the payment UI, your backend creates a checkout session:- Endpoint:
POST https://api-sandbox.y.uno/v1/checkout/sessions - Required: Customer ID, amount, country
- Returns:
checkout_sessionID (used in SDK) - Reference: Create checkout session API
2. Create payment
In the One-Time Token (OTT) callback, your backend creates the payment:- Endpoint:
POST https://api-sandbox.y.uno/v1/payments - Required: One-time token (from SDK callback), checkout session
- Returns: Payment status and
sdk_action_requiredfield - Reference: Create payment API
sdk_action_required: true, you must call the SDK’s continuePayment() method to complete async payment methods (3DS authentication, PIX, bank redirects, etc.).
Parameters
Primary parameters used in this quickstart:
Full parameter reference: Payment flows (Web), Payment flows (iOS), Payment flows (Android).