> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# subscriptions_create

> Subscribe a customer to one or more prices. `items` is required. If the first payment fails the subscription is still created, with status 'incomplete'.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://api.stripe.com/v1/subscriptions"}</code></div>

```python stripe_subscriptions_create.py theme={null}
from charter.packs import stripe

result = await stripe.subscriptions_create.ainvoke({"items": ...})
```

## Body

<div className="reference-table">
  | Field                                                         | Type                                                                                               | Description                                                                                                                                                                                                                                                       |
  | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `description`                                                 | `string`                                                                                           | An arbitrary string attached to the subscription. <span className="field-constraints">max length 500</span>                                                                                                                                                       |
  | `metadata`                                                    | map of `string`                                                                                    | Set of key-value pairs attached to the subscription.                                                                                                                                                                                                              |
  | `trialEnd`                                                    | `string` \| `integer`                                                                              | When the trial ends: the string 'now' to end it immediately, or a Unix timestamp at most two years out. Overrides any trial the plan defines. A timestamp is seconds, not milliseconds: 1700000000, not 1700000000000.                                            |
  | `cancelAt`                                                    | `integer` \| [CancelAtSentinel](/charter/charter/packs/stripe/subscriptions/objects#cancelatsentinel)      | When to cancel: a Unix timestamp, or one of 'max\_billed\_until', 'max\_period\_end', 'min\_period\_end'. A timestamp before the current period ends prorates if prorations are enabled. A timestamp is seconds, not milliseconds: 1700000000, not 1700000000000. |
  | `collectionMethod`                                            | [CollectionMethod](/charter/charter/packs/stripe/subscriptions/objects#collectionmethod)                   | How to collect payment. Absent, Stripe charges automatically.                                                                                                                                                                                                     |
  | `daysUntilDue`                                                | `integer`                                                                                          | Days until an invoice is due. Valid only when collection\_method is 'send\_invoice'. <span className="field-constraints">≥ 0</span>                                                                                                                               |
  | `defaultPaymentMethod`                                        | `string`                                                                                           | The payment method to charge. It must already belong to this subscription's customer.                                                                                                                                                                             |
  | `customer`                                                    | `string`                                                                                           | The ID of the customer to subscribe.                                                                                                                                                                                                                              |
  | `items` <span className="required" title="required">\*</span> | [SubscriptionItemCreate](/charter/charter/packs/stripe/subscriptions/objects#subscriptionitemcreate)\[]    | The prices the customer is subscribing to, up to 20. <span className="field-constraints">max 20 items</span>                                                                                                                                                      |
  | `currency`                                                    | `string`                                                                                           | Three-letter lowercase ISO currency code.                                                                                                                                                                                                                         |
  | `trialPeriodDays`                                             | `integer`                                                                                          | Length of the trial in days. Overrides any trial the plan defines. <span className="field-constraints">≥ 0</span>                                                                                                                                                 |
  | `cancelAtPeriodEnd`                                           | `boolean`                                                                                          | Whether to cancel at the end of the current period. Absent, Stripe does not schedule a cancellation.                                                                                                                                                              |
  | `prorationBehavior`                                           | [ProrationBehaviorOnCreate](/charter/charter/packs/stripe/subscriptions/objects#prorationbehavioroncreate) | How to handle prorations. Absent, Stripe creates them. 'always\_invoice' is not accepted on creation.                                                                                                                                                             |
  | `paymentBehavior`                                             | [PaymentBehaviorOnCreate](/charter/charter/packs/stripe/subscriptions/objects#paymentbehavioroncreate)     | What to do if the first payment fails. Absent, Stripe allows the subscription to be created incomplete. 'pending\_if\_incomplete' is not accepted on creation.                                                                                                    |
  | `discounts`                                                   | [SubscriptionDiscount](/charter/charter/packs/stripe/subscriptions/objects#subscriptiondiscount)\[]        | Coupons and promotion codes to apply. Absent, the subscription inherits the customer's discount.                                                                                                                                                                  |
</div>
