Creates a Subscription for a customer and product.
Specify the product with product_id or product_handle. To set a specific product price point, use product_price_point_handle or product_price_point_id.
Identify an existing customer with customer_id or customer_reference. Optionally, include an existing payment profile using payment_profile_id. To create a new customer, pass customer_attributes.
Select an option from the Request Examples drop-down on the right side of the portal to see examples of common scenarios for creating subscriptions.
When a subscription uses custom pricing as the sales price, you can optionally provide a list price for any item. If omitted, the list price defaults to the sales price. The difference between the list price and sales price is used to calculate implicit discounts, which appear on Invoices and in reporting. List price can also support revenue allocations in Advanced Revenue.
If your site has list pricing enabled, the API accepts custom_price.list_price_point_id for custom pricing, validates and persists it, and returns list price metadata in subscription responses. If list pricing is disabled, this input is ignored and related response fields are omitted.
When list pricing is enabled:
product_price_point_list_price_point_id (integer)product_price_point_list_price_point_handle (string)component_id (integer)price_point_id (integer)list_price_point_id (integer)When list pricing is disabled:
product_price_point_list_price_point_id: omittedproduct_price_point_list_price_point_handle: omittedlist_price_point_id: omittedThis functionality is supported in the API, but is not currently supported in SDKs.
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.
Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See product options for more information. See the Payments Profile endpoint for details on payment parameters. See the Subscription Signups article for more information on working with subscriptions in Advanced Billing.
Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See product options for more information. See the Payments Profile endpoint for details on payment parameters.
Do not use real card information for testing. See the Sites articles that cover testing your site setup for more details on testing in your sandbox.
Note that collecting and sending raw card details in production requires PCI compliance on your end. If your business is not PCI compliant, use Maxio.js (formerly Chargify.js) to collect credit card or bank account information.
When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication.
See the 3D Secure Post-Authentication Flow article in the product documentation to learn how to manage the redirect flow.
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
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "subscription": { "product_handle": "basic", "payment_collection_method": "remittance", "customer_attributes": { "first_name": "Joe", "last_name": "Smith", "email": "joe@example.com", "organization": "Acme", "reference": "XYZ", "address": "123 Mass Ave.", "address_2": null, "city": "Boston", "state": "MA", "zip": "02120", "country": "US", "phone": "(617) 111 - 0000" } }}'