Subscription - Stripe
To create a Subscription in Stripe, the following properties can be provided. Those marked with * are required.
Field Name | Data Type | Description |
---|---|---|
collectionMethod* | String | Either 'send_invoice' or 'charge_automatically' |
items* | List (items) | At least one line item is required to create a Subscription. |
processorCustomerId* | String | Customer Id in the Processor (Find this) |
processorId* | 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. If not set, invoices will use the customer’s default_source. |
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. Setting this flag to true together with trialEnd is not allowed. |
trialPeriodDays | Integer | Free trail days |
Field Name | Data Type | Description |
---|---|---|
processorPriceId* | 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* | 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 |