Updates one or more attributes of a subscription.
Change the card that your subscriber uses for their subscription. You can also use this method to change the expiration date of the card if your gateway allows.
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 Chargify.js to collect credit card or bank account information.
Note: Partial card updates for Authorize.Net are not allowed via this endpoint. The existing Payment Profile must be directly updated instead.
You also use this method to change the subscription to a different product by setting a new value for product_handle. A product change can be done in two different ways, product change or delayed product change.
You can change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you require complex product changes or prorated upgrades and downgrades instead, please see the documentation on Migrating Subscription Products.
To perform a product change, set either the product_handle or product_id attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either product_price_point_id or product_price_point_handle - otherwise the new product's default price point is used.
This method also changes the product and/or price point, and the new payment amount is calculated and charged at the normal start of the next period.
This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a delayed product change, set the product_handle attribute as you would in a regular product change, but also set the product_change_delayed attribute to true. No proration applies in this case.
You can also perform a delayed change to the price point by passing in either product_price_point_id or product_price_point_handle
Note: To cancel a delayed product change, set
next_product_idto an empty string.
You can update dates for a subscription.
Send the next_billing_at to set the next billing date for the subscription. After that date passes and the subscription is processed, the following billing date will be set according to the subscription's product period.
Note: If you pass an invalid date, the correct date is automatically set to the correct date. For example, if February 30 is passed, the next billing would be set to March 2nd in a non-leap year.
The server response will not return data under the key/value pair of next_billing_at. View the key/value pair of current_period_ends_at to verify that the next_billing_at date has been changed successfully.
For a subscription using Calendar Billing, setting the next billing date is a bit different. Send the snap_day attribute to change the calendar billing date for a subscription using a product eligible for calendar billing.
Note: If you change the product associated with a subscription that contains a
snap_dayand immediately READ/GET the subscription data, it will still contain the originalsnap_day. Thesnap_daywill be reset tonullon the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription.
If you have the new Catalog experience enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, product, product_price_point_id, and product_price_point_type are returned as null.
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
The Chargify id of the subscription.
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/1.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "subscription": { "next_billing_at": "2010-08-06T15:34:00Z", "payment_collection_method": "remittance" }}'