diff --git a/types/2020-03-02/BalanceTransactions.d.ts b/types/2020-03-02/BalanceTransactions.d.ts index a727b72867..607bc9f465 100644 --- a/types/2020-03-02/BalanceTransactions.d.ts +++ b/types/2020-03-02/BalanceTransactions.d.ts @@ -92,7 +92,7 @@ declare module 'stripe' { status: string; /** - * Transaction type: `adjustment`, `advance`, `advance_funding`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. + * Transaction type: `adjustment`, `advance`, `advance_funding`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. */ type: BalanceTransaction.Type; } @@ -135,6 +135,7 @@ declare module 'stripe' { | 'connect_collection_transfer' | 'issuing_authorization_hold' | 'issuing_authorization_release' + | 'issuing_dispute' | 'issuing_transaction' | 'payment' | 'payment_failure_refund' @@ -190,7 +191,7 @@ declare module 'stripe' { source?: string; /** - * Only returns transactions of the given type. One of: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. + * Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ type?: string; } diff --git a/types/2020-03-02/Charges.d.ts b/types/2020-03-02/Charges.d.ts index e3ad7c0b4e..afacc9b853 100644 --- a/types/2020-03-02/Charges.d.ts +++ b/types/2020-03-02/Charges.d.ts @@ -506,7 +506,17 @@ declare module 'stripe' { transit_number: string | null; } - interface Alipay {} + interface Alipay { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ + fingerprint: string | null; + + /** + * Transaction ID of this particular Alipay transaction. + */ + transaction_id: string | null; + } interface AuBecsDebit { /** diff --git a/types/2020-03-02/Checkout/Sessions.d.ts b/types/2020-03-02/Checkout/Sessions.d.ts index 283662be0d..a63e47c29b 100644 --- a/types/2020-03-02/Checkout/Sessions.d.ts +++ b/types/2020-03-02/Checkout/Sessions.d.ts @@ -143,12 +143,14 @@ declare module 'stripe' { custom?: DisplayItem.Custom; /** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * * Plans define the base price, currency, and billing cycle for recurring purchases of products. - * Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. * * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and plans](https://stripe.com/docs/billing/subscriptions/products-and-plans). + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/subscriptions/products-and-prices). */ plan?: Stripe.Plan; diff --git a/types/2020-03-02/InvoiceItems.d.ts b/types/2020-03-02/InvoiceItems.d.ts index a2334ab5f1..cf0a1f6fa9 100644 --- a/types/2020-03-02/InvoiceItems.d.ts +++ b/types/2020-03-02/InvoiceItems.d.ts @@ -71,7 +71,7 @@ declare module 'stripe' { /** * The price of the invoice item. */ - price?: Stripe.Price | null; + price: Stripe.Price | null; /** * Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. diff --git a/types/2020-03-02/InvoiceLineItems.d.ts b/types/2020-03-02/InvoiceLineItems.d.ts index 5cd5c8f091..bdf9d29eca 100644 --- a/types/2020-03-02/InvoiceLineItems.d.ts +++ b/types/2020-03-02/InvoiceLineItems.d.ts @@ -59,7 +59,7 @@ declare module 'stripe' { /** * The price of the line item. */ - price?: Stripe.Price | null; + price: Stripe.Price | null; /** * Whether this is a proration. diff --git a/types/2020-03-02/Invoices.d.ts b/types/2020-03-02/Invoices.d.ts index 6d47037aaf..60dc6d44d9 100644 --- a/types/2020-03-02/Invoices.d.ts +++ b/types/2020-03-02/Invoices.d.ts @@ -473,6 +473,11 @@ declare module 'stripe' { } interface TransferData { + /** + * The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + */ + amount: number | null; + /** * The account where funds from the payment will be transferred to upon payment success. */ @@ -608,6 +613,11 @@ declare module 'stripe' { } interface TransferData { + /** + * The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + */ + amount?: number; + /** * ID of an existing, connected Stripe account. */ @@ -720,6 +730,11 @@ declare module 'stripe' { } interface TransferData { + /** + * The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + */ + amount?: number; + /** * ID of an existing, connected Stripe account. */ @@ -1196,7 +1211,7 @@ declare module 'stripe' { list(options?: RequestOptions): ApiListPromise; /** - * Permanently deletes a draft invoice. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized, it must be [voided](https://stripe.com/docs/api#void_invoice). + * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice). */ del( id: string, diff --git a/types/2020-03-02/Issuing/Disputes.d.ts b/types/2020-03-02/Issuing/Disputes.d.ts index 6c492222e8..1835269bea 100644 --- a/types/2020-03-02/Issuing/Disputes.d.ts +++ b/types/2020-03-02/Issuing/Disputes.d.ts @@ -15,6 +15,11 @@ declare module 'stripe' { */ object: 'issuing.dispute'; + /** + * List of balance transactions associated with this dispute. + */ + balance_transactions: Array; + /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ diff --git a/types/2020-03-02/LineItems.d.ts b/types/2020-03-02/LineItems.d.ts index ec342f39b6..bc41ddae2e 100644 --- a/types/2020-03-02/LineItems.d.ts +++ b/types/2020-03-02/LineItems.d.ts @@ -36,7 +36,7 @@ declare module 'stripe' { /** * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. - * Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. * * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. * diff --git a/types/2020-03-02/Prices.d.ts b/types/2020-03-02/Prices.d.ts index 0a19b41d87..b7a81e68ba 100644 --- a/types/2020-03-02/Prices.d.ts +++ b/types/2020-03-02/Prices.d.ts @@ -59,7 +59,7 @@ declare module 'stripe' { /** * The ID of the product this price is associated with. */ - product: string | Stripe.Product; + product: string | Stripe.Product | Stripe.DeletedProduct; /** * The recurring components of a price such as `interval` and `usage_type`. diff --git a/types/2020-03-02/Products.d.ts b/types/2020-03-02/Products.d.ts index 82ec74054b..817400c0f9 100644 --- a/types/2020-03-02/Products.d.ts +++ b/types/2020-03-02/Products.d.ts @@ -446,7 +446,7 @@ declare module 'stripe' { list(options?: RequestOptions): ApiListPromise; /** - * Delete a product. Deleting a product with type=good is only possible if it has no SKUs associated with it. Deleting a product with type=service is only possible if it has no plans associated with it. + * Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. */ del( id: string, diff --git a/types/2020-03-02/Reporting/ReportRuns.d.ts b/types/2020-03-02/Reporting/ReportRuns.d.ts index da03a0c571..39b3df9812 100644 --- a/types/2020-03-02/Reporting/ReportRuns.d.ts +++ b/types/2020-03-02/Reporting/ReportRuns.d.ts @@ -179,6 +179,7 @@ declare module 'stripe' { | 'financing_payout_reversal' | 'issuing_authorization_hold' | 'issuing_authorization_release' + | 'issuing_dispute' | 'issuing_transaction' | 'network_cost' | 'other_adjustment' diff --git a/types/2020-03-02/SubscriptionItems.d.ts b/types/2020-03-02/SubscriptionItems.d.ts index ca641eeee3..fbf7212080 100644 --- a/types/2020-03-02/SubscriptionItems.d.ts +++ b/types/2020-03-02/SubscriptionItems.d.ts @@ -32,24 +32,26 @@ declare module 'stripe' { metadata: Metadata; /** + * You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * * Plans define the base price, currency, and billing cycle for recurring purchases of products. - * Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. * * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and plans](https://stripe.com/docs/billing/subscriptions/products-and-plans). + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/subscriptions/products-and-prices). */ plan: Stripe.Plan; /** * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. - * Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. * * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. * * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/billing/prices-guide). */ - price?: Stripe.Price; + price: Stripe.Price; /** * The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. diff --git a/types/2020-03-02/SubscriptionSchedules.d.ts b/types/2020-03-02/SubscriptionSchedules.d.ts index 9d560ca9a7..5d22b7916f 100644 --- a/types/2020-03-02/SubscriptionSchedules.d.ts +++ b/types/2020-03-02/SubscriptionSchedules.d.ts @@ -143,7 +143,10 @@ declare module 'stripe' { type EndBehavior = 'cancel' | 'none' | 'release' | 'renew'; interface Phase { - add_invoice_items?: Array; + /** + * A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. + */ + add_invoice_items: Array; /** * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. @@ -218,6 +221,9 @@ declare module 'stripe' { */ price: string | Stripe.Price | Stripe.DeletedPrice; + /** + * The quantity of the invoice item. + */ quantity: number | null; } @@ -256,7 +262,7 @@ declare module 'stripe' { /** * ID of the price to which the customer should be subscribed. */ - price?: string | Stripe.Price | Stripe.DeletedPrice; + price: string | Stripe.Price | Stripe.DeletedPrice; /** * Quantity of the plan to which the customer should be subscribed. diff --git a/types/2020-03-02/Subscriptions.d.ts b/types/2020-03-02/Subscriptions.d.ts index 8b27bd3552..4d45a1fd15 100644 --- a/types/2020-03-02/Subscriptions.d.ts +++ b/types/2020-03-02/Subscriptions.d.ts @@ -282,6 +282,11 @@ declare module 'stripe' { | 'unpaid'; interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent: number | null; + /** * The account where funds from the payment will be transferred to upon payment success. */ @@ -603,6 +608,11 @@ declare module 'stripe' { type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none'; interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent?: number; + /** * ID of an existing, connected Stripe account. */ @@ -961,6 +971,11 @@ declare module 'stripe' { type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none'; interface TransferData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + */ + amount_percent?: number; + /** * ID of an existing, connected Stripe account. */ diff --git a/types/2020-03-02/WebhookEndpoints.d.ts b/types/2020-03-02/WebhookEndpoints.d.ts index b584f08f51..8cffc47466 100644 --- a/types/2020-03-02/WebhookEndpoints.d.ts +++ b/types/2020-03-02/WebhookEndpoints.d.ts @@ -325,6 +325,9 @@ declare module 'stripe' { | 'plan.created' | 'plan.deleted' | 'plan.updated' + | 'price.created' + | 'price.deleted' + | 'price.updated' | 'product.created' | 'product.deleted' | 'product.updated' @@ -517,6 +520,9 @@ declare module 'stripe' { | 'plan.created' | 'plan.deleted' | 'plan.updated' + | 'price.created' + | 'price.deleted' + | 'price.updated' | 'product.created' | 'product.deleted' | 'product.updated'