Summary
The Checkout Page V3 is a modal popup that can be embedded on your webpage so customers can sign up for your service without leaving your website.
After a successful checkout, the Chargebee checkout popup can be closed by the customers and continue on your website.
Solution
If you’d like to redirect your customers to a different page after a successful checkout, here’s what you can do:
Success Callback - You can listen to the success callback from the Chargebee js which is called after a sign-up is complete and redirect the customer to a different webpage.
cbInstance.setCheckoutCallbacks(function(cart) {
// you can define custom callbacks based on cart object
return {
loaded: function() {
console.log("checkout opened");
},
close: function() {
console.log("checkout closed");
},
success: function(hostedPageId) {
},
step: function(value) {
// value -> which step in checkout
console.log(value);
}
}
});
Here’s more on the Chargebee JS callback functions.
Redirect URL - You can configure the redirect URL in the plan details page and Chargebee will redirect the customers to this URL after a successful checkout.
Note: For one-time payments checkout redirect URL configuration, refer to this link
Related articles and documentation: