Topics Covered
I do not want to use Chargebee to collect payment details
Can I use a custom form to signup, my customers?
Summary
Chargebee's hosted pages & JS components, allow you to seamlessly connect your website/sign up flow to Chargebee without the need to worry about PCI compliance. However, there could be situations where using the Chargebee Hosted page could be limiting to your workflow.
For this we allow you to use use our APIs to give you the flexibility, where you can collect the payment details (only for support gateways that are configured) using the respective payment gateway supported workflow and use the token provided by the gateway to create a customer/subscription in Chargebee with the captured payment details.
Note: You will need to use our APIs to automate this flow, Chargebee support engage with your developer.
Solution
- Design the workflow the customer needs to follow (pricing page, Buy/signup button)
- On the final step (buy/subscribe) of your signup, to capture the payment details
- Use the respective gateway's Javascript to create a profile on the gateway (vault) (example Stripe's JS)
- Using the token that was generated, and chargebee's APIs
- Call the create subscriptions API (if only creating a customer use the create customer API).
- Invoke the API with payload collected during the Signup flow along with the gateway token.
- Subscription will be created on successful payment.
- An invoice will be created and payment will be collected.
Note: If payment fails during subscription creation, the subscription will not be created, thus no invoice. You will need to redirect the customer to begin the process again.
Feel free to contact Chargebee support for my information.