After a Payment
Choose what customers see after checkout and pass the Checkout Session ID to your return page.
Choose the confirmation behavior
When you create or edit a Payment Link, use After Completion to choose what the customer sees after a successful payment:
- Show message displays Yolfi's default thank-you message.
- Redirect sends the customer's browser to the URL you provide.
For a basic redirect, enter a normal URL. It does not need any query parameters:
https://merchant.example/thanksPass the Checkout Session ID
For advanced return pages, add the literal {CHECKOUT_SESSION_ID} placeholder anywhere in the
redirect URL. A query parameter is a common way to pass it:
https://merchant.example/thanks?session_id={CHECKOUT_SESSION_ID}After payment, Yolfi replaces the placeholder with the ID of that payment attempt's Checkout Session before redirecting the browser:
https://merchant.example/thanks?session_id=ycs_0123456789abcdef0123456789abcdefThe session_id parameter name is not reserved. You control the URL around the placeholder, so
this works too:
https://merchant.example/thanks?checkout={CHECKOUT_SESSION_ID}Every direct Payment Link payment gets a Checkout Session automatically. The signed
payment.confirmed webhook contains the same ID as checkoutSessionId, so you can correlate the
browser return with the verified payment and its metadata.
Override the redirect for one checkout
If your backend creates a Checkout Session, it can provide a
successUrl for that individual checkout. A session-level successUrl takes priority over the
Payment Link's Redirect URL and supports the same {CHECKOUT_SESSION_ID} placeholder.
Do not fulfill from the redirect
A browser redirect is useful for confirmation-page state and analytics, but it is not proof of
payment. The customer can close the tab before the redirect, and a return URL can be opened
directly. Fulfill orders and grant access only from a signed
payment.confirmed webhook.