Talivia Docs
Talivia Docs
HomeDashboard
IntroductionInstallationTeamGetting updates
Stripe
Yolfi
Attribute revenue with Yolfi Payment LinksYolfi Checkout Session APITest and troubleshoot Yolfi
Dodo Payments
LemonSqueezy
Polar
Manual Payment APITesting payment integrations
Integrations
llms.txtllms-full.txt
RevenueYolfi

Yolfi Checkout Session API

Create a hosted Yolfi checkout from your backend.

View Markdown
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:

Create a Yolfi Checkout Session
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.

Attribute revenue with Yolfi Payment Links

Add one redirect parameter to your Yolfi Payment Link.

Test and troubleshoot Yolfi

Check that Yolfi payments are recorded and matched to traffic.