Previews a subscription by POSTing the same JSON or XML as for a subscription creation.
The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary.
A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction.
For more information, see our documentation here.
If you have the new Catalog experience enabled, you can create subscriptions without a product_id or product_handle using POST /subscriptions, building them entirely from components.
A valid subscription must include at least one active component with:
allocated_quantity,unit_balance, orcomponent_id can be provided as a numeric ID or in handle: format. If trial_interval and trial_interval_unit are included, they are applied at creation.
In the response, product and product price point fields are null, and component details are returned instead.
This functionality is supported in the API, but is not currently supported in SDKs.
This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met:
For more information about creating taxable previews, see our documentation guide on how to create taxable subscriptions.
You do not need to include a card number to generate tax information when you are previewing a subscription. However, when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored in Advanced Billing. The billing address and the credit card information are stored together within the payment profile object. Also, you may not send a billing address to Advanced Billing without payment profile information, as the address is stored on the card.
You can pass shipping and billing addresses and still decide not to calculate taxes. To do that, pass skip_billing_manifest_taxes: true attribute.
If you'd like to calculate subscriptions that do not include tax you may leave off the billing information.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/preview.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "subscription": { "product_handle": "gold-product" }}'