This article covers
How to setup checkout via API for SEPA payments
Summary
This article details the workflow of checkout via API for SEPA payments in Chargebee:
- Create a checkout URL using the checkout new or existing subscription API 
- Pass the URL in Chargebee.JS to open the checkout as a modal popup. 
- Set checkout callbacks using Chargebee.JS - When the checkout process is successful the 'success' callback is triggered. 
 
- In the 'success' callback, pass the hosted page ID to your backend server, which is used in the Retrieve a hosted page ID API to fetch the payment source ID for the customer. 
- Use this ID to retrieve the Direct Debit agreement using the retrieve direct debit agreement PDF API. 
- The retrieve agreement API response will contain the URL where the Direct Debit agreement is hosted. 
- Pass this to the Chargebee.JS to load the agreement in the modal popup. 
