Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 96c2074

Browse files
authoredJun 3, 2020
Merge pull request stripe#908 from stripe/remi/codegen-1158945
Multiple API changes
2 parents 2842866 + ae83251 commit 96c2074

8 files changed

+171
-9
lines changed
 

‎types/2020-03-02/Accounts.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@ declare module 'stripe' {
511511
payments: Settings.Payments;
512512

513513
payouts?: Settings.Payouts;
514+
515+
sepa_debit_payments?: Settings.SepaDebitPayments;
514516
}
515517

516518
namespace Settings {
@@ -632,6 +634,13 @@ declare module 'stripe' {
632634
weekly_anchor?: string;
633635
}
634636
}
637+
638+
interface SepaDebitPayments {
639+
/**
640+
* SEPA creditor identifier that identifies the company making the payment.
641+
*/
642+
creditor_id?: string;
643+
}
635644
}
636645

637646
interface TosAcceptance {

‎types/2020-03-02/Checkout/Sessions.d.ts

+36-5
Original file line numberDiff line numberDiff line change
@@ -198,21 +198,34 @@ declare module 'stripe' {
198198

199199
type Locale =
200200
| 'auto'
201+
| 'bg'
202+
| 'cs'
201203
| 'da'
202204
| 'de'
205+
| 'el'
203206
| 'en'
204207
| 'es'
208+
| 'et'
205209
| 'fi'
206210
| 'fr'
211+
| 'hu'
207212
| 'it'
208213
| 'ja'
214+
| 'lt'
215+
| 'lv'
209216
| 'ms'
217+
| 'mt'
210218
| 'nb'
211219
| 'nl'
212220
| 'pl'
213221
| 'pt'
214222
| 'pt-BR'
223+
| 'ro'
224+
| 'ru'
225+
| 'sk'
226+
| 'sl'
215227
| 'sv'
228+
| 'tr'
216229
| 'zh';
217230

218231
type Mode = 'payment' | 'setup' | 'subscription';
@@ -500,7 +513,14 @@ declare module 'stripe' {
500513
cancel_url: string;
501514

502515
/**
503-
* A list of the types of payment methods (e.g., card) this Checkout session can accept.
516+
* A list of the types of payment methods (e.g., `card`) this Checkout session can accept.
517+
*
518+
* Read more about the supported payment methods and their requirements in our [payment
519+
* method details guide](https://stripe.com/docs/payments/checkout/payment-methods).
520+
*
521+
* If multiple payment methods are passed, Checkout will dynamically reorder them to
522+
* prioritize the most relevant payment methods based on the customer's location and
523+
* other characteristics.
504524
*/
505525
payment_method_types: Array<SessionCreateParams.PaymentMethodType>;
506526

@@ -552,9 +572,7 @@ declare module 'stripe' {
552572

553573
/**
554574
* A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [prices](https://stripe.com/docs/api/prices).
555-
*
556-
* If not using recurring prices, this parameter is for one-time payments or
557-
* adding invoice line items to a subscription (used in conjunction with `subscription_data.items`).
575+
* One-time prices in `subscription` mode will be on the initial invoice only.
558576
*
559577
* There is a maximum of 100 line items, however it is recommended to
560578
* consolidate line items if there are more than a few dozen.
@@ -680,7 +698,7 @@ declare module 'stripe' {
680698
recurring?: PriceData.Recurring;
681699

682700
/**
683-
* A positive integer in %s (or 0 for a free price) representing how much to charge.
701+
* A positive integer in %s representing how much to charge.
684702
*/
685703
unit_amount?: number;
686704

@@ -733,21 +751,34 @@ declare module 'stripe' {
733751

734752
type Locale =
735753
| 'auto'
754+
| 'bg'
755+
| 'cs'
736756
| 'da'
737757
| 'de'
758+
| 'el'
738759
| 'en'
739760
| 'es'
761+
| 'et'
740762
| 'fi'
741763
| 'fr'
764+
| 'hu'
742765
| 'it'
743766
| 'ja'
767+
| 'lt'
768+
| 'lv'
744769
| 'ms'
770+
| 'mt'
745771
| 'nb'
746772
| 'nl'
747773
| 'pl'
748774
| 'pt'
749775
| 'pt-BR'
776+
| 'ro'
777+
| 'ru'
778+
| 'sk'
779+
| 'sl'
750780
| 'sv'
781+
| 'tr'
751782
| 'zh';
752783

753784
type Mode = 'payment' | 'setup' | 'subscription';

‎types/2020-03-02/Invoices.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ declare module 'stripe' {
298298
/**
299299
* The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
300300
*/
301-
transfer_data?: Invoice.TransferData | null;
301+
transfer_data: Invoice.TransferData | null;
302302

303303
/**
304304
* Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.

‎types/2020-03-02/PaymentIntents.d.ts

+61
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,23 @@ declare module 'stripe' {
346346
}
347347

348348
interface PaymentMethodOptions {
349+
bancontact?: PaymentMethodOptions.Bancontact;
350+
349351
card?: PaymentMethodOptions.Card;
350352
}
351353

352354
namespace PaymentMethodOptions {
355+
interface Bancontact {
356+
/**
357+
* Preferred language of the Bancontact authorization page that the customer is redirected to.
358+
*/
359+
preferred_language: Bancontact.PreferredLanguage;
360+
}
361+
362+
namespace Bancontact {
363+
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
364+
}
365+
353366
interface Card {
354367
/**
355368
* Installment details for this payment (Mexico only).
@@ -692,13 +705,29 @@ declare module 'stripe' {
692705
type OffSession = 'one_off' | 'recurring';
693706

694707
interface PaymentMethodOptions {
708+
/**
709+
* If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
710+
*/
711+
bancontact?: PaymentMethodOptions.Bancontact | null;
712+
695713
/**
696714
* Configuration for any card payments attempted on this PaymentIntent.
697715
*/
698716
card?: PaymentMethodOptions.Card | null;
699717
}
700718

701719
namespace PaymentMethodOptions {
720+
interface Bancontact {
721+
/**
722+
* Preferred language of the Bancontact authorization page that the customer is redirected to.
723+
*/
724+
preferred_language?: Bancontact.PreferredLanguage;
725+
}
726+
727+
namespace Bancontact {
728+
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
729+
}
730+
702731
interface Card {
703732
/**
704733
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
@@ -936,13 +965,29 @@ declare module 'stripe' {
936965

937966
namespace PaymentIntentUpdateParams {
938967
interface PaymentMethodOptions {
968+
/**
969+
* If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
970+
*/
971+
bancontact?: PaymentMethodOptions.Bancontact | null;
972+
939973
/**
940974
* Configuration for any card payments attempted on this PaymentIntent.
941975
*/
942976
card?: PaymentMethodOptions.Card | null;
943977
}
944978

945979
namespace PaymentMethodOptions {
980+
interface Bancontact {
981+
/**
982+
* Preferred language of the Bancontact authorization page that the customer is redirected to.
983+
*/
984+
preferred_language?: Bancontact.PreferredLanguage;
985+
}
986+
987+
namespace Bancontact {
988+
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
989+
}
990+
946991
interface Card {
947992
/**
948993
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
@@ -1296,13 +1341,29 @@ declare module 'stripe' {
12961341
type OffSession = 'one_off' | 'recurring';
12971342

12981343
interface PaymentMethodOptions {
1344+
/**
1345+
* If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
1346+
*/
1347+
bancontact?: PaymentMethodOptions.Bancontact | null;
1348+
12991349
/**
13001350
* Configuration for any card payments attempted on this PaymentIntent.
13011351
*/
13021352
card?: PaymentMethodOptions.Card | null;
13031353
}
13041354

13051355
namespace PaymentMethodOptions {
1356+
interface Bancontact {
1357+
/**
1358+
* Preferred language of the Bancontact authorization page that the customer is redirected to.
1359+
*/
1360+
preferred_language?: Bancontact.PreferredLanguage;
1361+
}
1362+
1363+
namespace Bancontact {
1364+
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
1365+
}
1366+
13061367
interface Card {
13071368
/**
13081369
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).

‎types/2020-03-02/PaymentMethods.d.ts

+56
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ declare module 'stripe' {
1818

1919
bacs_debit?: PaymentMethod.BacsDebit;
2020

21+
bancontact?: PaymentMethod.Bancontact;
22+
2123
billing_details: PaymentMethod.BillingDetails;
2224

2325
card?: PaymentMethod.Card;
@@ -34,8 +36,12 @@ declare module 'stripe' {
3436
*/
3537
customer: string | Stripe.Customer | null;
3638

39+
eps?: PaymentMethod.Eps;
40+
3741
fpx?: PaymentMethod.Fpx;
3842

43+
giropay?: PaymentMethod.Giropay;
44+
3945
ideal?: PaymentMethod.Ideal;
4046

4147
interac_present?: PaymentMethod.InteracPresent;
@@ -50,6 +56,8 @@ declare module 'stripe' {
5056
*/
5157
metadata: Metadata;
5258

59+
p24?: PaymentMethod.P24;
60+
5361
sepa_debit?: PaymentMethod.SepaDebit;
5462

5563
/**
@@ -93,6 +101,8 @@ declare module 'stripe' {
93101
sort_code: string | null;
94102
}
95103

104+
interface Bancontact {}
105+
96106
interface BillingDetails {
97107
/**
98108
* Billing address.
@@ -296,6 +306,8 @@ declare module 'stripe' {
296306

297307
interface CardPresent {}
298308

309+
interface Eps {}
310+
299311
interface Fpx {
300312
/**
301313
* Account holder type, if provided. Can be one of `individual` or `company`.
@@ -334,6 +346,8 @@ declare module 'stripe' {
334346
| 'uob';
335347
}
336348

349+
interface Giropay {}
350+
337351
interface Ideal {
338352
/**
339353
* The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
@@ -378,6 +392,8 @@ declare module 'stripe' {
378392

379393
interface InteracPresent {}
380394

395+
interface P24 {}
396+
381397
interface SepaDebit {
382398
/**
383399
* Bank code of bank associated with the bank account.
@@ -408,10 +424,14 @@ declare module 'stripe' {
408424
type Type =
409425
| 'au_becs_debit'
410426
| 'bacs_debit'
427+
| 'bancontact'
411428
| 'card'
412429
| 'card_present'
430+
| 'eps'
413431
| 'fpx'
432+
| 'giropay'
414433
| 'ideal'
434+
| 'p24'
415435
| 'sepa_debit';
416436
}
417437

@@ -426,6 +446,11 @@ declare module 'stripe' {
426446
*/
427447
bacs_debit?: PaymentMethodCreateParams.BacsDebit;
428448

449+
/**
450+
* If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
451+
*/
452+
bancontact?: PaymentMethodCreateParams.Bancontact;
453+
429454
/**
430455
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
431456
*/
@@ -441,6 +466,11 @@ declare module 'stripe' {
441466
*/
442467
customer?: string;
443468

469+
/**
470+
* If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
471+
*/
472+
eps?: PaymentMethodCreateParams.Eps;
473+
444474
/**
445475
* Specifies which fields in the response should be expanded.
446476
*/
@@ -451,6 +481,11 @@ declare module 'stripe' {
451481
*/
452482
fpx?: PaymentMethodCreateParams.Fpx;
453483

484+
/**
485+
* If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
486+
*/
487+
giropay?: PaymentMethodCreateParams.Giropay;
488+
454489
/**
455490
* If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
456491
*/
@@ -466,6 +501,11 @@ declare module 'stripe' {
466501
*/
467502
metadata?: MetadataParam;
468503

504+
/**
505+
* If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
506+
*/
507+
p24?: PaymentMethodCreateParams.P24;
508+
469509
/**
470510
* The PaymentMethod to share.
471511
*/
@@ -507,6 +547,8 @@ declare module 'stripe' {
507547
sort_code?: string;
508548
}
509549

550+
interface Bancontact {}
551+
510552
interface BillingDetails {
511553
/**
512554
* Billing address.
@@ -589,6 +631,8 @@ declare module 'stripe' {
589631
token: string;
590632
}
591633

634+
interface Eps {}
635+
592636
interface Fpx {
593637
/**
594638
* Account holder type for FPX transaction
@@ -627,6 +671,8 @@ declare module 'stripe' {
627671
| 'uob';
628672
}
629673

674+
interface Giropay {}
675+
630676
interface Ideal {
631677
/**
632678
* The customer's bank.
@@ -652,6 +698,8 @@ declare module 'stripe' {
652698

653699
interface InteracPresent {}
654700

701+
interface P24 {}
702+
655703
interface SepaDebit {
656704
/**
657705
* IBAN of the bank account.
@@ -662,10 +710,14 @@ declare module 'stripe' {
662710
type Type =
663711
| 'au_becs_debit'
664712
| 'bacs_debit'
713+
| 'bancontact'
665714
| 'card'
666715
| 'card_present'
716+
| 'eps'
667717
| 'fpx'
718+
| 'giropay'
668719
| 'ideal'
720+
| 'p24'
669721
| 'sepa_debit';
670722
}
671723

@@ -802,10 +854,14 @@ declare module 'stripe' {
802854
namespace PaymentMethodListParams {
803855
type Type =
804856
| 'au_becs_debit'
857+
| 'bancontact'
805858
| 'card'
806859
| 'card_present'
860+
| 'eps'
807861
| 'fpx'
862+
| 'giropay'
808863
| 'ideal'
864+
| 'p24'
809865
| 'sepa_debit';
810866
}
811867

‎types/2020-03-02/Sources.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,11 @@ declare module 'stripe' {
610610
*/
611611
description: string | null;
612612

613+
/**
614+
* The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).
615+
*/
616+
parent: string | null;
617+
613618
/**
614619
* The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
615620
*/

‎types/2020-03-02/SubscriptionSchedules.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ declare module 'stripe' {
119119
/**
120120
* The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
121121
*/
122-
transfer_data?: DefaultSettings.TransferData | null;
122+
transfer_data: DefaultSettings.TransferData | null;
123123
}
124124

125125
namespace DefaultSettings {
@@ -228,7 +228,7 @@ declare module 'stripe' {
228228
/**
229229
* The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
230230
*/
231-
transfer_data?: Phase.TransferData | null;
231+
transfer_data: Phase.TransferData | null;
232232

233233
/**
234234
* When the trial ends within the phase.

‎types/2020-03-02/Subscriptions.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ declare module 'stripe' {
185185
/**
186186
* The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
187187
*/
188-
transfer_data?: Subscription.TransferData | null;
188+
transfer_data: Subscription.TransferData | null;
189189

190190
/**
191191
* If the subscription has a trial, the end of that trial.

0 commit comments

Comments
 (0)
Please sign in to comment.