Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1151

Merged
merged 1 commit into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ declare module 'stripe' {

namespace PaymentMethodOptions {
interface AcssDebit {
currency?: string;

mandate_options?: AcssDebit.MandateOptions;

/**
* Bank account verification method.
*/
verification_method?: AcssDebit.VerificationMethod;

currency?: string;
}

namespace AcssDebit {
Expand Down
27 changes: 26 additions & 1 deletion types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ declare module 'stripe' {

card?: PaymentMethodOptions.Card;

card_present?: PaymentMethodOptions.CardPresent;

oxxo?: PaymentMethodOptions.Oxxo;

p24?: PaymentMethodOptions.P24;
Expand Down Expand Up @@ -491,7 +493,7 @@ declare module 'stripe' {
installments: Card.Installments | null;

/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
* Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.
*/
network: Card.Network | null;

Expand Down Expand Up @@ -572,6 +574,8 @@ declare module 'stripe' {
type RequestThreeDSecure = 'any' | 'automatic' | 'challenge_only';
}

interface CardPresent {}

interface Oxxo {
/**
* The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -1268,6 +1272,11 @@ declare module 'stripe' {
*/
card?: Stripe.Emptyable<PaymentMethodOptions.Card>;

/**
* If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
*/
card_present?: Stripe.Emptyable<PaymentMethodOptions.CardPresent>;

/**
* If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
*/
Expand Down Expand Up @@ -1431,6 +1440,8 @@ declare module 'stripe' {
type RequestThreeDSecure = 'any' | 'automatic';
}

interface CardPresent {}

interface Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -2047,6 +2058,11 @@ declare module 'stripe' {
*/
card?: Stripe.Emptyable<PaymentMethodOptions.Card>;

/**
* If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
*/
card_present?: Stripe.Emptyable<PaymentMethodOptions.CardPresent>;

/**
* If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
*/
Expand Down Expand Up @@ -2210,6 +2226,8 @@ declare module 'stripe' {
type RequestThreeDSecure = 'any' | 'automatic';
}

interface CardPresent {}

interface Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -2940,6 +2958,11 @@ declare module 'stripe' {
*/
card?: Stripe.Emptyable<PaymentMethodOptions.Card>;

/**
* If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
*/
card_present?: Stripe.Emptyable<PaymentMethodOptions.CardPresent>;

/**
* If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
*/
Expand Down Expand Up @@ -3103,6 +3126,8 @@ declare module 'stripe' {
type RequestThreeDSecure = 'any' | 'automatic';
}

interface CardPresent {}

interface Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down
6 changes: 6 additions & 0 deletions types/2020-08-27/SubscriptionItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ declare module 'stripe' {
/**
* Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
*
* Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
Expand Down Expand Up @@ -182,6 +184,7 @@ declare module 'stripe' {

type PaymentBehavior =
| 'allow_incomplete'
| 'default_incomplete'
| 'error_if_incomplete'
| 'pending_if_incomplete';

Expand Down Expand Up @@ -266,6 +269,8 @@ declare module 'stripe' {
/**
* Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
*
* Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
Expand Down Expand Up @@ -322,6 +327,7 @@ declare module 'stripe' {

type PaymentBehavior =
| 'allow_incomplete'
| 'default_incomplete'
| 'error_if_incomplete'
| 'pending_if_incomplete';

Expand Down
8 changes: 7 additions & 1 deletion types/2020-08-27/Subscriptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ declare module 'stripe' {
/**
* Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=expired_incomplete`, which is a terminal state.
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
*
* `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription.
Expand Down Expand Up @@ -577,6 +579,7 @@ declare module 'stripe' {

type PaymentBehavior =
| 'allow_incomplete'
| 'default_incomplete'
| 'error_if_incomplete'
| 'pending_if_incomplete';

Expand Down Expand Up @@ -711,6 +714,8 @@ declare module 'stripe' {
/**
* Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
*
* Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
*
* Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
*
* Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
Expand Down Expand Up @@ -946,6 +951,7 @@ declare module 'stripe' {

type PaymentBehavior =
| 'allow_incomplete'
| 'default_incomplete'
| 'error_if_incomplete'
| 'pending_if_incomplete';

Expand Down Expand Up @@ -1013,7 +1019,7 @@ declare module 'stripe' {
price?: string;

/**
* The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses.
* The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.
*/
status?: SubscriptionListParams.Status;
}
Expand Down