Hosted page to accept card details from the subscriber and create a new subscription. This is similar to our server to server API Create a Subscription.
When the redirect URL is notified of the result, we would advise you to retrieve the subscription and verify the details.
Related Tutorials
As mentioned before this behavior is very similar to the create subscription API call. All the web hook events will be fired only after the submission of payment details by the customer and successful creation of subscription. Any errors related to the payment form that is submitted is handled as a response within the form so that the user is kept informed about the reason for failure to take corrective action.
Sample Request
URL Format
Input Parameters
Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
Although the customer will be redirected to the redirect_url
after successful checkout,
we do not recommend relying on it for completing critical post-checkout actions.
This is because redirection may not happen due to unforeseen reasons.
Chargebee recommends listening to appropriate webhooks such as subscription_created
or invoice_generated
to verify a successful checkout.
Note
: - Redirect URL configured in Settings > Hosted Pages Settings would be overriden by this redirect URL.
Eg : http://yoursite.com?id=&state=succeeded
- This parameter is not applicable for iframe messaging.
The customers will be redirected to this URL upon canceling checkout. The hosted page id and state will be passed as parameters to this URL.
Note
: - Cancel URL configured in Settings > Hosted Pages Settings would be overriden by this cancel URL.
Eg : http://yoursite.com?id=&state=cancelled
- This parameter is not applicable for iframe messaging and in-app checkout.
You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.
If true then hosted page formatted to be shown in iframe. If false, it is formatted to be shown as a separate page.
Note : For in-app checkout, default is false.
If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you're using iframe_messaging you need to implement onSuccess & onCancel callbacks.
Note : This parameter is not applicable for in-app checkout.