RevenueYolfi
Yolfi Checkout Session API
Create a hosted Yolfi checkout from your backend.
Connect Yolfi first
Complete the Yolfi connection setup before continuing.
Use this guide only when your backend creates a Checkout Session. If you created a reusable link in the Yolfi dashboard, follow the Payment Links guide.
Create the Yolfi Checkout Session
Keep your Yolfi API key on the backend. Set successUrl with the literal
{CHECKOUT_SESSION_ID} placeholder:
const checkout = await fetch('https://app.yolfi.com/api/checkout-sessions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.YOLFI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
paylinkId: process.env.YOLFI_PAYLINK_ID,
successUrl: 'https://your-site.com/thanks?session_id={CHECKOUT_SESSION_ID}',
}),
}).then(response => response.json());
return Response.json({ url: checkout.data.url });Send the customer to checkout.data.url. After payment, Talivia reads session_id from the
return page and matches the payment automatically. No Talivia metadata is required.
For subscriptions, use the same successUrl for the first checkout. Renewals are connected to
the original payment automatically.
See Yolfi Checkout Sessions for the full request and response schema.