Sets certain subscription fields that are usually managed automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint.
This endpoint is provided for cases where you need to “align” Advanced Billing data with data that happened in your system, perhaps before you started using Advanced Billing. For example, you may choose to import your historical subscription data, and would like the activation and cancellation dates in Advanced Billing to match your existing historical dates. Advanced Billing does not backfill historical events (i.e. from the Events API), but some static data can be changed via this API.
Why are some fields only settable from this endpoint, and not the normal subscription create and update endpoints? Because we want users of this endpoint to be aware that these fields are usually managed by Advanced Billing, and using this API means you are stepping out on your own.
Changing these fields will not affect any other attributes. For example, adding an expiration date will not affect the next assessment date on the subscription.
If you regularly need to override the current_period_starts_at for new subscriptions, this can also be accomplished by setting both previous_billing_at and next_billing_at at subscription creation. See the documentation on Importing Subscriptions for more information.
When passing current_period_starts_at some validations are made:
If unpermitted parameters are sent, a 400 HTTP response is sent along with a string giving the reason for the problem.
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
Only these fields are available to be set.
TypeScript Definitions
Use the request body type in TypeScript.
application/json
curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/1/override.json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "subscription": { "activated_at": "1999-12-01T10:28:34-05:00", "canceled_at": "2000-12-31T10:28:34-05:00", "cancellation_message": "Original cancellation in 2000", "expires_at": "2001-07-15T10:28:34-05:00" }}'