# Reactivate a subscription

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


[Idempotency Supported](/docs/api/v2/pcv-1/idempotency)

**Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started) and pass it as input parameter to this API.

This API is used to reactivate a **cancelled** subscription. You may also optionally specify a trial end date, to move the subscription to **In Trial** state. If trial end is not specified, the subscription will be activated and any applicable charges will be initiated.

Unless the billing cycle is specified, it will be set to plan's default billing cycle.

During an in-term reactivation++, unless the billing cycle is specified, the subscription's remaining billing cycles will be restored. If a trial end date is specified, then the plan's default billing cycle is used.

**What is an "in-term reactivation"?**  
An "in-term reactivation" happens when the billing term of the subscription is retained upon cancellation and reactivation is initiated within that term.

**When is the 'billing term' retained for a cancelled subscription?**  
When dunning (payment failure retry settings) is configured with the last retry configured as

-   cancel subscription and mark invoice as 'Not Paid', or
-   cancel subscription and mark the invoice as 'Voided' and the case if any of the current term invoices is partially or fully paid, the invoice is not voided but instead Chargebee marks the invoices as 'Not Paid'.

**Note :** In both cases, the billing term is retained and upon reactivation the subscription will be moved to active state (if the plan does not have a trial period) and no invoice will be generated. Ensure that you collect any unpaid invoices.

**Example :** A Subscription was billed from 1st to 31st of a month and it was cancelled on the 20th due to one of the above cases (billing term is not reset). If the reactivation happens on 25th then it is considered an in-term reactivation.

Reactivation of a subscription in **non\_renewing** state has been deprecated. To remove a scheduled cancellation of a **non\_renewing** Subscription, use [Remove Scheduled Cancellation](/docs/api/subscriptions/remove-scheduled-cancellation) API. However, if you use reactivate API to remove scheduled cancellation for a **non\_renewing** Subscription, then the status will be set to **active** and the billing cycle will be set to forever. If any value is passed for trial\_end or billing cycle, an error will be thrown. If an invoice gets generated during this operation, available Credits and Excess Payments will be automatically applied. **Additional Error Scenarios:** If there is a need to create an immediate charge and the collection fails, an error will be thrown.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/subscriptions/__test__KyVnHhSBWkrVS2Wn/reactivate \
     -u {site_api_key}:\
     -d invoice_immediately="true" \
     -d billing_cycles=4
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Subscription.Reactivate("__test__KyVnHhSBWkrVS2Wn")
		.InvoiceImmediately(true)
		.BillingCycles(4)
		.Request();

Subscription subscription = result.Subscription;
Customer customer = result.Customer;
Card card = result.Card;
Invoice invoice = result.Invoice;
List<UnbilledCharge> unbilledCharges = result.UnbilledCharges;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    subscriptionAction "github.com/chargebee/chargebee-go/v3/actions/subscription"
    "github.com/chargebee/chargebee-go/v3/models/subscription"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := subscriptionAction.Reactivate("__test__KyVnHhSBWkrVS2Wn", &subscription.ReactivateRequestParams{
        InvoiceImmediately : chargebee.Bool(true),
        BillingCycles : chargebee.Int32(4),
    }).Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Subscription := res.Subscription
        Customer := res.Customer
        Card := res.Card
        Invoice := res.Invoice
        UnbilledCharges := res.UnbilledCharges
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.SubscriptionReactivateRequest{
    InvoiceImmediately : chargebee.Bool(true),
    BillingCycles : chargebee.Int32(4),
}
  res, err := client.Subscription.Reactivate("__test__KyVnHhSBWkrVS2Wn", req)
      if err != nil {
        fmt.Println(err)
    } else {
        Subscription := res.Subscription
        Customer := res.Customer
        Card := res.Card
        Invoice := res.Invoice
        UnbilledCharges := res.UnbilledCharges
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;
import java.util.List;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = Subscription.reactivate("__test__KyVnHhSBWkrVS2Wn")
            .invoiceImmediately(true)
            .billingCycles(4)
            .request();

        Subscription subscription = result.subscription();
        Customer customer = result.customer();
        Card card = result.card();
        Invoice invoice = result.invoice();
        List<UnbilledCharge> unbilledCharges = result.unbilledCharges();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.card.Card;
import com.chargebee.v4.models.customer.Customer;
import com.chargebee.v4.models.invoice.Invoice;
import com.chargebee.v4.models.subscription.Subscription;
import com.chargebee.v4.models.subscription.params.SubscriptionReactivateParams;
import com.chargebee.v4.models.subscription.responses.SubscriptionReactivateResponse;
import com.chargebee.v4.models.unbilledCharge.UnbilledCharge;
import java.util.List;

public class SubscriptionReactivate {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        SubscriptionReactivateParams params = SubscriptionReactivateParams.builder()
            .invoiceImmediately(true)
            .billingCycles(4)
            .build();

        SubscriptionReactivateResponse response = client
            .subscriptions()
            .reactivate("__test__KyVnHhSBWkrVS2Wn", params);

        Subscription subscription = response.getSubscription();
        Customer customer = response.getCustomer();
        Card card = response.getCard();
        Invoice invoice = response.getInvoice();
        List<UnbilledCharge> unbilledCharges = response.getUnbilledCharges();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.subscription.reactivate("__test__KyVnHhSBWkrVS2Wn", {
        invoice_immediately: true,
        billing_cycles: 4
    });

    console.log(result);
    const subscription = result.subscription;
    const customer = result.customer;
    const card = result.card;
    const invoice = result.invoice;
    const unbilledCharges = result.unbilled_charges;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->subscription()->reactivate("__test__KyVnHhSBWkrVS2Wn", [
    "invoice_immediately" => true,
    "billing_cycles" => 4
]);
$subscription = $result->subscription;
$customer = $result->customer;
$card = $result->card;
$invoice = $result->invoice;
$unbilledCharges = $result->unbilled_charges;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Subscription.reactivate("__test__KyVnHhSBWkrVS2Wn",
    cb_client.Subscription.ReactivateParams(
        invoice_immediately=True,
        billing_cycles=4
    )
)
subscription = response.subscription
customer = response.customer
card = response.card
invoice = response.invoice
unbilled_charges = response.unbilled_charges
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::Subscription.reactivate("__test__KyVnHhSBWkrVS2Wn",{
  :invoice_immediately => "true",
  :billing_cycles => 4
})

subscription = result.subscription
customer = result.customer
card = result.card
invoice = result.invoice
unbilled_charges = result.unbilled_charges
```

## Sample Response

```json
{
  "customer": {
    "allow_direct_debit": false,
    "auto_collection": "off",
    "card_status": "no_card",
    "created_at": 1517505669,
    "deleted": false,
    "excess_payments": 0,
    "id": "__test__KyVnHhSBWkrVS2Wn",
    "net_term_days": 0,
    "object": "customer",
    "pii_cleared": "active",
    "preferred_currency_code": "USD",
    "promotional_credits": 0,
    "refundable_credits": 0,
    "resource_version": 1517505669000,
    "taxability": "taxable",
    "unbilled_charges": 0,
    "updated_at": 1517505669
  },
  "invoice": {
    "adjustment_credit_notes": {},
    "amount_adjusted": 0,
    "amount_due": 895,
    "amount_paid": 0,
    "amount_to_collect": 895,
    "applied_credits": {},
    "base_currency_code": "USD",
    "credits_applied": 0,
    "currency_code": "USD",
    "customer_id": "__test__KyVnHhSBWkrVS2Wn",
    "date": 1517505669,
    "deleted": false,
    "due_date": 1517505669,
    "dunning_attempts": {},
    "exchange_rate": 1,
    "first_invoice": false,
    "has_advance_charges": false,
    "id": "__demo_inv__23",
    "is_gifted": false,
    "issued_credit_notes": {},
    "line_items": [
      {
        "amount": 895,
        "customer_id": "__test__KyVnHhSBWkrVS2Wn",
        "date_from": 1517505669,
        "date_to": 1519924869,
        "description": "No Trial",
        "discount_amount": 0,
        "entity_id": "no_trial",
        "entity_type": "plan",
        "id": "li___test__KyVnHhSBWkrbQ2Ww",
        "is_taxed": false,
        "item_level_discount_amount": 0,
        "object": "line_item",
        "pricing_model": "per_unit",
        "quantity": 1,
        "subscription_id": "__test__KyVnHhSBWkrVS2Wn",
        "tax_amount": 0,
        "tax_exempt_reason": "tax_not_configured",
        "unit_amount": 895
      },
      {..}
    ],
    "linked_orders": {},
    "linked_payments": {},
    "net_term_days": 0,
    "object": "invoice",
    "price_type": "tax_exclusive",
    "recurring": true,
    "resource_version": 1517505669000,
    "round_off_amount": 0,
    "status": "payment_due",
    "sub_total": 895,
    "subscription_id": "__test__KyVnHhSBWkrVS2Wn",
    "tax": 0,
    "term_finalized": true,
    "total": 895,
    "updated_at": 1517505669,
    "write_off_amount": 0
  },
  "subscription": {
    "activated_at": 1517505669,
    "billing_period": 1,
    "billing_period_unit": "month",
    "created_at": 1517505669,
    "currency_code": "USD",
    "current_term_end": 1519924869,
    "current_term_start": 1517505669,
    "customer_id": "__test__KyVnHhSBWkrVS2Wn",
    "deleted": false,
    "due_invoices_count": 2,
    "due_since": 1517505669,
    "has_scheduled_changes": false,
    "id": "__test__KyVnHhSBWkrVS2Wn",
    "mrr": 0,
    "next_billing_at": 1519924869,
    "object": "subscription",
    "plan_amount": 895,
    "plan_free_quantity": 0,
    "plan_id": "no_trial",
    "plan_quantity": 1,
    "plan_unit_price": 895,
    "remaining_billing_cycles": 3,
    "resource_version": 1517505669000,
    "started_at": 1517505669,
    "status": "active",
    "total_dues": 1790,
    "updated_at": 1517505669
  }
}
```

## URL Format

**POST** https://[site].chargebee.com/api/v2/subscriptions/{subscription-id}/reactivate

## Input Parameters

- `trial_end` (optional, timestamp(UTC) in seconds)
  Providing this parameter indicates that the subscription reactivates with an `in_trial` `status` and the trial period ends at the date provided. The value must not be earlier than `reactivate_from`. Note: This parameter can be backdated (set to a value in the past) only when `reactivate_from` has been backdated. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end` is backdated, the subscription immediately goes into `active` or `non_renewing` status.

- `billing_cycles` (optional, integer, min=0)
  Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.

- `reactivate_from` (optional, timestamp(UTC) in seconds)
  The date/time at which the subscription was reactivated. When not provided, the subscription is reactivated immediately on calling this API. The value of this parameter must always be in the past (backdating). Do this when the subscription has already been reactivated and the billing has been delayed. The following prerequisites must be met for this parameter to be passed:
  
  -   The backdating feature has been enabled for subscription reactivation operations.
  -   The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is the day of the month by which the accounting for the previous month must be closed.
  -   The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `reactivate_from` cannot be earlier than 14th February. .

- `invoice_immediately` (optional, boolean)
  If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration) .
  
  **Note:** `invoice_immediately` only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.
  
  .

- `billing_alignment_mode` (optional, enumerated string)
  Applicable when calendar billing is enabled and a new _active_ term gets started during this operation. Unless specified the configured _default_ value will be used.
  Possible enum values:
    - `immediate`
      Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..
    - `delayed`
      Subscription period will be aligned with the configured billing date at the next renewal.

- `terms_to_charge` (optional, integer, min=1)
  The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset.

- `invoice_date` (optional, timestamp(UTC) in seconds)
  The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is `true` , and if the site is configured to set invoice dates to the date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met:
  
  -   `invoice_date` must be in the past.
  -   `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.
  -   It is not earlier than `reactivate_from` or `trial_end`.
  -   `invoice_immediately` is `true`. .

- `contract_term_billing_cycle_on_renewal` (optional, integer, min=1, max=100)
  Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms) .

- `payment_initiator` (optional, enumerated string)
  The type of initiator to be used for the payment request triggered by this operation.
  Possible enum values:
    - `customer`
      Pass this value to indicate that the request is initiated by the customer
    - `merchant`
      Pass this value to indicate that the request is initiated by the merchant

- `contract_term` (optional, enumerated string)
  Parameters for contract\_term
  - `action_at_term_end` (optional, enumerated string)
    Action to be taken when the contract term completes.
    Possible enum values:
      - `renew`
        -   Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).
        -   The `action_at_term_end` for the new contract term is set to `renew`.
      - `evergreen`
        Contract term completes and the subscription renews.
      - `cancel`
        Contract term completes and subscription is canceled.
  - `cancellation_cutoff_period` (optional, integer, default=0)
    The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end) , during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.

- `statement_descriptor` (optional, string)
  Parameters for statement\_descriptor
  - `descriptor` (optional, string, max chars=65k)
    Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the [transaction descriptor](https://www.chargebee.com/docs/1.0/transaction_descriptors.html) text configured in the Chargebee site for all the subscription renewal transactions.

- `payment_intent` (optional, string)
  Parameters for payment\_intent
  - `id` (optional, string, max chars=150)
    Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.
  - `gateway_account_id` (required if payment intent token provided, string, max chars=50)
    The gateway account used for performing the 3DS flow.
  - `gw_token` (optional, string, max chars=65k)
    Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments) to find out the gateway-specific gw\_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.
  - `payment_method_type` (optional, enumerated string)
    The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.
    Possible enum values:
      - `card`
        card
      - `ideal`
        ideal
      - `sofort`
        sofort
      - `bancontact`
        bancontact
      - `google_pay`
        google\_pay
      - `dotpay`
        dotpay
      - `giropay`
        giropay
      - `apple_pay`
        apple\_pay
      - `upi`
        upi
      - `netbanking_emandates`
        netbanking\_emandates
      - `paypal_express_checkout`
        paypal\_express\_checkout
      - `direct_debit`
        direct\_debit
      - `boleto`
        boleto
      - `venmo`
        Venmo
      - `amazon_payments`
        Amazon Payments
      - `pay_to`
        PayTo
      - `faster_payments`
        Faster Payments
      - `sepa_instant_transfer`
        Sepa Instant Transfer
      - `klarna_pay_now`
        Klarna Pay Now
      - `online_banking_poland`
        Online Banking Poland
      - `payconiq_by_bancontact`
        Payments made via Payconiq by Bancontact.
      - `electronic_payment_standard`
        Electronic Payment Standard
      - `kbc_payment_button`
        KBC Payment Button
      - `pay_by_bank`
        Pay By Bank
      - `trustly`
        Trustly
      - `stablecoin`
        Payments made via Stablecoin.
      - `kakao_pay`
        Payments made via Kakao Pay.
      - `naver_pay`
        Payments made via Naver Pay.
      - `revolut_pay`
        Payments made via Revolut Pay.
      - `cash_app_pay`
        Payments made via Cash App Pay.
      - `wechat_pay`
        Payments made via WeChat Pay.
      - `alipay`
        Payments made via Alipay.
      - `twint`
        Payments made via Twint
      - `go_pay`
        Payments made via GoPay
      - `grab_pay`
        Payments made via GrabPay
      - `pay_co`
        Payments made via PayCo
      - `after_pay`
        Payments made via Afterpay
      - `swish`
        Payments made via Swish
      - `payme`
        Payments made via PayMe
      - `pix`
        Pix
      - `klarna`
        Payments made via Klarna.
      - `alipay_hk`
        Payments made via Alipay HK.
      - `paypay`
        PayPay
      - `gcash`
        Payments made via GCash.
      - `south_korean_cards`
        Payments made via South Korean Cards
      - `paynow`
      - `bizum`
      - `promptpay`
      - `dana`
        Payments made via Dana.
      - `touch_n_go`
        Payments made via Touch 'n Go.
      - `tamara`
        Payments made via Tamara.
      - `qpay`
        Payments made via Qpay.
      - `ovo`
      - `momo`
      - `mercado_pago`
      - `nequi`
      - `nupay`
      - `picpay`
      - `thai_qr`
      - `blik`
      - `fpx`
      - `wero`
      - `p24`
      - `affirm_pay`
      - `rakuten_pay`
  - `reference_id` (optional, string, max chars=65k)
    Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.
  - `additional_information` (optional, jsonobject)
    -   `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).
        
        -   `payer`: User related information.
            -   `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
            -   `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
    -   `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
    -   `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
            -   `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
    -   `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
    -   `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
    -   `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.
        
        -   `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.
    -   `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.
        
        -   `payer`: User related information.
            -   `document`: Document is the user's identification number based on their country.
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device

## Returns

- `subscription` (Subscription object)
  Resource object representing subscription

- `customer` (Customer object)
  Resource object representing customer

- `card` (Card object)
  Resource object representing card

- `invoice` (Invoice object)
  Resource object representing invoice

- `unbilled_charges` (optional)
  Resource object representing unbilled\_charge
