ChargebeeAPI

Create pricing page for new subscription

Idempotency Supported
Try in API Explorer

This endpoint streamlines the generation of a pricing page session to enable new subscription creation workflows using Chargebee's hosted pricing pages (Atomic Pricing ). By providing a subscription ID and/or customer ID as a parameter, you'll obtain a pricing page session URL.

Note: Full access key authentication is needed for this API request.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/pricing_page_sessions/create_for_new_subscription

Input Parameters

redirect_url
optional, string, max chars=250

The customers will be redirected to this URL upon successful checkout.

business_entity_id
optional, string, max chars=50

Sets the context for this operation to the business entity specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, new subscription and customer resources are created within the business entity.

auto_select_local_currency
optional, boolean, default=false
  • false: The first currency in the dropdown list is selected.
  • true: Automatically determines the currency based on the visitor's geolocation. For example, if the visitor is from the United States and this flag is enabled, USD is selected as the currency-if it's available on the pricing page. Similarly, if the visitor is from India, INR is selected. If the visitor's country currency isn't available, the first currency in the dropdown list is selected.
custom
optional, jsonobject

JSON object of custom attributes (key-value pairs) used for pricing page targeting or content. Configure custom attributes in the dashboard.

pricing_page[0..n]
Parameters for pricing_page
pass parameters as pricing_page[<param name>]
subscription[0..n]
Parameters for subscription
pass parameters as subscription[<param name>]
customer[0..n]
Parameters for customer
pass parameters as customer[<param name>]
billing_address[0..n]
Parameters for billing_address
pass parameters as billing_address[<param name>]
shipping_address[0..n]
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
discounts[0..n]
Parameters for discounts. Multiple discounts can be passed by specifying unique indices.
pass parameters as discounts[<param name>][<idx:0..n>]

Returns

pricing_page_sessionPricing page session object
Resource object representing pricing_page_session