POST
stripe_invoices_create.py
from charter.packs import stripe
result = await stripe.invoices_create.ainvoke({"customer": ...})
Body
| Field | Type | Description |
|---|---|---|
description | string | An arbitrary string attached to the invoice. Shown as the memo in the Dashboard. |
metadata | map of string | Set of key-value pairs attached to the invoice. |
autoAdvance | boolean | Whether Stripe collects the invoice automatically. False leaves the invoice where it is until you act on it. |
collectionMethod | CollectionMethod | How to collect payment. Absent, Stripe charges the customer’s default payment method. |
daysUntilDue | integer | Days until the invoice is due. Valid only when collection_method is ‘send_invoice’. ≥ 0 |
dueDate | integer | Unix timestamp when payment is due. Valid only when collection_method is ‘send_invoice’. Seconds, not milliseconds: 1700000000, not 1700000000000. |
defaultPaymentMethod | string | The payment method to charge. It must belong to the invoice’s customer. |
footer | string | Footer text displayed on the invoice. |
statementDescriptor | string | What the customer sees on their card statement. Must contain at least one letter. |
onBehalfOf | string | The connected account the funds are intended for. Its branding and support information appear on the invoice. |
customer * | string | The ID of the customer to bill. |
currency | string | Three-letter lowercase ISO currency code. Absent, the customer’s currency. |
subscription | string | Bill this subscription. The invoice then includes only that subscription’s pending items, and its billing cycle is untouched. |
pendingInvoiceItemsBehavior | PendingInvoiceItemsBehavior | Whether to pull the customer’s pending invoice items onto this invoice. Absent, Stripe excludes them and the draft is empty. |
discounts | SubscriptionDiscount[] | Coupons and promotion codes to apply. Absent, the invoice inherits the customer’s discount. |