---
title: Subscription - Stripe
slug: payments/subscription-stripe
description: Learn how to create a subscription in Stripe with this comprehensive guide. Discover the required properties, including collectionMethod, items, processorCustomerId, and processorId, as well as optional properties such as backDateStartDate, billingCycleAn
docTags: 
createdAt: 2023-05-17T05:24:14.000Z
---

To create a Subscription in Stripe, the following properties can be provided. Those marked with <font color="#eb144c">*</font> are required.

### Subscription

| **Field Name**                                    | **Data Type**                                | **Description**                                                                                                                                                                                                                  |
| ------------------------------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| collectionMethod<font color="#eb144c">*</font>    | String                                       | Either 'send\_invoice' or 'charge\_automatically'                                                                                                                                                                                |
| items<font color="#eb144c">*</font>               | List [(items)](docId:84-r8gPYvREC2g6KTBVyE)  | At least one line item is required to create a Subscription.                                                                                                                                                                     |
| processorCustomerId<font color="#eb144c">*</font> | String                                       | Customer Id in the Processor [(Find this)](docId\:F3Cm5zoC-AUraeoAn2Xb1)                                                                                                                                                         |
| processorId<font color="#eb144c">*</font>         | String                                       | Id of the connected Stripe processor                                                                                                                                                                                             |
| backDateStartDate                                 | DateTime                                     | A past timestamp to backdate the subscription’s start date to.                                                                                                                                                                   |
| billingCycleAnchor                                | DateTime                                     | A future timestamp to anchor the subscription’s billing cycle.                                                                                                                                                                   |
| cancelAt                                          | DateTime                                     | A timestamp at which the subscription should cancel.                                                                                                                                                                             |
| cancelAtPeriodEnd                                 | Boolean                                      | Indicates whether the subscription should cancel at the end of the current period.                                                                                                                                               |
| coupon                                            | couponString                                 | Coupon Id in the Processor                                                                                                                                                                                                       |
| createdDateInProcessor                            | DateTime                                     | readOnly field                                                                                                                                                                                                                   |
| currentPeriodEndDate                              | DateTime                                     | readOnly field                                                                                                                                                                                                                   |
| currentPeriodStartDate                            | DateTime                                     | readOnly field                                                                                                                                                                                                                   |
| daysUntilDue                                      | Integer                                      | Conditionally required. Passed if collectionMethod is send\_invoice, by default it will be 30 days.                                                                                                                              |
| description                                       | String                                       | The subscription’s description, meant to be displayable to the customer.                                                                                                                                                         |
| latestInvoice                                     | String                                       | readOnly field                                                                                                                                                                                                                   |
| procesorSubscriptionId                            | String                                       | readOnly field                                                                                                                                                                                                                   |
| processorOrgId                                    | String                                       | readOnly field                                                                                                                                                                                                                   |
| processorPaymentMethodId                          | String                                       | Passed if collectionMethod is charge\_automatically.<br />If not set, invoices will use the customer’s default\_source.<br />[(Find this)](docId\:F3Cm5zoC-AUraeoAn2Xb1)                                                         |
| promotionCode                                     | String                                       | The API ID of a promotion code to apply to this subscription                                                                                                                                                                     |
| prorationBehavior                                 |                                              | Determines how to handle prorations resulting from the billingCycleAnchor. The default is create\_prorations.                                                                                                                    |
| salesforceAccount                                 | String                                       | readOnly field                                                                                                                                                                                                                   |
| salesforceContact                                 | String                                       | readOnly field                                                                                                                                                                                                                   |
| salesforceCustomerId                              | String                                       | readOnly field                                                                                                                                                                                                                   |
| salesforceId                                      |                                              |                                                                                                                                                                                                                                  |
| startDate                                         | DateTime                                     | Used in case of Subscription Schedule creation. It indicates when the subscription schedule starts.                                                                                                                              |
| status                                            | String                                       | readOnly field                                                                                                                                                                                                                   |
| trialEnd                                          | DateTime                                     | The end of the trial period the customer will get before being charged for the first time.                                                                                                                                       |
| trialFromPlan                                     | Boolean                                      | Indicates if a plan’s trial period days should be applied to the subscription. Setting trialEnd per subscription is preferred, and this defaults to false.<br />Setting this flag to true together with trialEnd is not allowed. |
| trialPeriodDays                                   | Integer                                      | Free trail days                                                                                                                                                                                                                  |

### Items

| **Field Name**                                 | **Data Type** | **Description**                                                                                                               |
| ---------------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| processorPriceId<font color="#eb144c">*</font> | String        | Id of the specific /Price that is getting added to the Subscription. Note: this is the Id in the Processor not in Salesforce. |
| quantity<font color="#eb144c">*</font>         | Integer       | Quantity of items in Subscription                                                                                             |
| amount                                         | Decimal       | readOnly field                                                                                                                |
| chargeCurrency                                 | String        | readOnly field                                                                                                                |
| description                                    | String        | readOnly field                                                                                                                |
| invoice                                        | String        | readOnly field                                                                                                                |
| name                                           | String        | readOnly field                                                                                                                |
| procesorSubscriptionId                         | String        | readOnly field                                                                                                                |
| salesforceId                                   | String        | readOnly field                                                                                                                |
| salesforcePriceId                              | String        | readOnly field                                                                                                                |
| salesforceSubscriptionId                       | String        | readOnly field                                                                                                                |
| unitAmount                                     | Decimal       | readOnly field                                                                                                                |
| unitAmountDecimal                              | Decimal       | readOnly field                                                                                                                |

