POST /pricing_page_sessions/create_for_existing_subscription
This endpoint streamlines the generation of a pricing page session to enable subscription upgrade, and downgrade workflows using Chargebee's hosted pricing pages (Atomic Pricing). By providing a subscription ID as a parameter, you will obtain a hosted pricing page session URL.
Note: Full access key authentication is needed for this API request.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
Request headers
Name | Type | Required | Description |
---|---|---|---|
chargebee-request-origin-device |
String | No |
The device from which the customer has made the request |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
chargebee-event-webhook |
String | No |
skip only webhooks Possible values:
|
chargebee-business-entity-id |
String | No |
If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. |
chargebee-event-actions |
String | No |
skip all actions to be done on the events Possible values:
|
chargebee-request-origin-user |
String | No |
The email address of your customer/user. Use this when the email address has only ASCII characters. |
chargebee-request-origin-ip |
String | No |
The IP address of the customer where the request originated |
chargebee-request-origin-user-encoded |
String | No |
The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header |
chargebee-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
discounts |
Object | No |
Parameters for discounts |
discounts.apply_on[] |
Array | No | |
discounts.included_in_mrr[] |
Array | No |
The discount is included in MRR calculations for your site. This attribute is only applicable when |
discounts.period_unit[] |
Array | No | |
discounts.percentage[] |
Array | No |
The percentage of the original amount that should be deducted from it. |
discounts.period[] |
Array | No |
The duration of time for which the discount is attached to the subscription, in |
discounts.label[] |
Array | No |
Label for the discount |
discounts.amount[] |
Array | No |
The value of the discount. The format of this value depends on the kind of currency you want to use for a discount. This is only applicable when |
discounts.duration_type[] |
Array | Yes | |
discounts.item_price_id[] |
Array | No |
The id of the item price in the subscription to which the discount is to be applied. Relevant only when |
redirect_url |
String | No |
The customers will be redirected to this URL upon successful checkout. |
subscription |
Object | No |
Parameters for subscription |
subscription.id |
String | Yes |
The unique identifier of an existing subscription for which the hosted pricing page is created. |
pricing_page |
Object | No |
Parameters for pricing page |
pricing_page.id |
String | Yes |
The unique identifier of the pricing page for which the hosted pricing page is created. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.