I'd like to create a way such that user creation (on our backend) happens atomically with successful subscription creation on Chargebee's end.
Our ideal account creation has a user + password field, and then a checkout button that brings up Chargebee Hosted Pages. Upon successful completion of the checkout, the user account is created on our side, and attaches the Chargebee subscription ID.
But it looks like it's difficult to get these totally in sync - the best way I could come up with is to use the Chargebee passthrough with the API to pass our user's registration details (username + password). But it definitely doesn't make sense to me to hand over the password to Chargebee (even if it is encrypted). I'd like a solution that avoids this, and avoids any ordering of the events (user creation and then subscription details, etc.).
I'd appreciate any suggestions. Here's an example of what I'd like to create: https://forge.laravel.com/auth/register