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 #1492

Merged
merged 1 commit into from
Jul 26, 2022
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
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v172
v173
3 changes: 2 additions & 1 deletion types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ declare module 'stripe' {
type Result =
| 'attempt_acknowledged'
| 'authenticated'
| 'exempted'
| 'failed'
| 'not_supported'
| 'processing_error';
Expand Down Expand Up @@ -1461,7 +1462,7 @@ declare module 'stripe' {

/**
* Preferred language of the Klarna authorization page that the customer is redirected to.
* Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, or `en-NZ`
* Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, or `fr-CA`
*/
preferred_locale: string | null;
}
Expand Down
135 changes: 135 additions & 0 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ declare module 'stripe' {

card?: PaymentMethodOptions.Card;

customer_balance?: PaymentMethodOptions.CustomerBalance;

eps?: PaymentMethodOptions.Eps;

fpx?: PaymentMethodOptions.Fpx;
Expand Down Expand Up @@ -685,6 +687,70 @@ declare module 'stripe' {
type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
}

interface CustomerBalance {
bank_transfer?: CustomerBalance.BankTransfer;

/**
* The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
*/
funding_type: 'bank_transfer' | null;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
*
* When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
*/
setup_future_usage?: 'none';
}

namespace CustomerBalance {
interface BankTransfer {
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
* List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
*
* Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
*/
requested_address_types?: Array<
BankTransfer.RequestedAddressType
>;

/**
* The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
*/
type: BankTransfer.Type | null;
}

namespace BankTransfer {
interface EuBankTransfer {
/**
* The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
*/
country: EuBankTransfer.Country;
}

namespace EuBankTransfer {
type Country = 'DE' | 'ES' | 'FR' | 'IE' | 'NL';
}

type RequestedAddressType =
| 'iban'
| 'sepa'
| 'sort_code'
| 'spei'
| 'zengin';

type Type =
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
}
}

interface Eps {
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
Expand Down Expand Up @@ -1926,6 +1992,11 @@ declare module 'stripe' {
*/
card?: PaymentMethodOptions.Card;

/**
* contains details about the Customer Balance payment method options.
*/
customer_balance?: PaymentMethodOptions.CustomerBalance;

/**
* contains details about the EPS payment method options.
*/
Expand Down Expand Up @@ -2224,6 +2295,69 @@ declare module 'stripe' {
type SetupFutureUsage = 'off_session' | 'on_session';
}

interface CustomerBalance {
/**
* Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
*/
bank_transfer?: CustomerBalance.BankTransfer;

/**
* The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
*/
funding_type?: 'bank_transfer';

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
*
* When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
*/
setup_future_usage?: 'none';
}

namespace CustomerBalance {
interface BankTransfer {
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
* List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
*
* Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
*/
requested_address_types?: Array<
BankTransfer.RequestedAddressType
>;

/**
* The list of bank transfer types that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
*/
type: BankTransfer.Type;
}

namespace BankTransfer {
interface EuBankTransfer {
/**
* The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
*/
country: string;
}

type RequestedAddressType =
| 'iban'
| 'sepa'
| 'sort_code'
| 'spei'
| 'zengin';

type Type =
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
}
}

interface Eps {
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
Expand Down Expand Up @@ -2459,6 +2593,7 @@ declare module 'stripe' {
| 'blik'
| 'boleto'
| 'card'
| 'customer_balance'
| 'eps'
| 'fpx'
| 'giropay'
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Issuing/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ declare module 'stripe' {
object: 'issuing.dispute';

/**
* Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).
* Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).
*/
amount: number;

Expand Down
4 changes: 4 additions & 0 deletions types/2020-08-27/Orders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,7 @@ declare module 'stripe' {
| 'en-AT'
| 'en-AU'
| 'en-BE'
| 'en-CA'
| 'en-DE'
| 'en-DK'
| 'en-ES'
Expand All @@ -1606,6 +1607,7 @@ declare module 'stripe' {
| 'es-US'
| 'fi-FI'
| 'fr-BE'
| 'fr-CA'
| 'fr-FR'
| 'it-IT'
| 'nb-NO'
Expand Down Expand Up @@ -2754,6 +2756,7 @@ declare module 'stripe' {
| 'en-AT'
| 'en-AU'
| 'en-BE'
| 'en-CA'
| 'en-DE'
| 'en-DK'
| 'en-ES'
Expand All @@ -2771,6 +2774,7 @@ declare module 'stripe' {
| 'es-US'
| 'fi-FI'
| 'fr-BE'
| 'fr-CA'
| 'fr-FR'
| 'it-IT'
| 'nb-NO'
Expand Down
6 changes: 6 additions & 0 deletions types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3194,6 +3194,7 @@ declare module 'stripe' {
| 'en-AT'
| 'en-AU'
| 'en-BE'
| 'en-CA'
| 'en-DE'
| 'en-DK'
| 'en-ES'
Expand All @@ -3211,6 +3212,7 @@ declare module 'stripe' {
| 'es-US'
| 'fi-FI'
| 'fr-BE'
| 'fr-CA'
| 'fr-FR'
| 'it-IT'
| 'nb-NO'
Expand Down Expand Up @@ -4916,6 +4918,7 @@ declare module 'stripe' {
| 'en-AT'
| 'en-AU'
| 'en-BE'
| 'en-CA'
| 'en-DE'
| 'en-DK'
| 'en-ES'
Expand All @@ -4933,6 +4936,7 @@ declare module 'stripe' {
| 'es-US'
| 'fi-FI'
| 'fr-BE'
| 'fr-CA'
| 'fr-FR'
| 'it-IT'
| 'nb-NO'
Expand Down Expand Up @@ -6773,6 +6777,7 @@ declare module 'stripe' {
| 'en-AT'
| 'en-AU'
| 'en-BE'
| 'en-CA'
| 'en-DE'
| 'en-DK'
| 'en-ES'
Expand All @@ -6790,6 +6795,7 @@ declare module 'stripe' {
| 'es-US'
| 'fi-FI'
| 'fr-BE'
| 'fr-CA'
| 'fr-FR'
| 'it-IT'
| 'nb-NO'
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Products.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* Only return products with the given IDs.
* Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).
*/
ids?: Array<string>;

Expand Down
1 change: 1 addition & 0 deletions types/2020-08-27/SetupAttempts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ declare module 'stripe' {
type Result =
| 'attempt_acknowledged'
| 'authenticated'
| 'exempted'
| 'failed'
| 'not_supported'
| 'processing_error';
Expand Down