Introducing OpenTelemetry for Chargebee SDKs — trace every API call in any telemetry tool.

Accept a quote

This API generates a hosted page URL for the customer to accept a quote. If the hosted page URL has expired, a new URL will be generated automatically.

  • Customers with existing subscriptions can generate a quote for new subscriptions. However, Hosted page URL to accept a quote cannot be generated for new subscriptions in V1 and V2 hosted pages.

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/hosted_pages/accept_quote

Input Parameters

brand_id
optional, string, max chars=50

The unique ID of the brand this hosted page should be linked to. Applicable only when multiple brands have been created for the site. This need not match the brand of the customer or subscription in the request; when the two differ, the value provided here is used for the hosted page. An alternative way of passing this parameter is by means of the chargebee-brand-id custom HTTP header; when both are provided, they must specify the same brand.

Default behavior

  • When not provided, the hosted page is linked to the brand of the customer or subscription in the request.
redirect_url
optional, string, max chars=250

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.

Note :

  • 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 such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as subscription_created or invoice_generated to verify a successful checkout.
  • 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.
layout
optional, enumerated string

Specifies the UI layout for the hosted page. This overrides the layout configured in Chargebee Billing.

Enum Values
in_app

Renders the hosted page in an in-app layout.

full_page

Renders the hosted page in a full-page layout.

quote
Parameters for quote
pass parameters as quote[<param name>]

Returns

Hosted page object

Resource object representing hosted_page