Start a new topic

In-app Checkout v2

Hi 


What is the data format to load a plan?


    cbInstance.openCheckout({

        hostedPage: function () {

            // We will discuss on how to implement this end point below.

            return $.ajax({

                url: '/generate_hp_url',

                data: data,

                method: 'POST'

            });

        },

        success: function (hostedPageId) {

            // success callback

        }

    });


Regards


David

1 Comment

Hi David,


Thanks for writing to us.


You have to pass the data to your endpoint /generate_hp_url from where you will hit our chargebee API (http://apidocs.localcb.in:8080/docs/api/hosted_pages#checkout_new_subscription) with the format mentioned in API docs. 

 

Refer here for samples : https://github.com/cb-vivek/chargebee-checkout-samples/tree/master/api


Login or Signup to post a comment