Docs

Log into read the version of docs relevant to your site.

Stripe SEPA via API

Problem Statement

You want to set up checkout via API for SEPA (Direct Debit) payments using Stripe.

Solution

Use the checkout API to create a checkout URL, open it in Chargebee.JS, and handle the success callback to retrieve the Direct Debit agreement. The workflow below describes how to implement SEPA checkout via API.

Steps to Set It Up

  1. Create a checkout URL using the Checkout new subscription or Checkout existing subscription API.
  2. Pass the URL to Chargebee.JS to open checkout as a modal popup.
  3. Configure checkout callbacks in Chargebee.JS. The success callback runs when checkout completes successfully.
  4. In the success callback, send the hosted page ID to your backend.
  5. Call the Retrieve a hosted page API with the hosted page ID to get the payment source ID for the customer.
  6. Use the Retrieve direct debit agreement PDF API to get the Direct Debit agreement.
  7. The API response includes the URL where the agreement is hosted. Pass this URL to Chargebee.JS to load the agreement in the modal popup.

Was this article helpful?