From 84f92d229551da5d40de0fd4feab95ddb183b300 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 22:27:50 +0000 Subject: [PATCH 01/53] Update generated code for v1473 --- OPENAPI_VERSION | 2 +- types/Charges.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 130232bf35..1c140afccd 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1472 \ No newline at end of file +v1473 \ No newline at end of file diff --git a/types/Charges.d.ts b/types/Charges.d.ts index 3ce6b128b3..96811281ff 100644 --- a/types/Charges.d.ts +++ b/types/Charges.d.ts @@ -497,7 +497,7 @@ declare module 'stripe' { twint?: PaymentMethodDetails.Twint; /** - * The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. * An additional hash is included on `payment_method_details` with a name matching this value. * It contains information specific to the payment method. */ From 54d423e5d1118dc35c4b76260889826003e00e9f Mon Sep 17 00:00:00 2001 From: Jonathan Steele <83410553+jsteele-stripe@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:05:56 +0000 Subject: [PATCH 02/53] Add Next.js App Router webhook example that leverages Route Handlers (#2259) --- .../nextjs/app/api/webhooks/route.ts | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 examples/webhook-signing/nextjs/app/api/webhooks/route.ts diff --git a/examples/webhook-signing/nextjs/app/api/webhooks/route.ts b/examples/webhook-signing/nextjs/app/api/webhooks/route.ts new file mode 100644 index 0000000000..bf1be18c45 --- /dev/null +++ b/examples/webhook-signing/nextjs/app/api/webhooks/route.ts @@ -0,0 +1,69 @@ +import {Stripe} from 'stripe'; +import {NextResponse} from 'next/server'; +import {headers} from 'next/headers'; + +const stripe = new Stripe(process.env.STRIPE_SECRET_KEY as string); + +export async function POST(req: Request) { + let event: Stripe.Event; + + try { + const stripeSignature = (await headers()).get('stripe-signature'); + + event = stripe.webhooks.constructEvent( + await req.text(), + stripeSignature as string, + process.env.STRIPE_WEBHOOK_SECRET as string + ); + } catch (err) { + const errorMessage = err instanceof Error ? err.message : 'Unknown error'; + // On error, log and return the error message. + if (err! instanceof Error) console.log(err); + console.log(`❌ Error message: ${errorMessage}`); + return NextResponse.json( + {message: `Webhook Error: ${errorMessage}`}, + {status: 400} + ); + } + + // Successfully constructed event. + console.log('✅ Success:', event.id); + + const permittedEvents: string[] = [ + 'checkout.session.completed', + 'payment_intent.succeeded', + 'payment_intent.payment_failed', + ]; + + if (permittedEvents.includes(event.type)) { + let data; + + try { + switch (event.type) { + case 'checkout.session.completed': + data = event.data.object as Stripe.Checkout.Session; + console.log(`💰 CheckoutSession status: ${data.payment_status}`); + break; + case 'payment_intent.payment_failed': + data = event.data.object as Stripe.PaymentIntent; + console.log(`❌ Payment failed: ${data.last_payment_error?.message}`); + break; + case 'payment_intent.succeeded': + data = event.data.object as Stripe.PaymentIntent; + console.log(`💰 PaymentIntent status: ${data.status}`); + break; + default: + throw new Error(`Unhandled event: ${event.type}`); + } + } catch (error) { + console.log(error); + return NextResponse.json( + {message: 'Webhook handler failed'}, + {status: 500} + ); + } + } + + // Return a response to acknowledge receipt of the event. + return NextResponse.json({message: 'Received'}, {status: 200}); +} From d8d85fa6a9b5f3ca387f69ee3ab6c3f86cca2a07 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 22:06:45 +0000 Subject: [PATCH 03/53] Update generated code for v1479 --- OPENAPI_VERSION | 2 +- types/Billing/CreditGrants.d.ts | 5 +++++ types/Billing/CreditGrantsResource.d.ts | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1c140afccd..00ad8bdb8b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1473 \ No newline at end of file +v1479 \ No newline at end of file diff --git a/types/Billing/CreditGrants.d.ts b/types/Billing/CreditGrants.d.ts index 74d78be990..c4e3738fcc 100644 --- a/types/Billing/CreditGrants.d.ts +++ b/types/Billing/CreditGrants.d.ts @@ -63,6 +63,11 @@ declare module 'stripe' { */ name: string | null; + /** + * The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. + */ + priority?: number | null; + /** * ID of the test clock this credit grant belongs to. */ diff --git a/types/Billing/CreditGrantsResource.d.ts b/types/Billing/CreditGrantsResource.d.ts index fb1b0d76b1..afae74c6e3 100644 --- a/types/Billing/CreditGrantsResource.d.ts +++ b/types/Billing/CreditGrantsResource.d.ts @@ -48,6 +48,11 @@ declare module 'stripe' { * A descriptive name shown in the Dashboard. */ name?: string; + + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + */ + priority?: number; } namespace CreditGrantCreateParams { From 11781555827364e1cc05b34fd4df499ba989b208 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:04:38 +0000 Subject: [PATCH 04/53] Update generated code for v1481 --- OPENAPI_VERSION | 2 +- types/Checkout/Sessions.d.ts | 25 ++++++++++ types/Checkout/SessionsResource.d.ts | 25 ++++++++++ types/Orders.d.ts | 10 ++++ types/OrdersResource.d.ts | 20 ++++++++ types/PaymentIntents.d.ts | 25 ++++++++++ types/PaymentIntentsResource.d.ts | 75 ++++++++++++++++++++++++++++ 7 files changed, 181 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 00ad8bdb8b..75ad4e96a0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1479 \ No newline at end of file +v1481 \ No newline at end of file diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 9a2b61f364..556cde6585 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -1229,6 +1229,11 @@ declare module 'stripe' { */ setup_future_usage?: AcssDebit.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -1345,6 +1350,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: 'none'; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } interface BacsDebit { @@ -1360,6 +1370,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: BacsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -1994,6 +2009,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: SepaDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -2041,6 +2061,11 @@ declare module 'stripe' { */ setup_future_usage?: UsBankAccount.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index fc420bc8cc..cb6c0b24c7 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -1233,6 +1233,11 @@ declare module 'stripe' { */ setup_future_usage?: AcssDebit.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Verification method for the intent */ @@ -1351,6 +1356,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: 'none'; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } interface BacsDebit { @@ -1369,6 +1379,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: BacsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -2075,6 +2090,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: SepaDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -2125,6 +2145,11 @@ declare module 'stripe' { */ setup_future_usage?: UsBankAccount.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Verification method for the intent */ diff --git a/types/Orders.d.ts b/types/Orders.d.ts index 27f682cb3e..cd8553e287 100644 --- a/types/Orders.d.ts +++ b/types/Orders.d.ts @@ -310,6 +310,11 @@ declare module 'stripe' { */ setup_future_usage?: AcssDebit.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -732,6 +737,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: SepaDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { diff --git a/types/OrdersResource.d.ts b/types/OrdersResource.d.ts index 3e00ea9963..553d8a7ceb 100644 --- a/types/OrdersResource.d.ts +++ b/types/OrdersResource.d.ts @@ -455,6 +455,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -1004,6 +1009,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -1874,6 +1884,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -2423,6 +2438,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 47447e8977..0777d214cf 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -1781,6 +1781,11 @@ declare module 'stripe' { */ setup_future_usage?: AcssDebit.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -1925,6 +1930,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: AuBecsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -1944,6 +1954,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: BacsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -3019,6 +3034,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: SepaDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -3128,6 +3148,11 @@ declare module 'stripe' { */ setup_future_usage?: UsBankAccount.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index c4bd09a108..afec600331 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -2002,6 +2002,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -2172,6 +2177,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -2196,6 +2206,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -3539,6 +3554,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -3671,6 +3691,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -5790,6 +5815,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -5960,6 +5990,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -5984,6 +6019,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -7327,6 +7367,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -7459,6 +7504,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -10333,6 +10383,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -10503,6 +10558,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -10527,6 +10587,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -11870,6 +11935,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -12002,6 +12072,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ From f55d9e5bd46a847388638f0b162413a94692cfaa Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:38:54 +0000 Subject: [PATCH 05/53] Update generated code for v1483 --- OPENAPI_VERSION | 2 +- types/PaymentIntents.d.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 75ad4e96a0..0dd08f6166 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1481 \ No newline at end of file +v1483 \ No newline at end of file diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 0777d214cf..baf011049c 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -3345,14 +3345,14 @@ declare module 'stripe' { interface TransferData { /** - * Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + * The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. + * The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer + * representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). */ amount?: number; /** - * The account (if any) that the payment is attributed to for tax - * reporting, and where funds from the payment are transferred to after - * payment success. + * The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. */ destination: string | Stripe.Account; } From 4ea95af489e61cd823d0834aa1c95c9fb6039c0b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:57:34 +0000 Subject: [PATCH 06/53] Update generated code for v1485 --- OPENAPI_VERSION | 2 +- types/Billing/CreditBalanceSummaryResource.d.ts | 2 +- types/Billing/CreditGrantsResource.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0dd08f6166..1604d58c7d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1483 \ No newline at end of file +v1485 \ No newline at end of file diff --git a/types/Billing/CreditBalanceSummaryResource.d.ts b/types/Billing/CreditBalanceSummaryResource.d.ts index 26c758d127..6909f8d088 100644 --- a/types/Billing/CreditBalanceSummaryResource.d.ts +++ b/types/Billing/CreditBalanceSummaryResource.d.ts @@ -43,7 +43,7 @@ declare module 'stripe' { /** * The price type that credit grants can apply to. We currently only support the `metered` price type. */ - price_type: 'metered'; + price_type?: 'metered'; /** * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. diff --git a/types/Billing/CreditGrantsResource.d.ts b/types/Billing/CreditGrantsResource.d.ts index afae74c6e3..9e241a7e5a 100644 --- a/types/Billing/CreditGrantsResource.d.ts +++ b/types/Billing/CreditGrantsResource.d.ts @@ -94,7 +94,7 @@ declare module 'stripe' { /** * The price type that credit grants can apply to. We currently only support the `metered` price type. */ - price_type: 'metered'; + price_type?: 'metered'; /** * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. From 7216769703d8d5783fb32ce88dfbfe7b7e54be39 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 20:50:04 +0000 Subject: [PATCH 07/53] Update generated code for v1486 --- OPENAPI_VERSION | 2 +- types/Billing/CreditGrantsResource.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1604d58c7d..0234066a51 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1485 \ No newline at end of file +v1486 \ No newline at end of file diff --git a/types/Billing/CreditGrantsResource.d.ts b/types/Billing/CreditGrantsResource.d.ts index 9e241a7e5a..d5ab6318ac 100644 --- a/types/Billing/CreditGrantsResource.d.ts +++ b/types/Billing/CreditGrantsResource.d.ts @@ -10,7 +10,7 @@ declare module 'stripe' { amount: CreditGrantCreateParams.Amount; /** - * Configuration specifying what this credit grant applies to. + * Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. */ applicability_config: CreditGrantCreateParams.ApplicabilityConfig; From 6ac7408655fe1e387709bcf0eb3711fe1a369b2b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 21:46:35 +0000 Subject: [PATCH 08/53] Update generated code for v1487 --- OPENAPI_VERSION | 2 +- types/ProductsResource.d.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0234066a51..73182b6b37 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1486 \ No newline at end of file +v1487 \ No newline at end of file diff --git a/types/ProductsResource.d.ts b/types/ProductsResource.d.ts index d60ce2df68..4bebeda79e 100644 --- a/types/ProductsResource.d.ts +++ b/types/ProductsResource.d.ts @@ -111,6 +111,11 @@ declare module 'stripe' { */ custom_unit_amount?: DefaultPriceData.CustomUnitAmount; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + /** * The recurring components of a price such as `interval` and `interval_count`. */ From c3d86dbbc0e7d665bd7d4f9c60fe7320aa2469e8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 15:50:12 +0000 Subject: [PATCH 09/53] Update generated code for v1490 --- OPENAPI_VERSION | 2 +- src/apiVersion.ts | 2 +- types/WebhookEndpointsResource.d.ts | 3 ++- types/lib.d.ts | 2 +- types/test/typescriptTest.ts | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 73182b6b37..a752d73210 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1487 \ No newline at end of file +v1490 \ No newline at end of file diff --git a/src/apiVersion.ts b/src/apiVersion.ts index 6267ead251..436a7469c2 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,3 +1,3 @@ // File generated from our OpenAPI spec -export const ApiVersion = '2025-01-27.acacia'; +export const ApiVersion = '2025-02-24.acacia'; diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index dae6aa4a35..c3edb128ba 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -147,7 +147,8 @@ declare module 'stripe' { | '2024-10-28.acacia' | '2024-11-20.acacia' | '2024-12-18.acacia' - | '2025-01-27.acacia'; + | '2025-01-27.acacia' + | '2025-02-24.acacia'; type EnabledEvent = | '*' diff --git a/types/lib.d.ts b/types/lib.d.ts index e9940c2cf6..201d8ded77 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -27,7 +27,7 @@ declare module 'stripe' { }): (...args: any[]) => Response; //eslint-disable-line @typescript-eslint/no-explicit-any static MAX_BUFFERED_REQUEST_METRICS: number; } - export type LatestApiVersion = '2025-01-27.acacia'; + export type LatestApiVersion = '2025-02-24.acacia'; export type HttpAgent = Agent; export type HttpProtocol = 'http' | 'https'; diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts index 2500374bf6..a21707a4ca 100644 --- a/types/test/typescriptTest.ts +++ b/types/test/typescriptTest.ts @@ -9,7 +9,7 @@ import Stripe from 'stripe'; let stripe = new Stripe('sk_test_123', { - apiVersion: '2025-01-27.acacia', + apiVersion: '2025-02-24.acacia', }); stripe = new Stripe('sk_test_123'); @@ -26,7 +26,7 @@ stripe = new Stripe('sk_test_123', { // Check config object. stripe = new Stripe('sk_test_123', { - apiVersion: '2025-01-27.acacia', + apiVersion: '2025-02-24.acacia', typescript: true, maxNetworkRetries: 1, timeout: 1000, @@ -44,7 +44,7 @@ stripe = new Stripe('sk_test_123', { description: 'test', }; const opts: Stripe.RequestOptions = { - apiVersion: '2025-01-27.acacia', + apiVersion: '2025-02-24.acacia', }; const customer: Stripe.Customer = await stripe.customers.create(params, opts); From 2e28d124e530a25081fc7c25b1ef1ec6fd5d6f68 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 19:21:48 +0000 Subject: [PATCH 10/53] Update generated code for v1491 --- OPENAPI_VERSION | 2 +- types/Checkout/Sessions.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a752d73210..91a5f7e774 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1490 \ No newline at end of file +v1491 \ No newline at end of file diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 556cde6585..2a16e33e65 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -82,7 +82,7 @@ declare module 'stripe' { /** * Information about the customer collected within the Checkout Session. */ - collected_information?: Session.CollectedInformation | null; + collected_information: Session.CollectedInformation | null; /** * Results of `consent_collection` for this session. @@ -421,7 +421,7 @@ declare module 'stripe' { /** * Shipping information for this Checkout Session. */ - shipping_details?: CollectedInformation.ShippingDetails | null; + shipping_details: CollectedInformation.ShippingDetails | null; /** * Customer's tax ids for this Checkout Session. From 9c87cb31d1a330b0b13ed6278d9872c420989896 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 19:44:38 +0000 Subject: [PATCH 11/53] Update generated code for v1493 --- OPENAPI_VERSION | 2 +- types/Accounts.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 91a5f7e774..7c254a17b6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1491 \ No newline at end of file +v1493 \ No newline at end of file diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index a18e7dbc5f..e1f80c7664 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -1436,7 +1436,7 @@ declare module 'stripe' { /** * Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/) */ - rejected_reason?: RiskControls.RejectedReason; + rejected_reason?: RiskControls.RejectedReason | null; } namespace RiskControls { From f4b0a640232856a73ce17122566e670f049ead01 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 22:03:45 +0000 Subject: [PATCH 12/53] Update generated code for v1494 --- OPENAPI_VERSION | 2 +- types/Accounts.d.ts | 2 +- types/Checkout/Sessions.d.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7c254a17b6..d9f1c75b6c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1493 \ No newline at end of file +v1494 \ No newline at end of file diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index e1f80c7664..a18e7dbc5f 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -1436,7 +1436,7 @@ declare module 'stripe' { /** * Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/) */ - rejected_reason?: RiskControls.RejectedReason | null; + rejected_reason?: RiskControls.RejectedReason; } namespace RiskControls { diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 2a16e33e65..556cde6585 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -82,7 +82,7 @@ declare module 'stripe' { /** * Information about the customer collected within the Checkout Session. */ - collected_information: Session.CollectedInformation | null; + collected_information?: Session.CollectedInformation | null; /** * Results of `consent_collection` for this session. @@ -421,7 +421,7 @@ declare module 'stripe' { /** * Shipping information for this Checkout Session. */ - shipping_details: CollectedInformation.ShippingDetails | null; + shipping_details?: CollectedInformation.ShippingDetails | null; /** * Customer's tax ids for this Checkout Session. From 65ac5375d1f774aa783c05960b740559a599c5db Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 22:38:37 +0000 Subject: [PATCH 13/53] Update generated code for v1495 --- OPENAPI_VERSION | 2 +- types/Accounts.d.ts | 2 +- types/Checkout/Sessions.d.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d9f1c75b6c..6043724bfe 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1494 \ No newline at end of file +v1495 \ No newline at end of file diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index a18e7dbc5f..e1f80c7664 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -1436,7 +1436,7 @@ declare module 'stripe' { /** * Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/) */ - rejected_reason?: RiskControls.RejectedReason; + rejected_reason?: RiskControls.RejectedReason | null; } namespace RiskControls { diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 556cde6585..2a16e33e65 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -82,7 +82,7 @@ declare module 'stripe' { /** * Information about the customer collected within the Checkout Session. */ - collected_information?: Session.CollectedInformation | null; + collected_information: Session.CollectedInformation | null; /** * Results of `consent_collection` for this session. @@ -421,7 +421,7 @@ declare module 'stripe' { /** * Shipping information for this Checkout Session. */ - shipping_details?: CollectedInformation.ShippingDetails | null; + shipping_details: CollectedInformation.ShippingDetails | null; /** * Customer's tax ids for this Checkout Session. From 1f38f653710f3e19518caed628024e8867060a4b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:50:16 +0000 Subject: [PATCH 14/53] Update generated code for v1495 --- types/V2/Core/EventsResource.d.ts | 32 ++++++++++++++++++++++++++++--- types/V2/EventDestinations.d.ts | 2 +- types/V2/Events.d.ts | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/types/V2/Core/EventsResource.d.ts b/types/V2/Core/EventsResource.d.ts index bb3489e290..bae38efacf 100644 --- a/types/V2/Core/EventsResource.d.ts +++ b/types/V2/Core/EventsResource.d.ts @@ -12,15 +12,40 @@ declare module 'stripe' { namespace Core { interface EventListParams { /** - * Primary object ID used to retrieve related events. + * Filter for events created after the specified timestamp. */ - object_id: string; + created_gt?: string; + + /** + * Filter for events created at or after the specified timestamp. + */ + created_gte?: string; + + /** + * Filter for events created before the specified timestamp. + */ + created_lt?: string; + + /** + * Filter for events created at or before the specified timestamp. + */ + created_lte?: string; + + /** + * Filter events based on whether they were successfully delivered to all subscribed event destinations. If false, events which are still pending or have failed all delivery attempts to a event destination will be returned. + */ + delivery_success?: boolean; /** * The page size. */ limit?: number; + /** + * Primary object ID used to retrieve related events. + */ + object_id?: string; + /** * The requested page. */ @@ -47,9 +72,10 @@ declare module 'stripe' { * List events, going back up to 30 days. */ list( - params: EventListParams, + params?: EventListParams, options?: RequestOptions ): ApiListPromise; + list(options?: RequestOptions): ApiListPromise; } } } diff --git a/types/V2/EventDestinations.d.ts b/types/V2/EventDestinations.d.ts index 5eb69f715d..a7cb92b98e 100644 --- a/types/V2/EventDestinations.d.ts +++ b/types/V2/EventDestinations.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { namespace V2 { /** - * The EventDestination object. + * Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). */ interface EventDestination { /** diff --git a/types/V2/Events.d.ts b/types/V2/Events.d.ts index 6dac16c035..4baedce15c 100644 --- a/types/V2/Events.d.ts +++ b/types/V2/Events.d.ts @@ -32,7 +32,7 @@ declare module 'stripe' { } /** - * The Event object. + * Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload. */ interface EventBase { /** From 11912a0e1a2014f037e7fa6abef62aee07b50afe Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:03:54 +0000 Subject: [PATCH 15/53] Update generated code for v1496 --- OPENAPI_VERSION | 2 +- src/resources/TestHelpers/Terminal/Readers.ts | 5 +++ .../TestHelpers/Terminal/ReadersResource.d.ts | 31 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6043724bfe..c67d79cdf1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1495 \ No newline at end of file +v1496 \ No newline at end of file diff --git a/src/resources/TestHelpers/Terminal/Readers.ts b/src/resources/TestHelpers/Terminal/Readers.ts index a6e3bd0308..f6a95e66c3 100644 --- a/src/resources/TestHelpers/Terminal/Readers.ts +++ b/src/resources/TestHelpers/Terminal/Readers.ts @@ -8,4 +8,9 @@ export const Readers = StripeResource.extend({ fullPath: '/v1/test_helpers/terminal/readers/{reader}/present_payment_method', }), + succeedInputCollection: stripeMethod({ + method: 'POST', + fullPath: + '/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection', + }), }); diff --git a/types/TestHelpers/Terminal/ReadersResource.d.ts b/types/TestHelpers/Terminal/ReadersResource.d.ts index 5bb84355c0..42fbbc3b03 100644 --- a/types/TestHelpers/Terminal/ReadersResource.d.ts +++ b/types/TestHelpers/Terminal/ReadersResource.d.ts @@ -50,6 +50,24 @@ declare module 'stripe' { } } + namespace Terminal { + interface ReaderSucceedInputCollectionParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Skip behavior for input collection. + */ + skip_non_required_inputs?: ReaderSucceedInputCollectionParams.SkipNonRequiredInputs; + } + + namespace ReaderSucceedInputCollectionParams { + type SkipNonRequiredInputs = 'all' | 'none'; + } + } + namespace Terminal { class ReadersResource { /** @@ -64,6 +82,19 @@ declare module 'stripe' { id: string, options?: RequestOptions ): Promise>; + + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + */ + succeedInputCollection( + id: string, + params?: ReaderSucceedInputCollectionParams, + options?: RequestOptions + ): Promise>; + succeedInputCollection( + id: string, + options?: RequestOptions + ): Promise>; } } } From bc588121996c604f2b0a4de4895836c69b380324 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 23:52:56 +0000 Subject: [PATCH 16/53] Update generated code for v1501 --- OPENAPI_VERSION | 2 +- types/EventTypes.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c67d79cdf1..b8101af09d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1496 \ No newline at end of file +v1501 \ No newline at end of file diff --git a/types/EventTypes.d.ts b/types/EventTypes.d.ts index 973b041f2a..399bb7bbb0 100644 --- a/types/EventTypes.d.ts +++ b/types/EventTypes.d.ts @@ -2080,7 +2080,7 @@ declare module 'stripe' { } /** - * Occurs whenever an invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method. + * Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method. */ interface InvoicePaymentFailedEvent extends EventBase { type: 'invoice.payment_failed'; From c2bdef6e049dbc060719c24626939d401c6e8d4d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:17:23 +0000 Subject: [PATCH 17/53] Update generated code for v1501 --- types/AccountsResource.d.ts | 8 ++------ types/TokensResource.d.ts | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index a8584820de..3b22471674 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -4157,7 +4157,7 @@ declare module 'stripe' { /** * Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: AccountCreatePersonParams.PoliticalExposure; + political_exposure?: string; /** * The person's registered address. @@ -4264,8 +4264,6 @@ declare module 'stripe' { } } - type PoliticalExposure = 'existing' | 'none'; - interface Relationship { /** * Whether the person is the authorizer of the account's representative. @@ -4699,7 +4697,7 @@ declare module 'stripe' { /** * Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: AccountUpdatePersonParams.PoliticalExposure; + political_exposure?: string; /** * The person's registered address. @@ -4806,8 +4804,6 @@ declare module 'stripe' { } } - type PoliticalExposure = 'existing' | 'none'; - interface Relationship { /** * Whether the person is the authorizer of the account's representative. diff --git a/types/TokensResource.d.ts b/types/TokensResource.d.ts index b712db152f..cc9cb344a2 100644 --- a/types/TokensResource.d.ts +++ b/types/TokensResource.d.ts @@ -719,7 +719,7 @@ declare module 'stripe' { /** * Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: Person.PoliticalExposure; + political_exposure?: string; /** * The person's registered address. @@ -826,8 +826,6 @@ declare module 'stripe' { } } - type PoliticalExposure = 'existing' | 'none'; - interface Relationship { /** * Whether the person is the authorizer of the account's representative. From baeaf840cf91927458b5139d9bf1f2656706d345 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:54:36 +0000 Subject: [PATCH 18/53] Update generated code for v1502 --- OPENAPI_VERSION | 2 +- types/Identity/VerificationSessions.d.ts | 2 +- types/Identity/VerificationSessionsResource.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b8101af09d..4ffe7a94b2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1501 \ No newline at end of file +v1502 \ No newline at end of file diff --git a/types/Identity/VerificationSessions.d.ts b/types/Identity/VerificationSessions.d.ts index 2509e5315f..7ec59c5038 100644 --- a/types/Identity/VerificationSessions.d.ts +++ b/types/Identity/VerificationSessions.d.ts @@ -81,7 +81,7 @@ declare module 'stripe' { redaction: VerificationSession.Redaction | null; /** - * Token referencing a Customer resource. + * Customer ID */ related_customer: string | null; diff --git a/types/Identity/VerificationSessionsResource.d.ts b/types/Identity/VerificationSessionsResource.d.ts index 31ab42211d..8d7d7ff960 100644 --- a/types/Identity/VerificationSessionsResource.d.ts +++ b/types/Identity/VerificationSessionsResource.d.ts @@ -30,7 +30,7 @@ declare module 'stripe' { provided_details?: VerificationSessionCreateParams.ProvidedDetails; /** - * Token referencing a Customer resource. + * Customer ID */ related_customer?: string; From 240505a77f3c9d6693017bef83f36f8f7f4a11af Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:54:05 +0000 Subject: [PATCH 19/53] Update generated code for v1504 --- OPENAPI_VERSION | 2 +- types/Tax/Calculations.d.ts | 2 +- types/TaxRates.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4ffe7a94b2..aae3b62720 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1502 \ No newline at end of file +v1504 \ No newline at end of file diff --git a/types/Tax/Calculations.d.ts b/types/Tax/Calculations.d.ts index b1e050ab36..68f98822ff 100644 --- a/types/Tax/Calculations.d.ts +++ b/types/Tax/Calculations.d.ts @@ -446,7 +446,7 @@ declare module 'stripe' { percentage_decimal: string; /** - * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. */ rate_type: TaxRateDetails.RateType | null; diff --git a/types/TaxRates.d.ts b/types/TaxRates.d.ts index 28df4d0a88..f5d60ae2a7 100644 --- a/types/TaxRates.d.ts +++ b/types/TaxRates.d.ts @@ -86,7 +86,7 @@ declare module 'stripe' { percentage: number; /** - * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + * Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. */ rate_type: TaxRate.RateType | null; From d9c6001f7954faf44974513b25afd09e1996f1e9 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:09:04 +0000 Subject: [PATCH 20/53] Update generated code for v1505 --- OPENAPI_VERSION | 2 +- src/resources/TestHelpers/Terminal/Readers.ts | 5 +++++ .../TestHelpers/Terminal/ReadersResource.d.ts | 22 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index aae3b62720..ddf5ac5449 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1504 \ No newline at end of file +v1505 \ No newline at end of file diff --git a/src/resources/TestHelpers/Terminal/Readers.ts b/src/resources/TestHelpers/Terminal/Readers.ts index f6a95e66c3..17c5b98e00 100644 --- a/src/resources/TestHelpers/Terminal/Readers.ts +++ b/src/resources/TestHelpers/Terminal/Readers.ts @@ -13,4 +13,9 @@ export const Readers = StripeResource.extend({ fullPath: '/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection', }), + timeoutInputCollection: stripeMethod({ + method: 'POST', + fullPath: + '/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection', + }), }); diff --git a/types/TestHelpers/Terminal/ReadersResource.d.ts b/types/TestHelpers/Terminal/ReadersResource.d.ts index 42fbbc3b03..8b8146e2a8 100644 --- a/types/TestHelpers/Terminal/ReadersResource.d.ts +++ b/types/TestHelpers/Terminal/ReadersResource.d.ts @@ -68,6 +68,15 @@ declare module 'stripe' { } } + namespace Terminal { + interface ReaderTimeoutInputCollectionParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + } + namespace Terminal { class ReadersResource { /** @@ -95,6 +104,19 @@ declare module 'stripe' { id: string, options?: RequestOptions ): Promise>; + + /** + * Completes an input collection with a timeout error on a simulated reader. + */ + timeoutInputCollection( + id: string, + params?: ReaderTimeoutInputCollectionParams, + options?: RequestOptions + ): Promise>; + timeoutInputCollection( + id: string, + options?: RequestOptions + ): Promise>; } } } From d7ce0c672bd1667510da3eea041b4690e6fefa7e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:25:21 +0000 Subject: [PATCH 21/53] Update generated code for v1505 --- types/V2/Core/EventsResource.d.ts | 32 +++---------------------------- types/V2/EventDestinations.d.ts | 2 +- types/V2/Events.d.ts | 2 +- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/types/V2/Core/EventsResource.d.ts b/types/V2/Core/EventsResource.d.ts index bae38efacf..bb3489e290 100644 --- a/types/V2/Core/EventsResource.d.ts +++ b/types/V2/Core/EventsResource.d.ts @@ -12,40 +12,15 @@ declare module 'stripe' { namespace Core { interface EventListParams { /** - * Filter for events created after the specified timestamp. - */ - created_gt?: string; - - /** - * Filter for events created at or after the specified timestamp. - */ - created_gte?: string; - - /** - * Filter for events created before the specified timestamp. - */ - created_lt?: string; - - /** - * Filter for events created at or before the specified timestamp. - */ - created_lte?: string; - - /** - * Filter events based on whether they were successfully delivered to all subscribed event destinations. If false, events which are still pending or have failed all delivery attempts to a event destination will be returned. + * Primary object ID used to retrieve related events. */ - delivery_success?: boolean; + object_id: string; /** * The page size. */ limit?: number; - /** - * Primary object ID used to retrieve related events. - */ - object_id?: string; - /** * The requested page. */ @@ -72,10 +47,9 @@ declare module 'stripe' { * List events, going back up to 30 days. */ list( - params?: EventListParams, + params: EventListParams, options?: RequestOptions ): ApiListPromise; - list(options?: RequestOptions): ApiListPromise; } } } diff --git a/types/V2/EventDestinations.d.ts b/types/V2/EventDestinations.d.ts index a7cb92b98e..5eb69f715d 100644 --- a/types/V2/EventDestinations.d.ts +++ b/types/V2/EventDestinations.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { namespace V2 { /** - * Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). + * The EventDestination object. */ interface EventDestination { /** diff --git a/types/V2/Events.d.ts b/types/V2/Events.d.ts index 4baedce15c..6dac16c035 100644 --- a/types/V2/Events.d.ts +++ b/types/V2/Events.d.ts @@ -32,7 +32,7 @@ declare module 'stripe' { } /** - * Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload. + * The Event object. */ interface EventBase { /** From f395139eca962ba7dc610887b37e9336f9180f91 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:27:30 -0500 Subject: [PATCH 22/53] Update generated code (#2256) * Update generated code for v1463 * Update generated code for v1494 * Update generated code for v1495 * Update generated code for v1501 * Update generated code for v1505 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> --- CONTRIBUTING.md | 25 ---- OPENAPI_VERSION | 2 +- src/apiVersion.ts | 2 +- types/Balance.d.ts | 36 +++--- .../Billing/CreditBalanceSummaryResource.d.ts | 16 ++- types/Billing/CreditGrants.d.ts | 21 +++- types/Billing/CreditGrantsResource.d.ts | 23 +++- types/Billing/MeterEventSummaries.d.ts | 2 + types/Charges.d.ts | 8 +- types/Checkout/Sessions.d.ts | 90 ++++++++++++++- types/Checkout/SessionsResource.d.ts | 107 ++++++++++++++++++ types/ConfirmationTokens.d.ts | 8 +- types/CreditNotes.d.ts | 4 +- types/Invoices.d.ts | 4 +- types/LineItems.d.ts | 4 +- types/PaymentIntents.d.ts | 33 +++++- types/PaymentIntentsResource.d.ts | 81 ++++++++++++- types/PaymentMethods.d.ts | 8 +- types/ProductsResource.d.ts | 5 + types/Quotes.d.ts | 12 +- types/Refunds.d.ts | 4 +- types/SetupIntentsResource.d.ts | 6 +- types/Tax/CalculationLineItems.d.ts | 2 +- types/Tax/Calculations.d.ts | 2 +- types/Tax/Transactions.d.ts | 2 +- types/TaxRates.d.ts | 6 +- types/TaxRatesResource.d.ts | 4 +- types/WebhookEndpointsResource.d.ts | 3 +- types/lib.d.ts | 2 +- types/test/typescriptTest.ts | 6 +- 30 files changed, 425 insertions(+), 103 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 5c880f4289..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Contributing - -We welcome bug reports, feature requests, and code contributions in a pull request. - -For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-node/issues/new/choose). - -## Contributor License Agreement - -All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant. - -## Generated code - -This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution. - -To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`. - -## Compatibility with supported language and runtime versions - -This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward. - -## Set up your dev environment - -Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment. - diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 217ac84ad0..ddf5ac5449 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1455 \ No newline at end of file +v1505 \ No newline at end of file diff --git a/src/apiVersion.ts b/src/apiVersion.ts index 6267ead251..436a7469c2 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,3 +1,3 @@ // File generated from our OpenAPI spec -export const ApiVersion = '2025-01-27.acacia'; +export const ApiVersion = '2025-02-24.acacia'; diff --git a/types/Balance.d.ts b/types/Balance.d.ts index 48c6fef665..774eeb8e09 100644 --- a/types/Balance.d.ts +++ b/types/Balance.d.ts @@ -67,17 +67,17 @@ declare module 'stripe' { namespace Available { interface SourceTypes { /** - * Amount for bank account. + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). */ bank_account?: number; /** - * Amount for card. + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). */ card?: number; /** - * Amount for FPX. + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. */ fpx?: number; } @@ -100,17 +100,17 @@ declare module 'stripe' { namespace ConnectReserved { interface SourceTypes { /** - * Amount for bank account. + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). */ bank_account?: number; /** - * Amount for card. + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). */ card?: number; /** - * Amount for FPX. + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. */ fpx?: number; } @@ -153,17 +153,17 @@ declare module 'stripe' { namespace NetAvailable { interface SourceTypes { /** - * Amount for bank account. + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). */ bank_account?: number; /** - * Amount for card. + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). */ card?: number; /** - * Amount for FPX. + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. */ fpx?: number; } @@ -171,17 +171,17 @@ declare module 'stripe' { interface SourceTypes { /** - * Amount for bank account. + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). */ bank_account?: number; /** - * Amount for card. + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). */ card?: number; /** - * Amount for FPX. + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. */ fpx?: number; } @@ -212,17 +212,17 @@ declare module 'stripe' { namespace Available { interface SourceTypes { /** - * Amount for bank account. + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). */ bank_account?: number; /** - * Amount for card. + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). */ card?: number; /** - * Amount for FPX. + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. */ fpx?: number; } @@ -246,17 +246,17 @@ declare module 'stripe' { namespace Pending { interface SourceTypes { /** - * Amount for bank account. + * Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated). */ bank_account?: number; /** - * Amount for card. + * Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits). */ card?: number; /** - * Amount for FPX. + * Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method. */ fpx?: number; } diff --git a/types/Billing/CreditBalanceSummaryResource.d.ts b/types/Billing/CreditBalanceSummaryResource.d.ts index 09cf01f44c..6909f8d088 100644 --- a/types/Billing/CreditBalanceSummaryResource.d.ts +++ b/types/Billing/CreditBalanceSummaryResource.d.ts @@ -43,7 +43,21 @@ declare module 'stripe' { /** * The price type that credit grants can apply to. We currently only support the `metered` price type. */ - price_type: 'metered'; + price_type?: 'metered'; + + /** + * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. + */ + prices?: Array; + } + + namespace ApplicabilityScope { + interface Price { + /** + * The price ID this credit grant should apply to. + */ + id: string; + } } type Type = 'applicability_scope' | 'credit_grant'; diff --git a/types/Billing/CreditGrants.d.ts b/types/Billing/CreditGrants.d.ts index 6f50ed5aea..c4e3738fcc 100644 --- a/types/Billing/CreditGrants.d.ts +++ b/types/Billing/CreditGrants.d.ts @@ -63,6 +63,11 @@ declare module 'stripe' { */ name: string | null; + /** + * The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. + */ + priority?: number | null; + /** * ID of the test clock this credit grant belongs to. */ @@ -115,7 +120,21 @@ declare module 'stripe' { /** * The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. */ - price_type: 'metered'; + price_type?: 'metered'; + + /** + * The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + */ + prices?: Array; + } + + namespace Scope { + interface Price { + /** + * Unique identifier for the object. + */ + id: string | null; + } } } diff --git a/types/Billing/CreditGrantsResource.d.ts b/types/Billing/CreditGrantsResource.d.ts index 58509065b7..d5ab6318ac 100644 --- a/types/Billing/CreditGrantsResource.d.ts +++ b/types/Billing/CreditGrantsResource.d.ts @@ -10,7 +10,7 @@ declare module 'stripe' { amount: CreditGrantCreateParams.Amount; /** - * Configuration specifying what this credit grant applies to. + * Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. */ applicability_config: CreditGrantCreateParams.ApplicabilityConfig; @@ -48,6 +48,11 @@ declare module 'stripe' { * A descriptive name shown in the Dashboard. */ name?: string; + + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + */ + priority?: number; } namespace CreditGrantCreateParams { @@ -89,7 +94,21 @@ declare module 'stripe' { /** * The price type that credit grants can apply to. We currently only support the `metered` price type. */ - price_type: 'metered'; + price_type?: 'metered'; + + /** + * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. + */ + prices?: Array; + } + + namespace Scope { + interface Price { + /** + * The price ID this credit grant should apply to. + */ + id: string; + } } } diff --git a/types/Billing/MeterEventSummaries.d.ts b/types/Billing/MeterEventSummaries.d.ts index a94bfa7446..fa9480b7e8 100644 --- a/types/Billing/MeterEventSummaries.d.ts +++ b/types/Billing/MeterEventSummaries.d.ts @@ -6,6 +6,8 @@ declare module 'stripe' { /** * A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much * usage was accrued by a customer for that period. + * + * Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage. */ interface MeterEventSummary { /** diff --git a/types/Charges.d.ts b/types/Charges.d.ts index b94572e02b..4c130740b6 100644 --- a/types/Charges.d.ts +++ b/types/Charges.d.ts @@ -483,7 +483,7 @@ declare module 'stripe' { twint?: PaymentMethodDetails.Twint; /** - * The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. * An additional hash is included on `payment_method_details` with a name matching this value. * It contains information specific to the payment method. */ @@ -889,7 +889,7 @@ declare module 'stripe' { network_token?: Card.NetworkToken | null; /** - * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. */ network_transaction_id: string | null; @@ -1274,7 +1274,7 @@ declare module 'stripe' { network: string | null; /** - * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. */ network_transaction_id: string | null; @@ -1671,7 +1671,7 @@ declare module 'stripe' { network: string | null; /** - * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. */ network_transaction_id: string | null; diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 90bf71d6bf..ee84954a77 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -79,6 +79,11 @@ declare module 'stripe' { */ client_secret: string | null; + /** + * Information about the customer collected within the Checkout Session. + */ + collected_information?: Session.CollectedInformation | null; + /** * Results of `consent_collection` for this session. */ @@ -142,7 +147,7 @@ declare module 'stripe' { /** * List of coupons and promotion codes attached to the Checkout Session. */ - discounts?: Array | null; + discounts: Array | null; /** * The timestamp at which the Checkout Session will expire. @@ -390,6 +395,39 @@ declare module 'stripe' { type BillingAddressCollection = 'auto' | 'required'; + interface CollectedInformation { + /** + * Shipping information for this Checkout Session. + */ + shipping_details?: CollectedInformation.ShippingDetails | null; + } + + namespace CollectedInformation { + interface ShippingDetails { + address?: Stripe.Address; + + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + */ + carrier?: string | null; + + /** + * Recipient name. + */ + name?: string; + + /** + * Recipient phone (including extension). + */ + phone?: string | null; + + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ + tracking_number?: string | null; + } + } + interface Consent { /** * If `opt_in`, the customer consents to receiving promotional communications @@ -1045,6 +1083,11 @@ declare module 'stripe' { */ setup_future_usage?: AcssDebit.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -1161,6 +1204,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: 'none'; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } interface BacsDebit { @@ -1176,6 +1224,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: BacsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -1252,6 +1305,8 @@ declare module 'stripe' { */ request_three_d_secure: Card.RequestThreeDSecure; + restrictions?: Card.Restrictions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -1292,6 +1347,21 @@ declare module 'stripe' { type RequestThreeDSecure = 'any' | 'automatic' | 'challenge'; + interface Restrictions { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. + */ + brands_blocked?: Array; + } + + namespace Restrictions { + type BrandsBlocked = + | 'american_express' + | 'discover_global_network' + | 'mastercard' + | 'visa'; + } + type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } @@ -1698,6 +1768,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: SepaDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -1745,6 +1820,11 @@ declare module 'stripe' { */ setup_future_usage?: UsBankAccount.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -2121,9 +2201,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; @@ -2269,9 +2349,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index fc0bfd9ec0..4c3d4c6ff7 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -1216,6 +1216,11 @@ declare module 'stripe' { */ setup_future_usage?: AcssDebit.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Verification method for the intent */ @@ -1334,6 +1339,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: 'none'; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } interface BacsDebit { @@ -1352,6 +1362,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: BacsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -1431,6 +1446,11 @@ declare module 'stripe' { */ request_three_d_secure?: Card.RequestThreeDSecure; + /** + * Restrictions to apply to the card payment method. For example, you can block specific card brands. + */ + restrictions?: Card.Restrictions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -1472,6 +1492,21 @@ declare module 'stripe' { type RequestThreeDSecure = 'any' | 'automatic' | 'challenge'; + interface Restrictions { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. + */ + brands_blocked?: Array; + } + + namespace Restrictions { + type BrandsBlocked = + | 'american_express' + | 'discover_global_network' + | 'mastercard' + | 'visa'; + } + type SetupFutureUsage = 'off_session' | 'on_session'; } @@ -1935,6 +1970,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: SepaDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -1985,6 +2025,11 @@ declare module 'stripe' { */ setup_future_usage?: UsBankAccount.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Verification method for the intent */ @@ -2688,6 +2733,11 @@ declare module 'stripe' { } interface SessionUpdateParams { + /** + * Information about the customer collected within the Checkout Session. + */ + collected_information?: SessionUpdateParams.CollectedInformation; + /** * Specifies which fields in the response should be expanded. */ @@ -2699,6 +2749,63 @@ declare module 'stripe' { metadata?: Stripe.Emptyable; } + namespace SessionUpdateParams { + interface CollectedInformation { + /** + * The shipping details to apply to this Session. + */ + shipping_details?: CollectedInformation.ShippingDetails; + } + + namespace CollectedInformation { + interface ShippingDetails { + /** + * The address of the customer + */ + address: ShippingDetails.Address; + + /** + * The name of customer + */ + name: string; + } + + namespace ShippingDetails { + interface Address { + /** + * City, district, suburb, town, or village. + */ + city?: string; + + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country: string; + + /** + * Address line 1 (e.g., street, PO Box, or company name). + */ + line1: string; + + /** + * Address line 2 (e.g., apartment, suite, unit, or building). + */ + line2?: string; + + /** + * ZIP or postal code. + */ + postal_code?: string; + + /** + * State, county, province, or region. + */ + state?: string; + } + } + } + } + interface SessionListParams extends PaginationParams { /** * Only return Checkout Sessions that were created during the given date interval. diff --git a/types/ConfirmationTokens.d.ts b/types/ConfirmationTokens.d.ts index 40480d6887..85599e155f 100644 --- a/types/ConfirmationTokens.d.ts +++ b/types/ConfirmationTokens.d.ts @@ -584,7 +584,7 @@ declare module 'stripe' { network: string | null; /** - * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. */ network_transaction_id: string | null; @@ -711,7 +711,7 @@ declare module 'stripe' { interface Networks { /** - * All available networks for the card. + * All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ available: Array; @@ -911,7 +911,7 @@ declare module 'stripe' { namespace CardPresent { interface Networks { /** - * All available networks for the card. + * All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ available: Array; @@ -1177,7 +1177,7 @@ declare module 'stripe' { namespace InteracPresent { interface Networks { /** - * All available networks for the card. + * All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ available: Array; diff --git a/types/CreditNotes.d.ts b/types/CreditNotes.d.ts index f83d7dda60..ffa72104e5 100644 --- a/types/CreditNotes.d.ts +++ b/types/CreditNotes.d.ts @@ -249,9 +249,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index 88036ba429..e9f2750170 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -1327,9 +1327,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; diff --git a/types/LineItems.d.ts b/types/LineItems.d.ts index c18577584a..157d0b7520 100644 --- a/types/LineItems.d.ts +++ b/types/LineItems.d.ts @@ -90,9 +90,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index b26fd57b12..251477b78e 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -1450,6 +1450,11 @@ declare module 'stripe' { */ setup_future_usage?: AcssDebit.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -1594,6 +1599,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: AuBecsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -1613,6 +1623,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: BacsDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -2413,6 +2428,11 @@ declare module 'stripe' { * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). */ setup_future_usage?: SepaDebit.SetupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -2509,6 +2529,11 @@ declare module 'stripe' { */ setup_future_usage?: UsBankAccount.SetupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -2677,14 +2702,14 @@ declare module 'stripe' { interface TransferData { /** - * Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + * The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. + * The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer + * representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). */ amount?: number; /** - * The account (if any) that the payment is attributed to for tax - * reporting, and where funds from the payment are transferred to after - * payment success. + * The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. */ destination: string | Stripe.Account; } diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 779dcbd1b5..b4e14f5f0b 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -1179,6 +1179,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -1349,6 +1354,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -1373,6 +1383,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -2453,6 +2468,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -2570,6 +2590,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -2579,7 +2604,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * Provide filters for the linked accounts that the customer can select for the payment method + * Provide filters for the linked accounts that the customer can select for the payment method. */ filters?: FinancialConnections.Filters; @@ -3805,6 +3830,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -3975,6 +4005,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -3999,6 +4034,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -5079,6 +5119,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -5196,6 +5241,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -5205,7 +5255,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * Provide filters for the linked accounts that the customer can select for the payment method + * Provide filters for the linked accounts that the customer can select for the payment method. */ filters?: FinancialConnections.Filters; @@ -6541,6 +6591,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -6711,6 +6766,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace AuBecsDebit { @@ -6735,6 +6795,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace BacsDebit { @@ -7815,6 +7880,11 @@ declare module 'stripe' { * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. */ setup_future_usage?: Stripe.Emptyable; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; } namespace SepaDebit { @@ -7932,6 +8002,11 @@ declare module 'stripe' { */ setup_future_usage?: Stripe.Emptyable; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + */ + target_date?: string; + /** * Bank account verification method. */ @@ -7941,7 +8016,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * Provide filters for the linked accounts that the customer can select for the payment method + * Provide filters for the linked accounts that the customer can select for the payment method. */ filters?: FinancialConnections.Filters; diff --git a/types/PaymentMethods.d.ts b/types/PaymentMethods.d.ts index 36f53b4120..f441a41c23 100644 --- a/types/PaymentMethods.d.ts +++ b/types/PaymentMethods.d.ts @@ -486,7 +486,7 @@ declare module 'stripe' { network: string | null; /** - * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. */ network_transaction_id: string | null; @@ -613,7 +613,7 @@ declare module 'stripe' { interface Networks { /** - * All available networks for the card. + * All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ available: Array; @@ -813,7 +813,7 @@ declare module 'stripe' { namespace CardPresent { interface Networks { /** - * All available networks for the card. + * All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ available: Array; @@ -1079,7 +1079,7 @@ declare module 'stripe' { namespace InteracPresent { interface Networks { /** - * All available networks for the card. + * All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network). */ available: Array; diff --git a/types/ProductsResource.d.ts b/types/ProductsResource.d.ts index e5fdab2bfd..e18581300c 100644 --- a/types/ProductsResource.d.ts +++ b/types/ProductsResource.d.ts @@ -106,6 +106,11 @@ declare module 'stripe' { */ custom_unit_amount?: DefaultPriceData.CustomUnitAmount; + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + /** * The recurring components of a price such as `interval` and `interval_count`. */ diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index 7645f85ae6..ad69164479 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -301,9 +301,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; @@ -415,9 +415,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; @@ -590,9 +590,9 @@ declare module 'stripe' { amount: number; /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ rate: Stripe.TaxRate; diff --git a/types/Refunds.d.ts b/types/Refunds.d.ts index d0dfaba75b..d42a5fbc2d 100644 --- a/types/Refunds.d.ts +++ b/types/Refunds.d.ts @@ -192,7 +192,7 @@ declare module 'stripe' { /** * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. */ - network_decline_code?: string | null; + network_decline_code: string | null; /** * The reference assigned to the refund. @@ -341,7 +341,7 @@ declare module 'stripe' { /** * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. */ - network_decline_code?: string | null; + network_decline_code: string | null; /** * The reference assigned to the refund. diff --git a/types/SetupIntentsResource.d.ts b/types/SetupIntentsResource.d.ts index 416c39f78c..afc3a24bb3 100644 --- a/types/SetupIntentsResource.d.ts +++ b/types/SetupIntentsResource.d.ts @@ -1229,7 +1229,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * Provide filters for the linked accounts that the customer can select for the payment method + * Provide filters for the linked accounts that the customer can select for the payment method. */ filters?: FinancialConnections.Filters; @@ -2432,7 +2432,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * Provide filters for the linked accounts that the customer can select for the payment method + * Provide filters for the linked accounts that the customer can select for the payment method. */ filters?: FinancialConnections.Filters; @@ -3684,7 +3684,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * Provide filters for the linked accounts that the customer can select for the payment method + * Provide filters for the linked accounts that the customer can select for the payment method. */ filters?: FinancialConnections.Filters; diff --git a/types/Tax/CalculationLineItems.d.ts b/types/Tax/CalculationLineItems.d.ts index 5ad96d0132..434fc77c3a 100644 --- a/types/Tax/CalculationLineItems.d.ts +++ b/types/Tax/CalculationLineItems.d.ts @@ -113,7 +113,7 @@ declare module 'stripe' { level: Jurisdiction.Level; /** - * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. */ state: string | null; } diff --git a/types/Tax/Calculations.d.ts b/types/Tax/Calculations.d.ts index 9eddd136fe..b1e050ab36 100644 --- a/types/Tax/Calculations.d.ts +++ b/types/Tax/Calculations.d.ts @@ -322,7 +322,7 @@ declare module 'stripe' { level: Jurisdiction.Level; /** - * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. */ state: string | null; } diff --git a/types/Tax/Transactions.d.ts b/types/Tax/Transactions.d.ts index a398cd079a..a5cc3e8f66 100644 --- a/types/Tax/Transactions.d.ts +++ b/types/Tax/Transactions.d.ts @@ -334,7 +334,7 @@ declare module 'stripe' { level: Jurisdiction.Level; /** - * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. */ state: string | null; } diff --git a/types/TaxRates.d.ts b/types/TaxRates.d.ts index 367a957de6..28df4d0a88 100644 --- a/types/TaxRates.d.ts +++ b/types/TaxRates.d.ts @@ -3,9 +3,9 @@ declare module 'stripe' { namespace Stripe { /** - * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. * - * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + * Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates) */ interface TaxRate { /** @@ -91,7 +91,7 @@ declare module 'stripe' { rate_type: TaxRate.RateType | null; /** - * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. */ state: string | null; diff --git a/types/TaxRatesResource.d.ts b/types/TaxRatesResource.d.ts index eb307b6f9b..4c9ab695c9 100644 --- a/types/TaxRatesResource.d.ts +++ b/types/TaxRatesResource.d.ts @@ -49,7 +49,7 @@ declare module 'stripe' { metadata?: Stripe.MetadataParam; /** - * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. */ state?: string; @@ -121,7 +121,7 @@ declare module 'stripe' { metadata?: Stripe.Emptyable; /** - * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. */ state?: string; diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index 6a66d57e0f..6c0766ace8 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -147,7 +147,8 @@ declare module 'stripe' { | '2024-10-28.acacia' | '2024-11-20.acacia' | '2024-12-18.acacia' - | '2025-01-27.acacia'; + | '2025-01-27.acacia' + | '2025-02-24.acacia'; type EnabledEvent = | '*' diff --git a/types/lib.d.ts b/types/lib.d.ts index e9940c2cf6..201d8ded77 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -27,7 +27,7 @@ declare module 'stripe' { }): (...args: any[]) => Response; //eslint-disable-line @typescript-eslint/no-explicit-any static MAX_BUFFERED_REQUEST_METRICS: number; } - export type LatestApiVersion = '2025-01-27.acacia'; + export type LatestApiVersion = '2025-02-24.acacia'; export type HttpAgent = Agent; export type HttpProtocol = 'http' | 'https'; diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts index 2500374bf6..a21707a4ca 100644 --- a/types/test/typescriptTest.ts +++ b/types/test/typescriptTest.ts @@ -9,7 +9,7 @@ import Stripe from 'stripe'; let stripe = new Stripe('sk_test_123', { - apiVersion: '2025-01-27.acacia', + apiVersion: '2025-02-24.acacia', }); stripe = new Stripe('sk_test_123'); @@ -26,7 +26,7 @@ stripe = new Stripe('sk_test_123', { // Check config object. stripe = new Stripe('sk_test_123', { - apiVersion: '2025-01-27.acacia', + apiVersion: '2025-02-24.acacia', typescript: true, maxNetworkRetries: 1, timeout: 1000, @@ -44,7 +44,7 @@ stripe = new Stripe('sk_test_123', { description: 'test', }; const opts: Stripe.RequestOptions = { - apiVersion: '2025-01-27.acacia', + apiVersion: '2025-02-24.acacia', }; const customer: Stripe.Customer = await stripe.customers.create(params, opts); From 4b95f81006d6ab3a3f018fe53dba4d42ce82e919 Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Mon, 24 Feb 2025 17:34:52 -0500 Subject: [PATCH 23/53] Bump version to 17.7.0 --- CHANGELOG.md | 15 +++++++++++++++ VERSION | 2 +- package.json | 2 +- src/stripe.core.ts | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 032483c546..85cd5f6aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,19 @@ # Changelog +## 17.7.0 - 2025-02-24 +* [#2256](https://github.com/stripe/stripe-node/pull/2256) Update generated code + * Add support for `prices` on `Billing.CreditBalanceSummaryRetrieveParams.filter.applicability_scope`, `Billing.CreditGrant.applicability_config.scope`, and `Billing.CreditGrantCreateParams.applicability_config.scope` + * Change `Billing.CreditBalanceSummaryRetrieveParams.filter.applicability_scope.price_type`, `Billing.CreditGrant.applicability_config.scope.price_type`, and `Billing.CreditGrantCreateParams.applicability_config.scope.price_type` to be optional + * Add support for `priority` on `Billing.CreditGrantCreateParams` and `Billing.CreditGrant` + * Add support for `target_date` on `Checkout.Session.payment_method_options.acss_debit`, `Checkout.Session.payment_method_options.au_becs_debit`, `Checkout.Session.payment_method_options.bacs_debit`, `Checkout.Session.payment_method_options.sepa_debit`, `Checkout.Session.payment_method_options.us_bank_account`, `Checkout.SessionCreateParams.payment_method_options.acss_debit`, `Checkout.SessionCreateParams.payment_method_options.au_becs_debit`, `Checkout.SessionCreateParams.payment_method_options.bacs_debit`, `Checkout.SessionCreateParams.payment_method_options.sepa_debit`, `Checkout.SessionCreateParams.payment_method_options.us_bank_account`, `PaymentIntent.payment_method_options.acss_debit`, `PaymentIntent.payment_method_options.au_becs_debit`, `PaymentIntent.payment_method_options.bacs_debit`, `PaymentIntent.payment_method_options.sepa_debit`, `PaymentIntent.payment_method_options.us_bank_account`, `PaymentIntentConfirmParams.payment_method_options.acss_debit`, `PaymentIntentConfirmParams.payment_method_options.au_becs_debit`, `PaymentIntentConfirmParams.payment_method_options.bacs_debit`, `PaymentIntentConfirmParams.payment_method_options.sepa_debit`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account`, `PaymentIntentCreateParams.payment_method_options.acss_debit`, `PaymentIntentCreateParams.payment_method_options.au_becs_debit`, `PaymentIntentCreateParams.payment_method_options.bacs_debit`, `PaymentIntentCreateParams.payment_method_options.sepa_debit`, `PaymentIntentCreateParams.payment_method_options.us_bank_account`, `PaymentIntentUpdateParams.payment_method_options.acss_debit`, `PaymentIntentUpdateParams.payment_method_options.au_becs_debit`, `PaymentIntentUpdateParams.payment_method_options.bacs_debit`, `PaymentIntentUpdateParams.payment_method_options.sepa_debit`, and `PaymentIntentUpdateParams.payment_method_options.us_bank_account` + * Add support for `restrictions` on `Checkout.Session.payment_method_options.card` and `Checkout.SessionCreateParams.payment_method_options.card` + * Add support for `collected_information` on `Checkout.SessionUpdateParams` and `Checkout.Session` + * Change `Checkout.Session.discounts`, `Refund.destination_details.blik.network_decline_code`, and `Refund.destination_details.swish.network_decline_code` to be required + * Add support for `metadata` on `ProductCreateParams.default_price_data` + * Change type of `TokenCreateParams.person.political_exposure` from `string` to `enum('existing'|'none')` + * Add support for new value `2025-02-24.acacia` on enum `WebhookEndpointCreateParams.api_version` +* [#2259](https://github.com/stripe/stripe-node/pull/2259) Add Next.js App Router webhook example that leverages Route Handlers +* [#2257](https://github.com/stripe/stripe-node/pull/2257) Include `OPENAPI_VERSION` into npm bundle + ## 17.6.0 - 2025-01-27 * [#2250](https://github.com/stripe/stripe-node/pull/2250) Update generated code * Add support for `close` method on resource `Treasury.FinancialAccount` diff --git a/VERSION b/VERSION index ea3bf215cf..2d573323ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -17.6.0 +17.7.0 diff --git a/package.json b/package.json index 88fa28e8e7..3b6cb3bcb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stripe", - "version": "17.6.0", + "version": "17.7.0", "description": "Stripe API wrapper", "keywords": [ "stripe", diff --git a/src/stripe.core.ts b/src/stripe.core.ts index 496f1f9e17..c0dbf70dc4 100644 --- a/src/stripe.core.ts +++ b/src/stripe.core.ts @@ -59,7 +59,7 @@ export function createStripe( platformFunctions: PlatformFunctions, requestSender: RequestSenderFactory = defaultRequestSenderFactory ): typeof Stripe { - Stripe.PACKAGE_VERSION = '17.6.0'; + Stripe.PACKAGE_VERSION = '17.7.0'; Stripe.USER_AGENT = { bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', From 0fe3d181dba854381602bbdfe906380c821ca5af Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:30:54 +0000 Subject: [PATCH 24/53] Update generated code for v1507 --- OPENAPI_VERSION | 2 +- types/PaymentAttemptRecords.d.ts | 2 +- types/PaymentRecords.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f1a1303d6d..835b9b587d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1506 \ No newline at end of file +v1507 \ No newline at end of file diff --git a/types/PaymentAttemptRecords.d.ts b/types/PaymentAttemptRecords.d.ts index ae2599183a..da5358cd0d 100644 --- a/types/PaymentAttemptRecords.d.ts +++ b/types/PaymentAttemptRecords.d.ts @@ -77,7 +77,7 @@ declare module 'stripe' { /** * ID of the Payment Record this Payment Attempt Record belongs to. */ - payment_record: string; + payment_record: string | null; /** * An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. diff --git a/types/PaymentRecords.d.ts b/types/PaymentRecords.d.ts index 88ad42ff5c..805dbe7cc7 100644 --- a/types/PaymentRecords.d.ts +++ b/types/PaymentRecords.d.ts @@ -62,7 +62,7 @@ declare module 'stripe' { /** * ID of the latest Payment Attempt Record attached to this Payment Record. */ - latest_payment_attempt_record: string; + latest_payment_attempt_record: string | null; /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. From 707abe6a2cf6898aba33d9e0307e8f7cc454e607 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 17:28:49 +0000 Subject: [PATCH 25/53] Update generated code for v1508 --- OPENAPI_VERSION | 2 +- src/apiVersion.ts | 2 +- types/WebhookEndpointsResource.d.ts | 4 +++- types/lib.d.ts | 2 +- types/test/typescriptTest.ts | 6 +++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 835b9b587d..a05efb7627 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1507 \ No newline at end of file +v1508 \ No newline at end of file diff --git a/src/apiVersion.ts b/src/apiVersion.ts index 436a7469c2..621bff35d0 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,3 +1,3 @@ // File generated from our OpenAPI spec -export const ApiVersion = '2025-02-24.acacia'; +export const ApiVersion = '2025-03-31.basil'; diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index c3edb128ba..060b6b19ea 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -148,7 +148,9 @@ declare module 'stripe' { | '2024-11-20.acacia' | '2024-12-18.acacia' | '2025-01-27.acacia' - | '2025-02-24.acacia'; + | '2025-02-24.acacia' + | '2025-03-01.dashboard' + | '2025-03-31.basil'; type EnabledEvent = | '*' diff --git a/types/lib.d.ts b/types/lib.d.ts index 201d8ded77..20be1d2eca 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -27,7 +27,7 @@ declare module 'stripe' { }): (...args: any[]) => Response; //eslint-disable-line @typescript-eslint/no-explicit-any static MAX_BUFFERED_REQUEST_METRICS: number; } - export type LatestApiVersion = '2025-02-24.acacia'; + export type LatestApiVersion = '2025-03-31.basil'; export type HttpAgent = Agent; export type HttpProtocol = 'http' | 'https'; diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts index a21707a4ca..e31ddc84e2 100644 --- a/types/test/typescriptTest.ts +++ b/types/test/typescriptTest.ts @@ -9,7 +9,7 @@ import Stripe from 'stripe'; let stripe = new Stripe('sk_test_123', { - apiVersion: '2025-02-24.acacia', + apiVersion: '2025-03-31.basil', }); stripe = new Stripe('sk_test_123'); @@ -26,7 +26,7 @@ stripe = new Stripe('sk_test_123', { // Check config object. stripe = new Stripe('sk_test_123', { - apiVersion: '2025-02-24.acacia', + apiVersion: '2025-03-31.basil', typescript: true, maxNetworkRetries: 1, timeout: 1000, @@ -44,7 +44,7 @@ stripe = new Stripe('sk_test_123', { description: 'test', }; const opts: Stripe.RequestOptions = { - apiVersion: '2025-02-24.acacia', + apiVersion: '2025-03-31.basil', }; const customer: Stripe.Customer = await stripe.customers.create(params, opts); From 7a466c8584af55ec5de370d75998ff85698cd19e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 03:24:01 +0000 Subject: [PATCH 26/53] Update generated code for v1510 --- OPENAPI_VERSION | 2 +- types/PaymentAttemptRecords.d.ts | 4 +--- types/PaymentRecords.d.ts | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a05efb7627..7cb5d95b3e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1508 \ No newline at end of file +v1510 \ No newline at end of file diff --git a/types/PaymentAttemptRecords.d.ts b/types/PaymentAttemptRecords.d.ts index da5358cd0d..1520bd7949 100644 --- a/types/PaymentAttemptRecords.d.ts +++ b/types/PaymentAttemptRecords.d.ts @@ -189,7 +189,7 @@ declare module 'stripe' { /** * The type of Payment Method used for this payment attempt. */ - type: PaymentMethodDetails.Type; + type: string; } namespace PaymentMethodDetails { @@ -393,8 +393,6 @@ declare module 'stripe' { */ type: string | null; } - - type Type = 'card' | 'custom'; } interface ShippingDetails { diff --git a/types/PaymentRecords.d.ts b/types/PaymentRecords.d.ts index 805dbe7cc7..23c10a03b2 100644 --- a/types/PaymentRecords.d.ts +++ b/types/PaymentRecords.d.ts @@ -189,7 +189,7 @@ declare module 'stripe' { /** * The type of Payment Method used for this payment attempt. */ - type: PaymentMethodDetails.Type; + type: string; } namespace PaymentMethodDetails { @@ -393,8 +393,6 @@ declare module 'stripe' { */ type: string | null; } - - type Type = 'card' | 'custom'; } interface ShippingDetails { From 800703b64a78706f0cea50224f56bbc2f1f3dd14 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 00:00:48 +0000 Subject: [PATCH 27/53] Update generated code for v1511 --- OPENAPI_VERSION | 2 +- types/Issuing/Settlements.d.ts | 10 + types/PaymentAttemptRecords.d.ts | 1643 ++++++++++++++++- types/PaymentRecords.d.ts | 1643 ++++++++++++++++- types/Terminal/Configurations.d.ts | 83 + types/Terminal/ConfigurationsResource.d.ts | 190 ++ .../TestHelpers/Terminal/ReadersResource.d.ts | 6 +- 7 files changed, 3559 insertions(+), 18 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7cb5d95b3e..fabdcb1ee0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1510 \ No newline at end of file +v1511 \ No newline at end of file diff --git a/types/Issuing/Settlements.d.ts b/types/Issuing/Settlements.d.ts index a5f40b3665..dbc852cf8e 100644 --- a/types/Issuing/Settlements.d.ts +++ b/types/Issuing/Settlements.d.ts @@ -72,6 +72,16 @@ declare module 'stripe' { */ network_settlement_identifier: string; + /** + * The total amount of any additional ad-hoc fees accessed by the card network. + */ + other_fees_amount: number; + + /** + * The total number of additional ad-hoc fees accessed by the card network. + */ + other_fees_count: number; + /** * One of `international` or `uk_national_net`. */ diff --git a/types/PaymentAttemptRecords.d.ts b/types/PaymentAttemptRecords.d.ts index 1520bd7949..6205750b2a 100644 --- a/types/PaymentAttemptRecords.d.ts +++ b/types/PaymentAttemptRecords.d.ts @@ -164,16 +164,46 @@ declare module 'stripe' { type CustomerPresence = 'off_session' | 'on_session'; interface PaymentMethodDetails { + ach_credit_transfer?: PaymentMethodDetails.AchCreditTransfer; + + ach_debit?: PaymentMethodDetails.AchDebit; + + acss_debit?: PaymentMethodDetails.AcssDebit; + + affirm?: PaymentMethodDetails.Affirm; + + afterpay_clearpay?: PaymentMethodDetails.AfterpayClearpay; + + alipay?: PaymentMethodDetails.Alipay; + + alma?: PaymentMethodDetails.Alma; + + amazon_pay?: PaymentMethodDetails.AmazonPay; + + au_becs_debit?: PaymentMethodDetails.AuBecsDebit; + + bacs_debit?: PaymentMethodDetails.BacsDebit; + + bancontact?: PaymentMethodDetails.Bancontact; + /** * The billing details associated with the method of payment. */ billing_details: PaymentMethodDetails.BillingDetails | null; + blik?: PaymentMethodDetails.Blik; + + boleto?: PaymentMethodDetails.Boleto; + /** * Details of the card used for this payment attempt. */ card?: PaymentMethodDetails.Card; + card_present?: PaymentMethodDetails.CardPresent; + + cashapp?: PaymentMethodDetails.Cashapp; + /** * Custom Payment Methods represent Payment Method types not modeled directly in * the Stripe API. This resource consists of details about the custom payment method @@ -181,18 +211,378 @@ declare module 'stripe' { */ custom?: PaymentMethodDetails.Custom; + customer_balance?: PaymentMethodDetails.CustomerBalance; + + eps?: PaymentMethodDetails.Eps; + + fpx?: PaymentMethodDetails.Fpx; + + giropay?: PaymentMethodDetails.Giropay; + + gopay?: PaymentMethodDetails.Gopay; + + grabpay?: PaymentMethodDetails.Grabpay; + + id_bank_transfer?: PaymentMethodDetails.IdBankTransfer; + + ideal?: PaymentMethodDetails.Ideal; + + interac_present?: PaymentMethodDetails.InteracPresent; + + kakao_pay?: PaymentMethodDetails.KakaoPay; + + klarna?: PaymentMethodDetails.Klarna; + + konbini?: PaymentMethodDetails.Konbini; + + kr_card?: PaymentMethodDetails.KrCard; + + link?: PaymentMethodDetails.Link; + + mb_way?: PaymentMethodDetails.MbWay; + + mobilepay?: PaymentMethodDetails.Mobilepay; + + multibanco?: PaymentMethodDetails.Multibanco; + + naver_pay?: PaymentMethodDetails.NaverPay; + + oxxo?: PaymentMethodDetails.Oxxo; + + p24?: PaymentMethodDetails.P24; + + pay_by_bank?: PaymentMethodDetails.PayByBank; + + payco?: PaymentMethodDetails.Payco; + /** * ID of the Stripe PaymentMethod used to make this payment. */ payment_method: string | null; + paynow?: PaymentMethodDetails.Paynow; + + paypal?: PaymentMethodDetails.Paypal; + + payto?: PaymentMethodDetails.Payto; + + pix?: PaymentMethodDetails.Pix; + + promptpay?: PaymentMethodDetails.Promptpay; + + qris?: PaymentMethodDetails.Qris; + + rechnung?: PaymentMethodDetails.Rechnung; + + revolut_pay?: PaymentMethodDetails.RevolutPay; + + samsung_pay?: PaymentMethodDetails.SamsungPay; + + sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer; + + sepa_debit?: PaymentMethodDetails.SepaDebit; + + shopeepay?: PaymentMethodDetails.Shopeepay; + + sofort?: PaymentMethodDetails.Sofort; + + stripe_account?: PaymentMethodDetails.StripeAccount; + + swish?: PaymentMethodDetails.Swish; + + twint?: PaymentMethodDetails.Twint; + /** - * The type of Payment Method used for this payment attempt. + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. */ type: string; + + us_bank_account?: PaymentMethodDetails.UsBankAccount; + + wechat?: PaymentMethodDetails.Wechat; + + wechat_pay?: PaymentMethodDetails.WechatPay; + + zip?: PaymentMethodDetails.Zip; } namespace PaymentMethodDetails { + interface AchCreditTransfer { + /** + * Account number to transfer funds to. + */ + account_number: string | null; + + /** + * Name of the bank associated with the routing number. + */ + bank_name: string | null; + + /** + * Routing transit number for the bank account to transfer funds to. + */ + routing_number: string | null; + + /** + * SWIFT code of the bank associated with the routing number. + */ + swift_code: string | null; + } + + interface AchDebit { + /** + * Type of entity that holds the account. This can be either `individual` or `company`. + */ + account_holder_type: AchDebit.AccountHolderType | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * Routing transit number of the bank account. + */ + routing_number: string | null; + } + + namespace AchDebit { + type AccountHolderType = 'company' | 'individual'; + } + + interface AcssDebit { + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Institution number of the bank account + */ + institution_number: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string; + + /** + * Transit number of the bank account. + */ + transit_number: string | null; + } + + interface Affirm { + /** + * The Affirm transaction ID associated with this payment. + */ + transaction_id: string | null; + } + + interface AfterpayClearpay { + /** + * The Afterpay order ID associated with this payment intent. + */ + order_id: string | null; + + /** + * Order identifier shown to the merchant in Afterpay's online portal. + */ + reference: string | null; + } + + interface Alipay { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ + buyer_id?: string; + + /** + * 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 Alma {} + + interface AmazonPay { + funding?: AmazonPay.Funding; + } + + namespace AmazonPay { + interface Funding { + card?: Funding.Card; + + /** + * funding type of the underlying payment method. + */ + type: 'card' | null; + } + + namespace Funding { + interface Card { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand: string | null; + + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) + */ + brand_product?: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number | null; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + } + } + } + + interface AuBecsDebit { + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string; + } + + interface BacsDebit { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate: string | null; + + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ + sort_code: string | null; + } + + interface Bancontact { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit: string | Stripe.PaymentMethod | null; + + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate: string | Stripe.Mandate | null; + + /** + * Last four characters of the IBAN. + */ + iban_last4: string | null; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language: Bancontact.PreferredLanguage | null; + + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name: string | null; + } + + namespace Bancontact { + type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl'; + } + interface BillingDetails { /** * A representation of a physical address. @@ -215,6 +605,20 @@ declare module 'stripe' { phone: string | null; } + interface Blik { + /** + * A unique and immutable identifier assigned by BLIK to every buyer. + */ + buyer_id: string | null; + } + + interface Boleto { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) + */ + tax_id: string; + } + interface Card { /** * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -382,17 +786,1242 @@ declare module 'stripe' { } } - interface Custom { + interface CardPresent { /** - * Display name for the custom (user-defined) payment method type used to make this payment. + * The authorized amount */ - display_name: string; + amount_authorized: number | null; /** - * The custom payment method type associated with this payment. + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - type: string | null; - } + brand: string | null; + + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ + brand_product: string | null; + + /** + * When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + */ + capture_before?: number; + + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ + description?: string | null; + + /** + * Authorization response cryptogram. + */ + emv_auth_data: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ + fingerprint: string | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ + generated_card: string | null; + + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ + iin?: string | null; + + /** + * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + */ + incremental_authorization_supported: boolean; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ + issuer?: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network: string | null; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ + network_transaction_id: string | null; + + /** + * Details about payments collected offline. + */ + offline: CardPresent.Offline | null; + + /** + * Defines whether the authorized amount can be over-captured or not + */ + overcapture_supported: boolean; + + /** + * EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + */ + preferred_locales: Array | null; + + /** + * How card details were read in this transaction. + */ + read_method: CardPresent.ReadMethod | null; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ + receipt: CardPresent.Receipt | null; + + wallet?: CardPresent.Wallet; + } + + namespace CardPresent { + interface Offline { + /** + * Time at which the payment was collected while offline + */ + stored_at: number | null; + + /** + * The method used to process this payment method offline. Only deferred is allowed. + */ + type: 'deferred' | null; + } + + type ReadMethod = + | 'contact_emv' + | 'contactless_emv' + | 'contactless_magstripe_mode' + | 'magnetic_stripe_fallback' + | 'magnetic_stripe_track2'; + + interface Receipt { + /** + * The type of account being debited or credited + */ + account_type?: Receipt.AccountType; + + /** + * EMV tag 9F26, cryptogram generated by the integrated circuit chip. + */ + application_cryptogram: string | null; + + /** + * Mnenomic of the Application Identifier. + */ + application_preferred_name: string | null; + + /** + * Identifier for this transaction. + */ + authorization_code: string | null; + + /** + * EMV tag 8A. A code returned by the card issuer. + */ + authorization_response_code: string | null; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ + cardholder_verification_method: string | null; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + dedicated_file_name: string | null; + + /** + * The outcome of a series of EMV functions performed by the card reader. + */ + terminal_verification_results: string | null; + + /** + * An indication of various EMV functions performed during the transaction. + */ + transaction_status_information: string | null; + } + + namespace Receipt { + type AccountType = 'checking' | 'credit' | 'prepaid' | 'unknown'; + } + + interface Wallet { + /** + * The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + */ + type: Wallet.Type; + } + + namespace Wallet { + type Type = 'apple_pay' | 'google_pay' | 'samsung_pay' | 'unknown'; + } + } + + interface Cashapp { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ + buyer_id: string | null; + + /** + * A public identifier for buyers using Cash App. + */ + cashtag: string | null; + } + + interface Custom { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + display_name: string; + + /** + * The custom payment method type associated with this payment. + */ + type: string | null; + } + + interface CustomerBalance {} + + interface Eps { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ + bank: Eps.Bank | null; + + /** + * Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name: string | null; + } + + namespace Eps { + type Bank = + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau'; + } + + interface Fpx { + /** + * Account holder type, if provided. Can be one of `individual` or `company`. + */ + account_holder_type: Fpx.AccountHolderType | null; + + /** + * The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ + bank: Fpx.Bank; + + /** + * Unique transaction id generated by FPX for every request from the merchant + */ + transaction_id: string | null; + } + + namespace Fpx { + type AccountHolderType = 'company' | 'individual'; + + type Bank = + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_of_china' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob'; + } + + interface Giropay { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name: string | null; + } + + interface Gopay {} + + interface Grabpay { + /** + * Unique transaction id generated by GrabPay + */ + transaction_id: string | null; + } + + interface IdBankTransfer { + /** + * Account number of the bank account to transfer funds to. + */ + account_number: string; + + /** + * Bank where the account is located. + */ + bank: IdBankTransfer.Bank; + + /** + * Local bank code of the bank. + */ + bank_code?: string; + + /** + * Name of the bank associated with the bank account. + */ + bank_name?: string; + + /** + * Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + */ + display_name?: string; + } + + namespace IdBankTransfer { + type Bank = 'bca' | 'bni' | 'bri' | 'cimb' | 'permata'; + } + + interface Ideal { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ + bank: Ideal.Bank | null; + + /** + * The Bank Identifier Code of the customer's bank. + */ + bic: Ideal.Bic | null; + + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit: string | Stripe.PaymentMethod | null; + + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate: string | Stripe.Mandate | null; + + /** + * Last four characters of the IBAN. + */ + iban_last4: string | null; + + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name: string | null; + } + + namespace Ideal { + type Bank = + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'n26' + | 'nn' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + | 'yoursafe'; + + type Bic = + | 'ABNANL2A' + | 'ASNBNL21' + | 'BITSNL2A' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'NNBANL2G' + | 'NTSBDEB1' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOIE23' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U'; + } + + interface InteracPresent { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ + brand: string | null; + + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ + description?: string | null; + + /** + * Authorization response cryptogram. + */ + emv_auth_data: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ + fingerprint: string | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ + generated_card: string | null; + + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ + iin?: string | null; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ + issuer?: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network: string | null; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ + network_transaction_id: string | null; + + /** + * EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + */ + preferred_locales: Array | null; + + /** + * How card details were read in this transaction. + */ + read_method: InteracPresent.ReadMethod | null; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ + receipt: InteracPresent.Receipt | null; + } + + namespace InteracPresent { + type ReadMethod = + | 'contact_emv' + | 'contactless_emv' + | 'contactless_magstripe_mode' + | 'magnetic_stripe_fallback' + | 'magnetic_stripe_track2'; + + interface Receipt { + /** + * The type of account being debited or credited + */ + account_type?: Receipt.AccountType; + + /** + * EMV tag 9F26, cryptogram generated by the integrated circuit chip. + */ + application_cryptogram: string | null; + + /** + * Mnenomic of the Application Identifier. + */ + application_preferred_name: string | null; + + /** + * Identifier for this transaction. + */ + authorization_code: string | null; + + /** + * EMV tag 8A. A code returned by the card issuer. + */ + authorization_response_code: string | null; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ + cardholder_verification_method: string | null; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + dedicated_file_name: string | null; + + /** + * The outcome of a series of EMV functions performed by the card reader. + */ + terminal_verification_results: string | null; + + /** + * An indication of various EMV functions performed during the transaction. + */ + transaction_status_information: string | null; + } + + namespace Receipt { + type AccountType = 'checking' | 'savings' | 'unknown'; + } + } + + interface KakaoPay { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface Klarna { + /** + * The payer details for this transaction. + */ + payer_details: Klarna.PayerDetails | null; + + /** + * The Klarna payment method used for this transaction. + * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + */ + payment_method_category: string | null; + + /** + * 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`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + */ + preferred_locale: string | null; + } + + namespace Klarna { + interface PayerDetails { + /** + * The payer's address + */ + address: PayerDetails.Address | null; + } + + namespace PayerDetails { + interface Address { + /** + * The payer address country + */ + country: string | null; + } + } + } + + interface Konbini { + /** + * If the payment succeeded, this contains the details of the convenience store where the payment was completed. + */ + store: Konbini.Store | null; + } + + namespace Konbini { + interface Store { + /** + * The name of the convenience store chain where the payment was completed. + */ + chain: Store.Chain | null; + } + + namespace Store { + type Chain = 'familymart' | 'lawson' | 'ministop' | 'seicomart'; + } + } + + interface KrCard { + /** + * The local credit or debit card brand. + */ + brand: KrCard.Brand | null; + + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + + /** + * The last four digits of the card. This may not be present for American Express cards. + */ + last4: string | null; + } + + namespace KrCard { + type Brand = + | 'bc' + | 'citi' + | 'hana' + | 'hyundai' + | 'jeju' + | 'jeonbuk' + | 'kakaobank' + | 'kbank' + | 'kdbbank' + | 'kookmin' + | 'kwangju' + | 'lotte' + | 'mg' + | 'nh' + | 'post' + | 'samsung' + | 'savingsbank' + | 'shinhan' + | 'shinhyup' + | 'suhyup' + | 'tossbank' + | 'woori'; + } + + interface Link { + /** + * Two-letter ISO code representing the funding source country beneath the Link payment. + * You could use this attribute to get a sense of international fees. + */ + country: string | null; + } + + interface MbWay {} + + interface Mobilepay { + /** + * Internal card details + */ + card: Mobilepay.Card | null; + } + + namespace Mobilepay { + interface Card { + /** + * Brand of the card used in the transaction + */ + brand: string | null; + + /** + * Two-letter ISO code representing the country of the card + */ + country: string | null; + + /** + * Two digit number representing the card's expiration month + */ + exp_month: number | null; + + /** + * Two digit number representing the card's expiration year + */ + exp_year: number | null; + + /** + * The last 4 digits of the card + */ + last4: string | null; + } + } + + interface Multibanco { + /** + * Entity number associated with this Multibanco payment. + */ + entity: string | null; + + /** + * Reference number associated with this Multibanco payment. + */ + reference: string | null; + } + + interface NaverPay { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface Oxxo { + /** + * OXXO reference number + */ + number: string | null; + } + + interface P24 { + /** + * The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + */ + bank: P24.Bank | null; + + /** + * Unique reference for this Przelewy24 payment. + */ + reference: string | null; + + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + verified_name: string | null; + } + + namespace P24 { + type Bank = + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'velobank' + | 'volkswagen_bank'; + } + + interface PayByBank {} + + interface Payco { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface Paynow { + /** + * Reference number associated with this PayNow payment + */ + reference: string | null; + } + + interface Paypal { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + country: string | null; + + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + payer_email: string | null; + + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ + payer_id: string | null; + + /** + * Owner's full name. Values provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + payer_name: string | null; + + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. + */ + seller_protection: Paypal.SellerProtection | null; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + shipping?: Stripe.Address | null; + + /** + * A unique ID generated by PayPal for this transaction. + */ + transaction_id: string | null; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + verified_address?: Stripe.Address | null; + + /** + * Owner's verified email. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_email?: string | null; + + /** + * Owner's verified full name. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null; + } + + namespace Paypal { + interface SellerProtection { + /** + * An array of conditions that are covered for the transaction, if applicable. + */ + dispute_categories: Array | null; + + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + */ + status: SellerProtection.Status; + } + + namespace SellerProtection { + type DisputeCategory = 'fraudulent' | 'product_not_received'; + + type Status = 'eligible' | 'not_eligible' | 'partially_eligible'; + } + } + + interface Payto { + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string; + + /** + * The PayID alias for the bank account. + */ + pay_id: string | null; + } + + interface Pix { + /** + * Unique transaction id generated by BCB + */ + bank_transaction_id?: string | null; + } + + interface Promptpay { + /** + * Bill reference generated by PromptPay + */ + reference: string | null; + } + + interface Qris {} + + interface Rechnung {} + + interface RevolutPay { + funding?: RevolutPay.Funding; + } + + namespace RevolutPay { + interface Funding { + card?: Funding.Card; + + /** + * funding type of the underlying payment method. + */ + type: 'card' | null; + } + + namespace Funding { + interface Card { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand: string | null; + + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) + */ + brand_product?: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number | null; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + } + } + } + + interface SamsungPay { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface SepaCreditTransfer { + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * IBAN of the bank account to transfer funds to. + */ + iban: string | null; + } + + interface SepaDebit { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Branch code of bank associated with the bank account. + */ + branch_code: string | null; + + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four characters of the IBAN. + */ + last4: string | null; + + /** + * Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). + */ + mandate: string | null; + } + + interface Shopeepay {} + + interface Sofort { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit: string | Stripe.PaymentMethod | null; + + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate: string | Stripe.Mandate | null; + + /** + * Last four characters of the IBAN. + */ + iban_last4: string | null; + + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + */ + preferred_language: Sofort.PreferredLanguage | null; + + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name: string | null; + } + + namespace Sofort { + type PreferredLanguage = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'it' + | 'nl' + | 'pl'; + } + + interface StripeAccount {} + + interface Swish { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer + */ + fingerprint: string | null; + + /** + * Payer bank reference number for the payment + */ + payment_reference: string | null; + + /** + * The last four digits of the Swish account phone number + */ + verified_phone_last4: string | null; + } + + interface Twint {} + + interface UsBankAccount { + /** + * Account holder type: individual or company. + */ + account_holder_type: UsBankAccount.AccountHolderType | null; + + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ + account_type: UsBankAccount.AccountType | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string | Stripe.Mandate; + + /** + * Reference number to locate ACH payments with customer's bank. + */ + payment_reference: string | null; + + /** + * Routing number of the bank account. + */ + routing_number: string | null; + } + + namespace UsBankAccount { + type AccountHolderType = 'company' | 'individual'; + + type AccountType = 'checking' | 'savings'; + } + + interface Wechat {} + + interface WechatPay { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + */ + fingerprint: string | null; + + /** + * Transaction ID of this particular WeChat Pay transaction. + */ + transaction_id: string | null; + } + + interface Zip {} } interface ShippingDetails { diff --git a/types/PaymentRecords.d.ts b/types/PaymentRecords.d.ts index 23c10a03b2..f06e64c641 100644 --- a/types/PaymentRecords.d.ts +++ b/types/PaymentRecords.d.ts @@ -164,16 +164,46 @@ declare module 'stripe' { type CustomerPresence = 'off_session' | 'on_session'; interface PaymentMethodDetails { + ach_credit_transfer?: PaymentMethodDetails.AchCreditTransfer; + + ach_debit?: PaymentMethodDetails.AchDebit; + + acss_debit?: PaymentMethodDetails.AcssDebit; + + affirm?: PaymentMethodDetails.Affirm; + + afterpay_clearpay?: PaymentMethodDetails.AfterpayClearpay; + + alipay?: PaymentMethodDetails.Alipay; + + alma?: PaymentMethodDetails.Alma; + + amazon_pay?: PaymentMethodDetails.AmazonPay; + + au_becs_debit?: PaymentMethodDetails.AuBecsDebit; + + bacs_debit?: PaymentMethodDetails.BacsDebit; + + bancontact?: PaymentMethodDetails.Bancontact; + /** * The billing details associated with the method of payment. */ billing_details: PaymentMethodDetails.BillingDetails | null; + blik?: PaymentMethodDetails.Blik; + + boleto?: PaymentMethodDetails.Boleto; + /** * Details of the card used for this payment attempt. */ card?: PaymentMethodDetails.Card; + card_present?: PaymentMethodDetails.CardPresent; + + cashapp?: PaymentMethodDetails.Cashapp; + /** * Custom Payment Methods represent Payment Method types not modeled directly in * the Stripe API. This resource consists of details about the custom payment method @@ -181,18 +211,378 @@ declare module 'stripe' { */ custom?: PaymentMethodDetails.Custom; + customer_balance?: PaymentMethodDetails.CustomerBalance; + + eps?: PaymentMethodDetails.Eps; + + fpx?: PaymentMethodDetails.Fpx; + + giropay?: PaymentMethodDetails.Giropay; + + gopay?: PaymentMethodDetails.Gopay; + + grabpay?: PaymentMethodDetails.Grabpay; + + id_bank_transfer?: PaymentMethodDetails.IdBankTransfer; + + ideal?: PaymentMethodDetails.Ideal; + + interac_present?: PaymentMethodDetails.InteracPresent; + + kakao_pay?: PaymentMethodDetails.KakaoPay; + + klarna?: PaymentMethodDetails.Klarna; + + konbini?: PaymentMethodDetails.Konbini; + + kr_card?: PaymentMethodDetails.KrCard; + + link?: PaymentMethodDetails.Link; + + mb_way?: PaymentMethodDetails.MbWay; + + mobilepay?: PaymentMethodDetails.Mobilepay; + + multibanco?: PaymentMethodDetails.Multibanco; + + naver_pay?: PaymentMethodDetails.NaverPay; + + oxxo?: PaymentMethodDetails.Oxxo; + + p24?: PaymentMethodDetails.P24; + + pay_by_bank?: PaymentMethodDetails.PayByBank; + + payco?: PaymentMethodDetails.Payco; + /** * ID of the Stripe PaymentMethod used to make this payment. */ payment_method: string | null; + paynow?: PaymentMethodDetails.Paynow; + + paypal?: PaymentMethodDetails.Paypal; + + payto?: PaymentMethodDetails.Payto; + + pix?: PaymentMethodDetails.Pix; + + promptpay?: PaymentMethodDetails.Promptpay; + + qris?: PaymentMethodDetails.Qris; + + rechnung?: PaymentMethodDetails.Rechnung; + + revolut_pay?: PaymentMethodDetails.RevolutPay; + + samsung_pay?: PaymentMethodDetails.SamsungPay; + + sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer; + + sepa_debit?: PaymentMethodDetails.SepaDebit; + + shopeepay?: PaymentMethodDetails.Shopeepay; + + sofort?: PaymentMethodDetails.Sofort; + + stripe_account?: PaymentMethodDetails.StripeAccount; + + swish?: PaymentMethodDetails.Swish; + + twint?: PaymentMethodDetails.Twint; + /** - * The type of Payment Method used for this payment attempt. + * The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. */ type: string; + + us_bank_account?: PaymentMethodDetails.UsBankAccount; + + wechat?: PaymentMethodDetails.Wechat; + + wechat_pay?: PaymentMethodDetails.WechatPay; + + zip?: PaymentMethodDetails.Zip; } namespace PaymentMethodDetails { + interface AchCreditTransfer { + /** + * Account number to transfer funds to. + */ + account_number: string | null; + + /** + * Name of the bank associated with the routing number. + */ + bank_name: string | null; + + /** + * Routing transit number for the bank account to transfer funds to. + */ + routing_number: string | null; + + /** + * SWIFT code of the bank associated with the routing number. + */ + swift_code: string | null; + } + + interface AchDebit { + /** + * Type of entity that holds the account. This can be either `individual` or `company`. + */ + account_holder_type: AchDebit.AccountHolderType | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * Routing transit number of the bank account. + */ + routing_number: string | null; + } + + namespace AchDebit { + type AccountHolderType = 'company' | 'individual'; + } + + interface AcssDebit { + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Institution number of the bank account + */ + institution_number: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string; + + /** + * Transit number of the bank account. + */ + transit_number: string | null; + } + + interface Affirm { + /** + * The Affirm transaction ID associated with this payment. + */ + transaction_id: string | null; + } + + interface AfterpayClearpay { + /** + * The Afterpay order ID associated with this payment intent. + */ + order_id: string | null; + + /** + * Order identifier shown to the merchant in Afterpay's online portal. + */ + reference: string | null; + } + + interface Alipay { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + */ + buyer_id?: string; + + /** + * 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 Alma {} + + interface AmazonPay { + funding?: AmazonPay.Funding; + } + + namespace AmazonPay { + interface Funding { + card?: Funding.Card; + + /** + * funding type of the underlying payment method. + */ + type: 'card' | null; + } + + namespace Funding { + interface Card { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand: string | null; + + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) + */ + brand_product?: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number | null; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + } + } + } + + interface AuBecsDebit { + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string; + } + + interface BacsDebit { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate: string | null; + + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ + sort_code: string | null; + } + + interface Bancontact { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit: string | Stripe.PaymentMethod | null; + + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate: string | Stripe.Mandate | null; + + /** + * Last four characters of the IBAN. + */ + iban_last4: string | null; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language: Bancontact.PreferredLanguage | null; + + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name: string | null; + } + + namespace Bancontact { + type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl'; + } + interface BillingDetails { /** * A representation of a physical address. @@ -215,6 +605,20 @@ declare module 'stripe' { phone: string | null; } + interface Blik { + /** + * A unique and immutable identifier assigned by BLIK to every buyer. + */ + buyer_id: string | null; + } + + interface Boleto { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) + */ + tax_id: string; + } + interface Card { /** * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -382,17 +786,1242 @@ declare module 'stripe' { } } - interface Custom { + interface CardPresent { /** - * Display name for the custom (user-defined) payment method type used to make this payment. + * The authorized amount */ - display_name: string; + amount_authorized: number | null; /** - * The custom payment method type associated with this payment. + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - type: string | null; - } + brand: string | null; + + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + */ + brand_product: string | null; + + /** + * When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + */ + capture_before?: number; + + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ + description?: string | null; + + /** + * Authorization response cryptogram. + */ + emv_auth_data: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ + fingerprint: string | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ + generated_card: string | null; + + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ + iin?: string | null; + + /** + * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + */ + incremental_authorization_supported: boolean; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ + issuer?: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network: string | null; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ + network_transaction_id: string | null; + + /** + * Details about payments collected offline. + */ + offline: CardPresent.Offline | null; + + /** + * Defines whether the authorized amount can be over-captured or not + */ + overcapture_supported: boolean; + + /** + * EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + */ + preferred_locales: Array | null; + + /** + * How card details were read in this transaction. + */ + read_method: CardPresent.ReadMethod | null; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ + receipt: CardPresent.Receipt | null; + + wallet?: CardPresent.Wallet; + } + + namespace CardPresent { + interface Offline { + /** + * Time at which the payment was collected while offline + */ + stored_at: number | null; + + /** + * The method used to process this payment method offline. Only deferred is allowed. + */ + type: 'deferred' | null; + } + + type ReadMethod = + | 'contact_emv' + | 'contactless_emv' + | 'contactless_magstripe_mode' + | 'magnetic_stripe_fallback' + | 'magnetic_stripe_track2'; + + interface Receipt { + /** + * The type of account being debited or credited + */ + account_type?: Receipt.AccountType; + + /** + * EMV tag 9F26, cryptogram generated by the integrated circuit chip. + */ + application_cryptogram: string | null; + + /** + * Mnenomic of the Application Identifier. + */ + application_preferred_name: string | null; + + /** + * Identifier for this transaction. + */ + authorization_code: string | null; + + /** + * EMV tag 8A. A code returned by the card issuer. + */ + authorization_response_code: string | null; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ + cardholder_verification_method: string | null; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + dedicated_file_name: string | null; + + /** + * The outcome of a series of EMV functions performed by the card reader. + */ + terminal_verification_results: string | null; + + /** + * An indication of various EMV functions performed during the transaction. + */ + transaction_status_information: string | null; + } + + namespace Receipt { + type AccountType = 'checking' | 'credit' | 'prepaid' | 'unknown'; + } + + interface Wallet { + /** + * The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + */ + type: Wallet.Type; + } + + namespace Wallet { + type Type = 'apple_pay' | 'google_pay' | 'samsung_pay' | 'unknown'; + } + } + + interface Cashapp { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ + buyer_id: string | null; + + /** + * A public identifier for buyers using Cash App. + */ + cashtag: string | null; + } + + interface Custom { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + display_name: string; + + /** + * The custom payment method type associated with this payment. + */ + type: string | null; + } + + interface CustomerBalance {} + + interface Eps { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ + bank: Eps.Bank | null; + + /** + * Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name: string | null; + } + + namespace Eps { + type Bank = + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau'; + } + + interface Fpx { + /** + * Account holder type, if provided. Can be one of `individual` or `company`. + */ + account_holder_type: Fpx.AccountHolderType | null; + + /** + * The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ + bank: Fpx.Bank; + + /** + * Unique transaction id generated by FPX for every request from the merchant + */ + transaction_id: string | null; + } + + namespace Fpx { + type AccountHolderType = 'company' | 'individual'; + + type Bank = + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_of_china' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob'; + } + + interface Giropay { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name: string | null; + } + + interface Gopay {} + + interface Grabpay { + /** + * Unique transaction id generated by GrabPay + */ + transaction_id: string | null; + } + + interface IdBankTransfer { + /** + * Account number of the bank account to transfer funds to. + */ + account_number: string; + + /** + * Bank where the account is located. + */ + bank: IdBankTransfer.Bank; + + /** + * Local bank code of the bank. + */ + bank_code?: string; + + /** + * Name of the bank associated with the bank account. + */ + bank_name?: string; + + /** + * Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + */ + display_name?: string; + } + + namespace IdBankTransfer { + type Bank = 'bca' | 'bni' | 'bri' | 'cimb' | 'permata'; + } + + interface Ideal { + /** + * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ + bank: Ideal.Bank | null; + + /** + * The Bank Identifier Code of the customer's bank. + */ + bic: Ideal.Bic | null; + + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit: string | Stripe.PaymentMethod | null; + + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate: string | Stripe.Mandate | null; + + /** + * Last four characters of the IBAN. + */ + iban_last4: string | null; + + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name: string | null; + } + + namespace Ideal { + type Bank = + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'n26' + | 'nn' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + | 'yoursafe'; + + type Bic = + | 'ABNANL2A' + | 'ASNBNL21' + | 'BITSNL2A' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'NNBANL2G' + | 'NTSBDEB1' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOIE23' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U'; + } + + interface InteracPresent { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ + brand: string | null; + + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ + description?: string | null; + + /** + * Authorization response cryptogram. + */ + emv_auth_data: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ + fingerprint: string | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + */ + generated_card: string | null; + + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ + iin?: string | null; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ + issuer?: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + + /** + * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + network: string | null; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + */ + network_transaction_id: string | null; + + /** + * EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + */ + preferred_locales: Array | null; + + /** + * How card details were read in this transaction. + */ + read_method: InteracPresent.ReadMethod | null; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV transactions. + */ + receipt: InteracPresent.Receipt | null; + } + + namespace InteracPresent { + type ReadMethod = + | 'contact_emv' + | 'contactless_emv' + | 'contactless_magstripe_mode' + | 'magnetic_stripe_fallback' + | 'magnetic_stripe_track2'; + + interface Receipt { + /** + * The type of account being debited or credited + */ + account_type?: Receipt.AccountType; + + /** + * EMV tag 9F26, cryptogram generated by the integrated circuit chip. + */ + application_cryptogram: string | null; + + /** + * Mnenomic of the Application Identifier. + */ + application_preferred_name: string | null; + + /** + * Identifier for this transaction. + */ + authorization_code: string | null; + + /** + * EMV tag 8A. A code returned by the card issuer. + */ + authorization_response_code: string | null; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + */ + cardholder_verification_method: string | null; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + dedicated_file_name: string | null; + + /** + * The outcome of a series of EMV functions performed by the card reader. + */ + terminal_verification_results: string | null; + + /** + * An indication of various EMV functions performed during the transaction. + */ + transaction_status_information: string | null; + } + + namespace Receipt { + type AccountType = 'checking' | 'savings' | 'unknown'; + } + } + + interface KakaoPay { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface Klarna { + /** + * The payer details for this transaction. + */ + payer_details: Klarna.PayerDetails | null; + + /** + * The Klarna payment method used for this transaction. + * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + */ + payment_method_category: string | null; + + /** + * 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`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + */ + preferred_locale: string | null; + } + + namespace Klarna { + interface PayerDetails { + /** + * The payer's address + */ + address: PayerDetails.Address | null; + } + + namespace PayerDetails { + interface Address { + /** + * The payer address country + */ + country: string | null; + } + } + } + + interface Konbini { + /** + * If the payment succeeded, this contains the details of the convenience store where the payment was completed. + */ + store: Konbini.Store | null; + } + + namespace Konbini { + interface Store { + /** + * The name of the convenience store chain where the payment was completed. + */ + chain: Store.Chain | null; + } + + namespace Store { + type Chain = 'familymart' | 'lawson' | 'ministop' | 'seicomart'; + } + } + + interface KrCard { + /** + * The local credit or debit card brand. + */ + brand: KrCard.Brand | null; + + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + + /** + * The last four digits of the card. This may not be present for American Express cards. + */ + last4: string | null; + } + + namespace KrCard { + type Brand = + | 'bc' + | 'citi' + | 'hana' + | 'hyundai' + | 'jeju' + | 'jeonbuk' + | 'kakaobank' + | 'kbank' + | 'kdbbank' + | 'kookmin' + | 'kwangju' + | 'lotte' + | 'mg' + | 'nh' + | 'post' + | 'samsung' + | 'savingsbank' + | 'shinhan' + | 'shinhyup' + | 'suhyup' + | 'tossbank' + | 'woori'; + } + + interface Link { + /** + * Two-letter ISO code representing the funding source country beneath the Link payment. + * You could use this attribute to get a sense of international fees. + */ + country: string | null; + } + + interface MbWay {} + + interface Mobilepay { + /** + * Internal card details + */ + card: Mobilepay.Card | null; + } + + namespace Mobilepay { + interface Card { + /** + * Brand of the card used in the transaction + */ + brand: string | null; + + /** + * Two-letter ISO code representing the country of the card + */ + country: string | null; + + /** + * Two digit number representing the card's expiration month + */ + exp_month: number | null; + + /** + * Two digit number representing the card's expiration year + */ + exp_year: number | null; + + /** + * The last 4 digits of the card + */ + last4: string | null; + } + } + + interface Multibanco { + /** + * Entity number associated with this Multibanco payment. + */ + entity: string | null; + + /** + * Reference number associated with this Multibanco payment. + */ + reference: string | null; + } + + interface NaverPay { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface Oxxo { + /** + * OXXO reference number + */ + number: string | null; + } + + interface P24 { + /** + * The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + */ + bank: P24.Bank | null; + + /** + * Unique reference for this Przelewy24 payment. + */ + reference: string | null; + + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + verified_name: string | null; + } + + namespace P24 { + type Bank = + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'velobank' + | 'volkswagen_bank'; + } + + interface PayByBank {} + + interface Payco { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface Paynow { + /** + * Reference number associated with this PayNow payment + */ + reference: string | null; + } + + interface Paypal { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + country: string | null; + + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + payer_email: string | null; + + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ + payer_id: string | null; + + /** + * Owner's full name. Values provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + payer_name: string | null; + + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. + */ + seller_protection: Paypal.SellerProtection | null; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + shipping?: Stripe.Address | null; + + /** + * A unique ID generated by PayPal for this transaction. + */ + transaction_id: string | null; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + verified_address?: Stripe.Address | null; + + /** + * Owner's verified email. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_email?: string | null; + + /** + * Owner's verified full name. Values are verified or provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null; + } + + namespace Paypal { + interface SellerProtection { + /** + * An array of conditions that are covered for the transaction, if applicable. + */ + dispute_categories: Array | null; + + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + */ + status: SellerProtection.Status; + } + + namespace SellerProtection { + type DisputeCategory = 'fraudulent' | 'product_not_received'; + + type Status = 'eligible' | 'not_eligible' | 'partially_eligible'; + } + } + + interface Payto { + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string; + + /** + * The PayID alias for the bank account. + */ + pay_id: string | null; + } + + interface Pix { + /** + * Unique transaction id generated by BCB + */ + bank_transaction_id?: string | null; + } + + interface Promptpay { + /** + * Bill reference generated by PromptPay + */ + reference: string | null; + } + + interface Qris {} + + interface Rechnung {} + + interface RevolutPay { + funding?: RevolutPay.Funding; + } + + namespace RevolutPay { + interface Funding { + card?: Funding.Card; + + /** + * funding type of the underlying payment method. + */ + type: 'card' | null; + } + + namespace Funding { + interface Card { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand: string | null; + + /** + * The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) + */ + brand_product?: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number | null; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + } + } + } + + interface SamsungPay { + /** + * A unique identifier for the buyer as determined by the local payment processor. + */ + buyer_id: string | null; + } + + interface SepaCreditTransfer { + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * IBAN of the bank account to transfer funds to. + */ + iban: string | null; + } + + interface SepaDebit { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Branch code of bank associated with the bank account. + */ + branch_code: string | null; + + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four characters of the IBAN. + */ + last4: string | null; + + /** + * Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). + */ + mandate: string | null; + } + + interface Shopeepay {} + + interface Sofort { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Bank Identifier Code of the bank associated with the bank account. + */ + bic: string | null; + + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + + /** + * The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit: string | Stripe.PaymentMethod | null; + + /** + * The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + */ + generated_sepa_debit_mandate: string | Stripe.Mandate | null; + + /** + * Last four characters of the IBAN. + */ + iban_last4: string | null; + + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + */ + preferred_language: Sofort.PreferredLanguage | null; + + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name: string | null; + } + + namespace Sofort { + type PreferredLanguage = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'it' + | 'nl' + | 'pl'; + } + + interface StripeAccount {} + + interface Swish { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer + */ + fingerprint: string | null; + + /** + * Payer bank reference number for the payment + */ + payment_reference: string | null; + + /** + * The last four digits of the Swish account phone number + */ + verified_phone_last4: string | null; + } + + interface Twint {} + + interface UsBankAccount { + /** + * Account holder type: individual or company. + */ + account_holder_type: UsBankAccount.AccountHolderType | null; + + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ + account_type: UsBankAccount.AccountType | null; + + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * ID of the mandate used to make this payment. + */ + mandate?: string | Stripe.Mandate; + + /** + * Reference number to locate ACH payments with customer's bank. + */ + payment_reference: string | null; + + /** + * Routing number of the bank account. + */ + routing_number: string | null; + } + + namespace UsBankAccount { + type AccountHolderType = 'company' | 'individual'; + + type AccountType = 'checking' | 'savings'; + } + + interface Wechat {} + + interface WechatPay { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + */ + fingerprint: string | null; + + /** + * Transaction ID of this particular WeChat Pay transaction. + */ + transaction_id: string | null; + } + + interface Zip {} } interface ShippingDetails { diff --git a/types/Terminal/Configurations.d.ts b/types/Terminal/Configurations.d.ts index f09b9e7503..07a69f587c 100644 --- a/types/Terminal/Configurations.d.ts +++ b/types/Terminal/Configurations.d.ts @@ -48,6 +48,8 @@ declare module 'stripe' { tipping?: Configuration.Tipping; verifone_p400?: Configuration.VerifoneP400; + + wifi?: Configuration.Wifi; } namespace Configuration { @@ -398,6 +400,87 @@ declare module 'stripe' { */ splashscreen?: string | Stripe.File; } + + interface Wifi { + enterprise_eap_peap?: Wifi.EnterpriseEapPeap; + + enterprise_eap_tls?: Wifi.EnterpriseEapTls; + + personal_psk?: Wifi.PersonalPsk; + + /** + * Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type. + */ + type: Wifi.Type; + } + + namespace Wifi { + interface EnterpriseEapPeap { + /** + * A File ID representing a PEM file containing the server certificate + */ + ca_certificate_file?: string; + + /** + * Password for connecting to the WiFi network + */ + password: string; + + /** + * Name of the WiFi network + */ + ssid: string; + + /** + * Username for connecting to the WiFi network + */ + username: string; + } + + interface EnterpriseEapTls { + /** + * A File ID representing a PEM file containing the server certificate + */ + ca_certificate_file?: string; + + /** + * A File ID representing a PEM file containing the client certificate + */ + client_certificate_file: string; + + /** + * A File ID representing a PEM file containing the client RSA private key + */ + private_key_file: string; + + /** + * Password for the private key file + */ + private_key_file_password?: string; + + /** + * Name of the WiFi network + */ + ssid: string; + } + + interface PersonalPsk { + /** + * Password for connecting to the WiFi network + */ + password: string; + + /** + * Name of the WiFi network + */ + ssid: string; + } + + type Type = + | 'enterprise_eap_peap' + | 'enterprise_eap_tls' + | 'personal_psk'; + } } /** diff --git a/types/Terminal/ConfigurationsResource.d.ts b/types/Terminal/ConfigurationsResource.d.ts index e48685c29c..24497339f5 100644 --- a/types/Terminal/ConfigurationsResource.d.ts +++ b/types/Terminal/ConfigurationsResource.d.ts @@ -43,6 +43,11 @@ declare module 'stripe' { * An object containing device type specific settings for Verifone P400 readers */ verifone_p400?: ConfigurationCreateParams.VerifoneP400; + + /** + * Configurations for connecting to a WiFi network. + */ + wifi?: Stripe.Emptyable; } namespace ConfigurationCreateParams { @@ -441,6 +446,96 @@ declare module 'stripe' { */ splashscreen?: Stripe.Emptyable; } + + interface Wifi { + /** + * Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. + */ + enterprise_eap_peap?: Wifi.EnterpriseEapPeap; + + /** + * Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. + */ + enterprise_eap_tls?: Wifi.EnterpriseEapTls; + + /** + * Credentials for a WPA-Personal WiFi network. + */ + personal_psk?: Wifi.PersonalPsk; + + /** + * Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. + */ + type: Wifi.Type; + } + + namespace Wifi { + interface EnterpriseEapPeap { + /** + * A File ID representing a PEM file containing the server certificate + */ + ca_certificate_file?: string; + + /** + * Password for connecting to the WiFi network + */ + password: string; + + /** + * Name of the WiFi network + */ + ssid: string; + + /** + * Username for connecting to the WiFi network + */ + username: string; + } + + interface EnterpriseEapTls { + /** + * A File ID representing a PEM file containing the server certificate + */ + ca_certificate_file?: string; + + /** + * A File ID representing a PEM file containing the client certificate + */ + client_certificate_file: string; + + /** + * A File ID representing a PEM file containing the client RSA private key + */ + private_key_file: string; + + /** + * Password for the private key file + */ + private_key_file_password?: string; + + /** + * Name of the WiFi network + */ + ssid: string; + } + + interface PersonalPsk { + /** + * Password for connecting to the WiFi network + */ + password: string; + + /** + * Name of the WiFi network + */ + ssid: string; + } + + type Type = + | 'enterprise_eap_peap' + | 'enterprise_eap_tls' + | 'personal_psk'; + } } interface ConfigurationRetrieveParams { @@ -496,6 +591,11 @@ declare module 'stripe' { verifone_p400?: Stripe.Emptyable< ConfigurationUpdateParams.VerifoneP400 >; + + /** + * Configurations for connecting to a WiFi network. + */ + wifi?: Stripe.Emptyable; } namespace ConfigurationUpdateParams { @@ -894,6 +994,96 @@ declare module 'stripe' { */ splashscreen?: Stripe.Emptyable; } + + interface Wifi { + /** + * Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. + */ + enterprise_eap_peap?: Wifi.EnterpriseEapPeap; + + /** + * Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. + */ + enterprise_eap_tls?: Wifi.EnterpriseEapTls; + + /** + * Credentials for a WPA-Personal WiFi network. + */ + personal_psk?: Wifi.PersonalPsk; + + /** + * Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. + */ + type: Wifi.Type; + } + + namespace Wifi { + interface EnterpriseEapPeap { + /** + * A File ID representing a PEM file containing the server certificate + */ + ca_certificate_file?: string; + + /** + * Password for connecting to the WiFi network + */ + password: string; + + /** + * Name of the WiFi network + */ + ssid: string; + + /** + * Username for connecting to the WiFi network + */ + username: string; + } + + interface EnterpriseEapTls { + /** + * A File ID representing a PEM file containing the server certificate + */ + ca_certificate_file?: string; + + /** + * A File ID representing a PEM file containing the client certificate + */ + client_certificate_file: string; + + /** + * A File ID representing a PEM file containing the client RSA private key + */ + private_key_file: string; + + /** + * Password for the private key file + */ + private_key_file_password?: string; + + /** + * Name of the WiFi network + */ + ssid: string; + } + + interface PersonalPsk { + /** + * Password for connecting to the WiFi network + */ + password: string; + + /** + * Name of the WiFi network + */ + ssid: string; + } + + type Type = + | 'enterprise_eap_peap' + | 'enterprise_eap_tls' + | 'personal_psk'; + } } interface ConfigurationListParams extends PaginationParams { diff --git a/types/TestHelpers/Terminal/ReadersResource.d.ts b/types/TestHelpers/Terminal/ReadersResource.d.ts index 8b8146e2a8..b1dfe87d95 100644 --- a/types/TestHelpers/Terminal/ReadersResource.d.ts +++ b/types/TestHelpers/Terminal/ReadersResource.d.ts @@ -58,7 +58,7 @@ declare module 'stripe' { expand?: Array; /** - * Skip behavior for input collection. + * This parameter defines the skip behavior for input collection. */ skip_non_required_inputs?: ReaderSucceedInputCollectionParams.SkipNonRequiredInputs; } @@ -93,7 +93,7 @@ declare module 'stripe' { ): Promise>; /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + * Use this endpoint to trigger a successful input collection on a simulated reader. */ succeedInputCollection( id: string, @@ -106,7 +106,7 @@ declare module 'stripe' { ): Promise>; /** - * Completes an input collection with a timeout error on a simulated reader. + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. */ timeoutInputCollection( id: string, From da9bc5feb9fed76472bfa3ca02a8fa257b359ba6 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 00:27:57 +0000 Subject: [PATCH 28/53] Update generated code for v1512 --- OPENAPI_VERSION | 2 +- types/OrdersResource.d.ts | 4 ++-- types/PaymentIntentsResource.d.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fabdcb1ee0..8b186acfb7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1511 \ No newline at end of file +v1512 \ No newline at end of file diff --git a/types/OrdersResource.d.ts b/types/OrdersResource.d.ts index 553d8a7ceb..59494663b6 100644 --- a/types/OrdersResource.d.ts +++ b/types/OrdersResource.d.ts @@ -1069,7 +1069,7 @@ declare module 'stripe' { /** * The client type that the end customer will pay from */ - client: WechatPay.Client; + client?: WechatPay.Client; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2498,7 +2498,7 @@ declare module 'stripe' { /** * The client type that the end customer will pay from */ - client: WechatPay.Client; + client?: WechatPay.Client; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index afec600331..192ed55f66 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -3805,7 +3805,7 @@ declare module 'stripe' { /** * The client type that the end customer will pay from */ - client: WechatPay.Client; + client?: WechatPay.Client; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7618,7 +7618,7 @@ declare module 'stripe' { /** * The client type that the end customer will pay from */ - client: WechatPay.Client; + client?: WechatPay.Client; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -12186,7 +12186,7 @@ declare module 'stripe' { /** * The client type that the end customer will pay from */ - client: WechatPay.Client; + client?: WechatPay.Client; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. From 8ab9847e52918e7e8795a2d8774d9cb952ab4cae Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 21:07:22 +0000 Subject: [PATCH 29/53] Update generated code for v1515 --- OPENAPI_VERSION | 2 +- types/Billing/CreditBalanceSummaryResource.d.ts | 4 ++-- types/Billing/CreditGrants.d.ts | 4 ++-- types/Billing/CreditGrantsResource.d.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8b186acfb7..2e20054bc3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1512 \ No newline at end of file +v1515 \ No newline at end of file diff --git a/types/Billing/CreditBalanceSummaryResource.d.ts b/types/Billing/CreditBalanceSummaryResource.d.ts index 6909f8d088..e4f8b6422e 100644 --- a/types/Billing/CreditBalanceSummaryResource.d.ts +++ b/types/Billing/CreditBalanceSummaryResource.d.ts @@ -41,12 +41,12 @@ declare module 'stripe' { namespace Filter { interface ApplicabilityScope { /** - * The price type that credit grants can apply to. We currently only support the `metered` price type. + * The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. */ price_type?: 'metered'; /** - * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. + * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. */ prices?: Array; } diff --git a/types/Billing/CreditGrants.d.ts b/types/Billing/CreditGrants.d.ts index c4e3738fcc..776b5b5824 100644 --- a/types/Billing/CreditGrants.d.ts +++ b/types/Billing/CreditGrants.d.ts @@ -118,12 +118,12 @@ declare module 'stripe' { namespace ApplicabilityConfig { interface Scope { /** - * The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + * The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `prices`. */ price_type?: 'metered'; /** - * The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + * The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`. */ prices?: Array; } diff --git a/types/Billing/CreditGrantsResource.d.ts b/types/Billing/CreditGrantsResource.d.ts index d5ab6318ac..dd5a46a163 100644 --- a/types/Billing/CreditGrantsResource.d.ts +++ b/types/Billing/CreditGrantsResource.d.ts @@ -92,12 +92,12 @@ declare module 'stripe' { namespace ApplicabilityConfig { interface Scope { /** - * The price type that credit grants can apply to. We currently only support the `metered` price type. + * The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. */ price_type?: 'metered'; /** - * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. + * A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. */ prices?: Array; } From c0a58d1caf17cc023aa1a9a08dfa84fecd90f82a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:47:24 +0000 Subject: [PATCH 30/53] Update generated code for v1516 --- OPENAPI_VERSION | 2 +- types/BankAccounts.d.ts | 2 +- types/Cards.d.ts | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 2e20054bc3..8ee3c4a78a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1515 \ No newline at end of file +v1516 \ No newline at end of file diff --git a/types/BankAccounts.d.ts b/types/BankAccounts.d.ts index b361bca47f..0e0c45f1ee 100644 --- a/types/BankAccounts.d.ts +++ b/types/BankAccounts.d.ts @@ -23,7 +23,7 @@ declare module 'stripe' { object: 'bank_account'; /** - * The ID of the account that the bank account is associated with. + * The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](https://stripe.com/api/external_account_bank_accounts/object) where [controller.is_controller](https://stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`. */ account?: string | Stripe.Account | null; diff --git a/types/Cards.d.ts b/types/Cards.d.ts index 2394f5a6c0..3ce9040dfd 100644 --- a/types/Cards.d.ts +++ b/types/Cards.d.ts @@ -20,9 +20,6 @@ declare module 'stripe' { */ object: 'card'; - /** - * The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - */ account?: string | Stripe.Account | null; /** @@ -91,7 +88,7 @@ declare module 'stripe' { country: string | null; /** - * Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + * Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](https://stripe.com/api/external_account_cards/object) where [controller.is_controller](https://stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`. */ currency?: string | null; From c6cfb509f3a99dbdd396c3f1ad3b0c46aa7dbbf1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 23:49:48 +0000 Subject: [PATCH 31/53] Update generated code for v1517 --- OPENAPI_VERSION | 2 +- types/Invoices.d.ts | 1 + types/PaymentIntents.d.ts | 1 + types/QuotePreviewInvoices.d.ts | 1 + types/SetupAttempts.d.ts | 1 + types/SetupIntents.d.ts | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8ee3c4a78a..76f413ea6c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1516 \ No newline at end of file +v1517 \ No newline at end of file diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index a426578d49..6f691592a3 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -1065,6 +1065,7 @@ declare module 'stripe' { | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' + | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index baf011049c..e9871a0607 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -574,6 +574,7 @@ declare module 'stripe' { | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' + | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index fd25ce3a49..8e90781938 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -1039,6 +1039,7 @@ declare module 'stripe' { | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' + | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index 3b3eff8285..828f84b445 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -830,6 +830,7 @@ declare module 'stripe' { | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' + | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index 40aa77c345..0b786dbe06 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -455,6 +455,7 @@ declare module 'stripe' { | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' + | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' From e571571a2258349f42f3de27a727dd6f807bf495 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:45:01 +0000 Subject: [PATCH 32/53] Update generated code for v1518 --- OPENAPI_VERSION | 2 +- types/Checkout/SessionsResource.d.ts | 7 ++++--- types/Issuing/Settlements.d.ts | 14 +++++++------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 76f413ea6c..dcf158c1c3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1517 \ No newline at end of file +v1518 \ No newline at end of file diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index 32eaeb3f27..8cc3dca3cb 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -240,9 +240,10 @@ declare module 'stripe' { shipping_options?: Array; /** - * Describes the type of transaction being performed by Checkout in order to customize - * relevant text on the page, such as the submit button. `submit_type` can only be - * specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + * Describes the type of transaction being performed by Checkout in order + * to customize relevant text on the page, such as the submit button. + * `submit_type` can only be specified on Checkout Sessions in + * `payment` or `subscription` mode. If blank or `auto`, `pay` is used. */ submit_type?: SessionCreateParams.SubmitType; diff --git a/types/Issuing/Settlements.d.ts b/types/Issuing/Settlements.d.ts index dbc852cf8e..1b64687bee 100644 --- a/types/Issuing/Settlements.d.ts +++ b/types/Issuing/Settlements.d.ts @@ -40,7 +40,7 @@ declare module 'stripe' { /** * The total interchange received as reimbursement for the transactions. */ - interchange_fees: number; + interchange_fees_amount: number; /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -55,7 +55,7 @@ declare module 'stripe' { /** * The total net amount required to settle with the network. */ - net_total: number; + net_total_amount: number; /** * The card network for this settlement report. One of ["visa", "maestro"] @@ -65,7 +65,7 @@ declare module 'stripe' { /** * The total amount of fees owed to the network. */ - network_fees: number; + network_fees_amount: number; /** * The Settlement Identification Number assigned by the network. @@ -93,14 +93,14 @@ declare module 'stripe' { status: Settlement.Status; /** - * The total number of transactions reflected in this settlement. + * The total transaction amount reflected in this settlement. */ - transaction_count: number; + transaction_amount: number; /** - * The total transaction amount reflected in this settlement. + * The total number of transactions reflected in this settlement. */ - transaction_volume: number; + transaction_count: number; } namespace Settlement { From 9aaf62810f873e71b1089c3cdfa1757ced7a72c8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:07:34 +0000 Subject: [PATCH 33/53] Update generated code for v1520 --- OPENAPI_VERSION | 2 +- types/PaymentMethodDomainsResource.d.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dcf158c1c3..caaaa3cf0c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1518 \ No newline at end of file +v1520 \ No newline at end of file diff --git a/types/PaymentMethodDomainsResource.d.ts b/types/PaymentMethodDomainsResource.d.ts index e1e93bcf13..0be70a7db9 100644 --- a/types/PaymentMethodDomainsResource.d.ts +++ b/types/PaymentMethodDomainsResource.d.ts @@ -9,7 +9,7 @@ declare module 'stripe' { domain_name: string; /** - * Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + * Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. */ enabled?: boolean; @@ -28,7 +28,7 @@ declare module 'stripe' { interface PaymentMethodDomainUpdateParams { /** - * Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + * Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. */ enabled?: boolean; @@ -45,7 +45,7 @@ declare module 'stripe' { domain_name?: string; /** - * Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements + * Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout */ enabled?: boolean; @@ -105,10 +105,10 @@ declare module 'stripe' { ): ApiListPromise; /** - * Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. - * The payment method doesn't appear in Elements for this domain until it is active. + * Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. + * The payment method doesn't appear in Elements or Embedded Checkout for this domain until it is active. * - * To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint. + * To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint. * * Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). */ From b200ac9f58bbdb981d3a019dec97b792eba896ae Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:50:47 +0000 Subject: [PATCH 34/53] Update generated code for v1520 --- types/V2/Core/EventsResource.d.ts | 32 ++++++++++++++++++++++++++++--- types/V2/EventDestinations.d.ts | 2 +- types/V2/Events.d.ts | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/types/V2/Core/EventsResource.d.ts b/types/V2/Core/EventsResource.d.ts index bb3489e290..bae38efacf 100644 --- a/types/V2/Core/EventsResource.d.ts +++ b/types/V2/Core/EventsResource.d.ts @@ -12,15 +12,40 @@ declare module 'stripe' { namespace Core { interface EventListParams { /** - * Primary object ID used to retrieve related events. + * Filter for events created after the specified timestamp. */ - object_id: string; + created_gt?: string; + + /** + * Filter for events created at or after the specified timestamp. + */ + created_gte?: string; + + /** + * Filter for events created before the specified timestamp. + */ + created_lt?: string; + + /** + * Filter for events created at or before the specified timestamp. + */ + created_lte?: string; + + /** + * Filter events based on whether they were successfully delivered to all subscribed event destinations. If false, events which are still pending or have failed all delivery attempts to a event destination will be returned. + */ + delivery_success?: boolean; /** * The page size. */ limit?: number; + /** + * Primary object ID used to retrieve related events. + */ + object_id?: string; + /** * The requested page. */ @@ -47,9 +72,10 @@ declare module 'stripe' { * List events, going back up to 30 days. */ list( - params: EventListParams, + params?: EventListParams, options?: RequestOptions ): ApiListPromise; + list(options?: RequestOptions): ApiListPromise; } } } diff --git a/types/V2/EventDestinations.d.ts b/types/V2/EventDestinations.d.ts index 5eb69f715d..a7cb92b98e 100644 --- a/types/V2/EventDestinations.d.ts +++ b/types/V2/EventDestinations.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { namespace V2 { /** - * The EventDestination object. + * Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). */ interface EventDestination { /** diff --git a/types/V2/Events.d.ts b/types/V2/Events.d.ts index 6dac16c035..4baedce15c 100644 --- a/types/V2/Events.d.ts +++ b/types/V2/Events.d.ts @@ -32,7 +32,7 @@ declare module 'stripe' { } /** - * The Event object. + * Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload. */ interface EventBase { /** From 69b35847b1f46d233fef587f526c5262638c5262 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:09:19 +0000 Subject: [PATCH 35/53] Update generated code for v1521 --- OPENAPI_VERSION | 2 +- types/Treasury/FinancialAccountsResource.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index caaaa3cf0c..e4a28d8b84 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1520 \ No newline at end of file +v1521 \ No newline at end of file diff --git a/types/Treasury/FinancialAccountsResource.d.ts b/types/Treasury/FinancialAccountsResource.d.ts index 141064c44e..014a0d2f76 100644 --- a/types/Treasury/FinancialAccountsResource.d.ts +++ b/types/Treasury/FinancialAccountsResource.d.ts @@ -677,7 +677,7 @@ declare module 'stripe' { class FinancialAccountsResource { /** - * Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount. + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default. */ create( params: FinancialAccountCreateParams, From 142fbb42d1c63682d41dd7a0ea2879bf073fb2ab Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 22:15:06 +0000 Subject: [PATCH 36/53] Update generated code for v1523 --- OPENAPI_VERSION | 2 +- types/Subscriptions.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e4a28d8b84..41ae5917f4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1521 \ No newline at end of file +v1523 \ No newline at end of file diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index f021d29628..fe306ec657 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -172,7 +172,7 @@ declare module 'stripe' { next_pending_invoice_item_invoice: number | null; /** - * The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + * The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details. */ on_behalf_of: string | Stripe.Account | null; From a9f7cfb28ffbf5b13fcfc307ef4d49a91c0e2335 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 18:51:02 +0000 Subject: [PATCH 37/53] Update generated code for v1525 --- OPENAPI_VERSION | 2 +- types/CustomerBalanceTransactions.d.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 41ae5917f4..0e69d4d590 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1523 \ No newline at end of file +v1525 \ No newline at end of file diff --git a/types/CustomerBalanceTransactions.d.ts b/types/CustomerBalanceTransactions.d.ts index 43a112db52..9e8f0d25be 100644 --- a/types/CustomerBalanceTransactions.d.ts +++ b/types/CustomerBalanceTransactions.d.ts @@ -72,7 +72,7 @@ declare module 'stripe' { metadata: Stripe.Metadata | null; /** - * Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + * Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. */ type: CustomerBalanceTransaction.Type; } @@ -81,6 +81,8 @@ declare module 'stripe' { type Type = | 'adjustment' | 'applied_to_invoice' + | 'checkout_session_subscription_payment' + | 'checkout_session_subscription_payment_canceled' | 'credit_note' | 'initial' | 'invoice_overpaid' From 8f702e9aa9290eda40ddf2d9279f448ee101ad90 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:53:37 +0000 Subject: [PATCH 38/53] Update generated code for v1527 --- OPENAPI_VERSION | 2 +- types/Checkout/Sessions.d.ts | 29 ----------------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0e69d4d590..79d315ec95 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1525 \ No newline at end of file +v1527 \ No newline at end of file diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index fb379c140f..2c66ad1d3e 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -270,11 +270,6 @@ declare module 'stripe' { */ shipping_cost: Session.ShippingCost | null; - /** - * Shipping information for this Checkout Session. - */ - shipping_details: Session.ShippingDetails | null; - /** * The shipping rate options applied to this Session. */ @@ -2521,30 +2516,6 @@ declare module 'stripe' { } } - interface ShippingDetails { - address?: Stripe.Address; - - /** - * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - */ - carrier?: string | null; - - /** - * Recipient name. - */ - name?: string; - - /** - * Recipient phone (including extension). - */ - phone?: string | null; - - /** - * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - */ - tracking_number?: string | null; - } - interface ShippingOption { /** * A non-negative integer in cents representing how much to charge. From 50aea075ca4944b976c0c1cdd518a70cd1a893f4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:24:30 +0000 Subject: [PATCH 39/53] Update generated code for v1528 --- OPENAPI_VERSION | 2 +- types/Checkout/Sessions.d.ts | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 79d315ec95..644914f684 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1527 \ No newline at end of file +v1528 \ No newline at end of file diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 2c66ad1d3e..fb379c140f 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -270,6 +270,11 @@ declare module 'stripe' { */ shipping_cost: Session.ShippingCost | null; + /** + * Shipping information for this Checkout Session. + */ + shipping_details: Session.ShippingDetails | null; + /** * The shipping rate options applied to this Session. */ @@ -2516,6 +2521,30 @@ declare module 'stripe' { } } + interface ShippingDetails { + address?: Stripe.Address; + + /** + * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + */ + carrier?: string | null; + + /** + * Recipient name. + */ + name?: string; + + /** + * Recipient phone (including extension). + */ + phone?: string | null; + + /** + * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + */ + tracking_number?: string | null; + } + interface ShippingOption { /** * A non-negative integer in cents representing how much to charge. From b3caff7275ef95268b10b2db11265bc07c149bea Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 21:45:30 +0000 Subject: [PATCH 40/53] Update generated code for v1529 --- OPENAPI_VERSION | 2 +- types/PaymentAttemptRecords.d.ts | 7 +++++++ types/PaymentRecordsResource.d.ts | 10 +++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 644914f684..87013bbac5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1528 \ No newline at end of file +v1529 \ No newline at end of file diff --git a/types/PaymentAttemptRecords.d.ts b/types/PaymentAttemptRecords.d.ts index 6205750b2a..8a87f2cf97 100644 --- a/types/PaymentAttemptRecords.d.ts +++ b/types/PaymentAttemptRecords.d.ts @@ -84,6 +84,11 @@ declare module 'stripe' { */ payment_reference: string | null; + /** + * Indicates who reported the payment. + */ + reported_by: PaymentAttemptRecord.ReportedBy; + /** * Shipping information for this payment. */ @@ -2024,6 +2029,8 @@ declare module 'stripe' { interface Zip {} } + type ReportedBy = 'self' | 'stripe'; + interface ShippingDetails { /** * A representation of a physical address. diff --git a/types/PaymentRecordsResource.d.ts b/types/PaymentRecordsResource.d.ts index 8db15a9f79..aeb2f33eac 100644 --- a/types/PaymentRecordsResource.d.ts +++ b/types/PaymentRecordsResource.d.ts @@ -25,11 +25,6 @@ declare module 'stripe' { */ payment_method_details: PaymentRecordReportPaymentParams.PaymentMethodDetails; - /** - * An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. - */ - payment_reference: string; - /** * Customer information for this payment. */ @@ -70,6 +65,11 @@ declare module 'stripe' { */ outcome?: PaymentRecordReportPaymentParams.Outcome; + /** + * An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + */ + payment_reference?: string; + /** * Shipping information for this payment. */ From 7088ec81dfcfe371f770d1b758596db9e15c66ee Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:03:26 +0000 Subject: [PATCH 41/53] Update generated code for v1532 --- OPENAPI_VERSION | 2 +- types/Checkout/SessionsResource.d.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 87013bbac5..009014c2d7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1529 \ No newline at end of file +v1532 \ No newline at end of file diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index 8cc3dca3cb..444e266d94 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -3254,7 +3254,7 @@ declare module 'stripe' { class SessionsResource { /** - * Creates a Session object. + * Creates a Checkout Session object. */ create( params?: SessionCreateParams, @@ -3265,7 +3265,7 @@ declare module 'stripe' { ): Promise>; /** - * Retrieves a Session object. + * Retrieves a Checkout Session object. */ retrieve( id: string, @@ -3278,7 +3278,7 @@ declare module 'stripe' { ): Promise>; /** - * Updates a Session object. + * Updates a Checkout Session object. */ update( id: string, @@ -3296,9 +3296,9 @@ declare module 'stripe' { list(options?: RequestOptions): ApiListPromise; /** - * A Session can be expired when it is in one of these statuses: open + * A Checkout Session can be expired when it is in one of these statuses: open * - * After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired. + * After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired. */ expire( id: string, From 143f29276c9346b3280f2e04fbb024285c28f7ff Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:16:05 +0000 Subject: [PATCH 42/53] Update generated code for v1533 --- OPENAPI_VERSION | 2 +- types/Subscriptions.d.ts | 2 +- types/SubscriptionsResource.d.ts | 10 ---------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 009014c2d7..98cb1213b4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1532 \ No newline at end of file +v1533 \ No newline at end of file diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index fe306ec657..b42bde26e7 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -55,7 +55,7 @@ declare module 'stripe' { cancel_at: number | null; /** - * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. This field is deprecated in a new version, please use `cancel_at` instead. */ cancel_at_period_end: boolean; diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index 625766b58f..0e91e69c3f 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -50,11 +50,6 @@ declare module 'stripe' { */ cancel_at?: number; - /** - * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - */ - cancel_at_period_end?: boolean; - /** * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. */ @@ -1091,11 +1086,6 @@ declare module 'stripe' { */ cancel_at?: Stripe.Emptyable; - /** - * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - */ - cancel_at_period_end?: boolean; - /** * Details about why this subscription was cancelled */ From f5a5ea2ca408857d97129da0760ce15021752098 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 14:04:19 +0000 Subject: [PATCH 43/53] Update generated code for v1534 --- OPENAPI_VERSION | 2 +- types/ApplicationFees.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 98cb1213b4..3c82d4fff5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1533 \ No newline at end of file +v1534 \ No newline at end of file diff --git a/types/ApplicationFees.d.ts b/types/ApplicationFees.d.ts index 64d65307aa..fe327f7a7d 100644 --- a/types/ApplicationFees.d.ts +++ b/types/ApplicationFees.d.ts @@ -95,7 +95,7 @@ declare module 'stripe' { payout?: string; /** - * Type of object that created the application fee, either `charge` or `payout`. + * Type of object that created the application fee. */ type: FeeSource.Type; } From fe6c003dea130eebb2a04975cf2ff251659cac7b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 18:33:36 +0000 Subject: [PATCH 44/53] Update generated code for v1535 --- OPENAPI_VERSION | 2 +- types/Issuing/DisputeSettlementDetails.d.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3c82d4fff5..2cbada7abb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1534 \ No newline at end of file +v1535 \ No newline at end of file diff --git a/types/Issuing/DisputeSettlementDetails.d.ts b/types/Issuing/DisputeSettlementDetails.d.ts index 1ce2917a39..635c4272e0 100644 --- a/types/Issuing/DisputeSettlementDetails.d.ts +++ b/types/Issuing/DisputeSettlementDetails.d.ts @@ -57,6 +57,11 @@ declare module 'stripe' { */ network: DisputeSettlementDetail.Network; + /** + * Details about the transaction, such as processing dates, set by the card network. + */ + network_data: DisputeSettlementDetail.NetworkData | null; + /** * The ID of the linked card network settlement. */ @@ -67,6 +72,13 @@ declare module 'stripe' { type EventType = 'filing' | 'loss' | 'representment' | 'win'; type Network = 'maestro' | 'mastercard' | 'visa'; + + interface NetworkData { + /** + * The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + */ + processing_date: string | null; + } } } } From 527d8032d5b3e1c86373835aa20bf7b8d12cc890 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 20:59:04 +0000 Subject: [PATCH 45/53] Update generated code for v1536 --- OPENAPI_VERSION | 2 +- types/Checkout/Sessions.d.ts | 29 ----------------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 2cbada7abb..f279068217 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1535 \ No newline at end of file +v1536 \ No newline at end of file diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index fb379c140f..2c66ad1d3e 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -270,11 +270,6 @@ declare module 'stripe' { */ shipping_cost: Session.ShippingCost | null; - /** - * Shipping information for this Checkout Session. - */ - shipping_details: Session.ShippingDetails | null; - /** * The shipping rate options applied to this Session. */ @@ -2521,30 +2516,6 @@ declare module 'stripe' { } } - interface ShippingDetails { - address?: Stripe.Address; - - /** - * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - */ - carrier?: string | null; - - /** - * Recipient name. - */ - name?: string; - - /** - * Recipient phone (including extension). - */ - phone?: string | null; - - /** - * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - */ - tracking_number?: string | null; - } - interface ShippingOption { /** * A non-negative integer in cents representing how much to charge. From 51d53f2e0d576f83577140451f36ac80ceba8489 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 23:33:05 +0000 Subject: [PATCH 46/53] Update generated code for v1538 --- OPENAPI_VERSION | 2 +- types/QuotePreviewInvoices.d.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f279068217..5ae91bffb7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1536 \ No newline at end of file +v1538 \ No newline at end of file diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index 8e90781938..f103b0741d 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -381,6 +381,9 @@ declare module 'stripe' { status_transitions: QuotePreviewInvoice.StatusTransitions; + /** + * The subscription that this invoice was prepared for, if any. + */ subscription: string | Stripe.Subscription | null; /** From 25a7d09c5974ead7048cf6e86bf1fd513b3a19df Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 8 Mar 2025 00:50:08 +0000 Subject: [PATCH 47/53] Update generated code for v1540 --- OPENAPI_VERSION | 2 +- types/InvoiceItems.d.ts | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5ae91bffb7..348e8d0862 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1538 \ No newline at end of file +v1540 \ No newline at end of file diff --git a/types/InvoiceItems.d.ts b/types/InvoiceItems.d.ts index d64f84f12f..c11bdf1565 100644 --- a/types/InvoiceItems.d.ts +++ b/types/InvoiceItems.d.ts @@ -108,16 +108,6 @@ declare module 'stripe' { period: InvoiceItem.Period; - /** - * If the invoice item is a proration, the plan of the subscription that the proration was computed for. - */ - plan: Stripe.Plan | null; - - /** - * The price of the invoice item. - */ - price: Stripe.Price | null; - /** * Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ From 8c207b23179debafd23390a69b4a47b6ba4c3ffc Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:13:30 +0000 Subject: [PATCH 48/53] Update generated code for v1542 --- OPENAPI_VERSION | 2 +- types/InvoicesResource.d.ts | 10 +++++----- types/Subscriptions.d.ts | 5 ----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 348e8d0862..1ed40fdb32 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1540 \ No newline at end of file +v1542 \ No newline at end of file diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 85d2c0135f..a9ffbf1c98 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -3974,7 +3974,7 @@ declare module 'stripe' { cancel_at?: Stripe.Emptyable; /** - * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param is deprecated starting the `2025-03-31.basil` version, please use `cancel_at` instead. */ cancel_at_period_end?: boolean; @@ -4332,7 +4332,7 @@ declare module 'stripe' { subscription_cancel_at?: Stripe.Emptyable; /** - * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param is deprecated starting the `2025-03-31.basil` version, please use `cancel_at` instead. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. */ subscription_cancel_at_period_end?: boolean; @@ -6216,7 +6216,7 @@ declare module 'stripe' { cancel_at?: Stripe.Emptyable; /** - * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param is deprecated starting the `2025-03-31.basil` version, please use `cancel_at` instead. */ cancel_at_period_end?: boolean; @@ -6831,7 +6831,7 @@ declare module 'stripe' { subscription_cancel_at?: Stripe.Emptyable; /** - * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param is deprecated starting the `2025-03-31.basil` version, please use `cancel_at` instead. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. */ subscription_cancel_at_period_end?: boolean; @@ -8715,7 +8715,7 @@ declare module 'stripe' { cancel_at?: Stripe.Emptyable; /** - * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param is deprecated starting the `2025-03-31.basil` version, please use `cancel_at` instead. */ cancel_at_period_end?: boolean; diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index b42bde26e7..061cf2d42c 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -54,11 +54,6 @@ declare module 'stripe' { */ cancel_at: number | null; - /** - * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. This field is deprecated in a new version, please use `cancel_at` instead. - */ - cancel_at_period_end: boolean; - /** * If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. */ From 6f28a3e096f748fa0a4d096367c1bb10db1de19a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 02:24:05 +0000 Subject: [PATCH 49/53] Update generated code for v1545 --- OPENAPI_VERSION | 2 +- types/InvoiceItems.d.ts | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1ed40fdb32..4cced2448e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1542 \ No newline at end of file +v1545 \ No newline at end of file diff --git a/types/InvoiceItems.d.ts b/types/InvoiceItems.d.ts index c11bdf1565..b502df6cf4 100644 --- a/types/InvoiceItems.d.ts +++ b/types/InvoiceItems.d.ts @@ -137,16 +137,6 @@ declare module 'stripe' { * ID of the test clock this invoice item belongs to. */ test_clock: string | Stripe.TestHelpers.TestClock | null; - - /** - * Unit amount (in the `currency` specified) of the invoice item. - */ - unit_amount: number | null; - - /** - * Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - */ - unit_amount_decimal: string | null; } namespace InvoiceItem { From f857b9b8ca17fa58cb7f61106051f69fc592b633 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 21:12:49 +0000 Subject: [PATCH 50/53] Update generated code for v1546 --- OPENAPI_VERSION | 2 +- types/AccountsResource.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4cced2448e..7ac849e335 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1545 \ No newline at end of file +v1546 \ No newline at end of file diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 3b22471674..c26ee61e1b 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -3926,7 +3926,7 @@ declare module 'stripe' { interface AccountCreateExternalAccountParams { /** - * Please refer to full [documentation](https://stripe.com/docs/api) instead. + * A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js) or a dictionary containing a user's external account details (with the options shown below). Please refer to full [documentation](https://stripe.com/docs/api/external_accounts) instead. */ external_account: | string From 8b2e48280316248f52ac16de5005d7ba2f960efa Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 23:23:49 +0000 Subject: [PATCH 51/53] Update generated code for v1547 --- OPENAPI_VERSION | 2 +- types/Checkout/SessionsResource.d.ts | 4 ++-- types/InvoicesResource.d.ts | 12 ++++++------ types/OrdersResource.d.ts | 28 ++++++++++++++-------------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7ac849e335..277576c427 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1546 \ No newline at end of file +v1547 \ No newline at end of file diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index 444e266d94..9ad6b4e267 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -739,12 +739,12 @@ declare module 'stripe' { currency: string; /** - * The ID of the product that this price will belong to. One of `product` or `product_data` is required. + * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. */ product?: string; /** - * Data used to generate a new product object inline. One of `product` or `product_data` is required. + * Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. */ product_data?: PriceData.ProductData; diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index a9ffbf1c98..e1b982a0cd 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -1860,12 +1860,12 @@ declare module 'stripe' { currency: string; /** - * The ID of the product that this price will belong to. One of `product` or `product_data` is required. + * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. */ product?: string; /** - * Data used to generate a new product object inline. One of `product` or `product_data` is required. + * Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. */ product_data?: PriceData.ProductData; @@ -9351,12 +9351,12 @@ declare module 'stripe' { currency: string; /** - * The ID of the product that this price will belong to. One of `product` or `product_data` is required. + * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. */ product?: string; /** - * Data used to generate a new product object inline. One of `product` or `product_data` is required. + * Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. */ product_data?: PriceData.ProductData; @@ -9640,12 +9640,12 @@ declare module 'stripe' { currency: string; /** - * The ID of the product that this price will belong to. One of `product` or `product_data` is required. + * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. */ product?: string; /** - * Data used to generate a new product object inline. One of `product` or `product_data` is required. + * Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. */ product_data?: PriceData.ProductData; diff --git a/types/OrdersResource.d.ts b/types/OrdersResource.d.ts index 59494663b6..e3fe525b56 100644 --- a/types/OrdersResource.d.ts +++ b/types/OrdersResource.d.ts @@ -150,7 +150,7 @@ declare module 'stripe' { discounts?: Stripe.Emptyable>; /** - * The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + * The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. * * The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. */ @@ -159,21 +159,21 @@ declare module 'stripe' { /** * Data used to generate a new Price object inline. * - * The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + * The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. * - * Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + * Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. */ price_data?: LineItem.PriceData; /** - * The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + * The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. * - * The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + * The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. */ product?: string; /** - * Defines a Product inline and adds it to the Order. + * Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. * * `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. * @@ -212,7 +212,7 @@ declare module 'stripe' { currency?: string; /** - * ID of the product this price belongs to. + * ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. * * Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. */ @@ -1575,7 +1575,7 @@ declare module 'stripe' { id?: string; /** - * The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + * The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. * * The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. */ @@ -1584,21 +1584,21 @@ declare module 'stripe' { /** * Data used to generate a new Price object inline. * - * The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + * The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. * - * Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + * Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. */ price_data?: LineItem.PriceData; /** - * The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + * The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. * - * The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + * The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. */ product?: string; /** - * Defines a Product inline and adds it to the Order. + * Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. * * `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. * @@ -1637,7 +1637,7 @@ declare module 'stripe' { currency?: string; /** - * ID of the product this price belongs to. + * ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. * * Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. */ From 1b22b8807ad57d06fb47fc02277a0d2bd6a3d714 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 00:53:40 +0000 Subject: [PATCH 52/53] Update generated code for v1548 --- OPENAPI_VERSION | 2 +- types/InvoiceLineItems.d.ts | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 277576c427..3a0f7b991f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1547 \ No newline at end of file +v1548 \ No newline at end of file diff --git a/types/InvoiceLineItems.d.ts b/types/InvoiceLineItems.d.ts index 0a344f2eff..ee84b24643 100644 --- a/types/InvoiceLineItems.d.ts +++ b/types/InvoiceLineItems.d.ts @@ -23,11 +23,6 @@ declare module 'stripe' { */ amount: number; - /** - * The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. - */ - amount_excluding_tax: number | null; - /** * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -139,11 +134,6 @@ declare module 'stripe' { * A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. */ type: InvoiceLineItem.Type; - - /** - * The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. - */ - unit_amount_excluding_tax: string | null; } namespace InvoiceLineItem { From f4ce31e40c8c14b72c3442d6d115d4e881d5c0a4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 01:34:10 +0000 Subject: [PATCH 53/53] Update generated code for v1549 --- OPENAPI_VERSION | 2 +- types/Checkout/Sessions.d.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3a0f7b991f..7b9cc1bba3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1548 \ No newline at end of file +v1549 \ No newline at end of file diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 2c66ad1d3e..56def7ff2d 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -75,7 +75,8 @@ declare module 'stripe' { client_reference_id: string | null; /** - * The client secret of the Session. Use this with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + * The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout. + * For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. */ client_secret: string | null; @@ -311,7 +312,7 @@ declare module 'stripe' { ui_mode: Session.UiMode | null; /** - * The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.` + * The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.` * This value is only present when the session is active. */ url: string | null;