Reactivate Subscription
Reactivates a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see reactivation.
Note: The term "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.
- The response returns the subscription object in the
activeortrialingstate. - The
canceled_atandcancellation_messagefields do not have values. - The method works for "Canceled" or "Trial Ended" subscriptions.
- It will not work for items not marked as "Canceled", "Unpaid", or "Trial Ended".
Resume the current billing period for a subscription
A subscription is considered "resumable" if you are attempting to reactivate within the billing period the subscription was canceled in.
A resumed subscription's billing date remains the same as before it was canceled. In other words, it does not start a new billing period. Payment may or may not be collected for a resumed subscription, depending on whether or not the subscription had a balance when it was canceled (for example, if it was canceled because of dunning).
Consider a subscription which was created on June 1st, and would renew on July 1st. The subscription is then canceled on June 15.
If a reactivation with resume: true were attempted before what would have been the next billing date of July 1st, then Advanced Billing would resume the subscription.
If a reactivation with resume: true were attempted after what would have been the next billing date of July 1st, then Advanced Billing would not resume the subscription, and instead it would be reactivated with a new billing period.
If a reactivation with resume: false, or where 'resume' is omitted were attempted, then Advanced Billing would reactivate the subscription with a new billing period regardless of whether or not resuming the previous billing period was possible.
| Canceled | Reactivation | Resumable? |
|---|---|---|
| Jun 15 | June 28 | Yes |
| Jun 15 | July 2 | No |
Reactivation Scenarios
Reactivating Canceled Subscription While Preserving Balance
- Given you have a product that costs $20
- Given you have a canceled subscription to the $20 product
- 1 charge should exist for $20
- 1 payment should exist for $20
- When the subscription has canceled due to dunning, it retained a negative balance of $20
Results
The resulting charges upon reactivation will be:
-
1 charge for $20 for the new product
-
1 charge for $20 for the balance due
-
Total charges = $40
-
The subscription will transition to active
-
The subscription balance will be zero
Reactivating a Canceled Subscription With Coupon
- Given you have a canceled subscription
- It has no current period defined
- You have a coupon code "EARLYBIRD"
- The coupon is set to recur for 6 periods
PUT request sent to:
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?coupon_code=EARLYBIRD
Results
- The subscription will transition to active
- The subscription should have applied a coupon with code "EARLYBIRD"
Reactivating Canceled Subscription With a Trial, Without the include_trial Flag
-
Given you have a canceled subscription
-
The product associated with the subscription has a trial
-
PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json
Results
- The subscription will transition to active
Reactivating Canceled Subscription With Trial, With the include_trial Flag
-
Given you have a canceled subscription
-
The product associated with the subscription has a trial
-
Send a PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?include_trial=1
Results
- The subscription will transition to trialing
Reactivating Trial Ended Subscription
- Given you have a trial_ended subscription
- Send a PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json
Results
- The subscription will transition to active
Resuming a Canceled Subscription
- Given you have a
canceledsubscription and it is resumable - Send a PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true
Results
- The subscription will transition to active
- The next billing date should not have changed
Attempting to resume a subscription which is not resumable
- Given you have a
canceledsubscription, and it is not resumable - Send a PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true
Results
- The subscription will transition to active, with a new billing period.
Attempting to resume but not reactivate a subscription which is not resumable
- Given you have a
canceledsubscription, and it is not resumable - Send a PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume[require_resume]=true - The response status should be "422 UNPROCESSABLE ENTITY"
- The subscription should be canceled with the following response
{ "errors": ["Request was 'resume only', but this subscription cannot be resumed."] }Results
- The subscription should remain
canceled - The next billing date should not have changed
Resuming Subscription Which Was Trialing
- Given you have a
trial_endedsubscription, and it is resumable - And the subscription was canceled in the middle of a trial
- And there is still time left on the trial
- Send a PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true
Results
- The subscription will transition to trialing
- The next billing date should not have changed
Resuming Subscription Which Was trial_ended
- Given you have a
trial_endedsubscription, and it is resumable - Send a PUT request to
https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true
Results
- The subscription will transition to active
- The next billing date should not have changed
- Any product-related charges should have been collected
3D Secure (3DS) Authentication post-authentication flow
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.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Path Parameters
The Chargify id of the subscription.
Request Body
application/json
These values are only applicable to subscriptions using calendar billing.
If true is sent, the reactivated Subscription will include a trial if one is available. If false is sent, the trial period will be ignored.
If true is passed, the existing subscription balance will NOT be cleared/reset before adding the additional reactivation charges.
The coupon code to be applied during reactivation.
If true is sent, Advanced Billing will use service credits and prepayments upon reactivation. If false is sent, the service credits and prepayments will be ignored.
If true, Advanced Billing will attempt to resume the subscription's billing period. If not resumable, the subscription will be reactivated with a new billing period. If false or omitted, Advanced Billing will only attempt to reactivate the subscription with a new billing period, regardless of whether or not the subscription is resumable.
Response Body
application/json
application/json
curl -X PUT "https://example.com/subscriptions/0/reactivate.json" \ -H "Content-Type: application/json" \ -d '{ "calendar_billing": { "reactivation_charge": "prorated" }, "include_trial": true, "preserve_balance": true, "coupon_code": "10OFF", "use_credits_and_prepayments": true, "resume": true }'{ "subscription": { "id": 18220670, "state": "active", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2017-06-27T13:45:15-05:00", "created_at": "2017-06-27T13:45:13-05:00", "updated_at": "2017-06-30T09:26:50-05:00", "expires_at": null, "balance_in_cents": 10000, "current_period_ends_at": "2017-06-30T12:00:00-05:00", "next_assessment_at": "2017-06-30T12:00:00-05:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": "end", "cancellation_method": null, "current_period_started_at": "2017-06-27T13:45:13-05:00", "previous_state": "active", "signup_payment_id": 191819284, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 0, "product_price_in_cents": 0, "product_version_number": 1, "payment_type": null, "referral_code": "d3pw7f", "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, "current_billing_amount_in_cents": 10000, "customer": { "id": 17780587, "first_name": "Catie", "last_name": "Test", "organization": "Acme, Inc.", "email": "catie@example.com", "created_at": "2017-06-27T13:01:05-05:00", "updated_at": "2017-06-30T09:23:10-05:00", "reference": "123ABC", "address": "123 Anywhere Street", "address_2": "Apartment #10", "city": "Los Angeles", "state": "CA", "zip": "90210", "country": "US", "phone": "555-555-5555", "portal_invite_last_sent_at": "2017-06-27T13:45:16-05:00", "portal_invite_last_accepted_at": null, "verified": true, "portal_customer_created_at": "2017-06-27T13:01:08-05:00", "cc_emails": "support@example.com", "tax_exempt": true, "vat_number": "012345678" }, "product": { "id": 4470347, "name": "Zero Dollar Product", "handle": "zero-dollar-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-03-23T10:54:12-05:00", "updated_at": "2017-04-20T15:18:46-05:00", "price_in_cents": 0, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 997233, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null }, "public_signup_pages": [ { "id": 316810, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product" } ] } }}Update Automatic Subscription Resumption PUT
Updates the date on which a paused subscription will automatically resume. To update a subscription's resume date, use this method to change or update the `automatically_resume_at` date. ### Remove the resume date Alternatively, you can change the `automatically_resume_at` to `null` if you would like the subscription to not have a resume date.
Initiate Delayed Cancellation POST
Cancels a subscription at the end of the current billing period based on the subscription's current product. You cannot set `cancel_at_end_of_period` at subscription creation, or if the subscription is past due.