mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add support for pay_immediately=false when creating Stripe subscriptions (#36129)
This commit is contained in:
parent
eb04955276
commit
6e43367819
8
types/stripe/index.d.ts
vendored
8
types/stripe/index.d.ts
vendored
@ -6053,6 +6053,14 @@ declare namespace Stripe {
|
||||
* the anchor date. If false, the anchor period will be free (similar to a trial).
|
||||
*/
|
||||
prorate?: boolean;
|
||||
|
||||
/**
|
||||
* Boolean (default true). Used to prevent Stripe Invoicing from automatically paying the subscription on creation. This can be set
|
||||
* to false when used with services like Avalara that need to augment an invoice before the subscription is paid.
|
||||
*
|
||||
* Using this flag requires contacting Stripe support in order to have the account whitelisted.
|
||||
*/
|
||||
pay_immediately?: boolean;
|
||||
}
|
||||
|
||||
interface ISubscriptionCreationOptions extends ISubscriptionCustCreationOptions {
|
||||
|
||||
@ -480,6 +480,14 @@ stripe.customers.createSource(
|
||||
}
|
||||
);
|
||||
|
||||
stripe.customers.createSubscription(
|
||||
"cus_5rfJKDJkuxzh5Q",
|
||||
{
|
||||
items: [{plan: "some_plan", quantity: 2}],
|
||||
pay_immediately: false
|
||||
}
|
||||
);
|
||||
|
||||
stripe.customers.retrieveCard(
|
||||
"cus_5rfJKDJkuxzh5Q",
|
||||
"card_15fvyXEe31JkLCeQ9KMktP5S",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user