Skip to content

Commit 63c476b

Browse files
Add support for Bancontact/iDEAL/Sofort -> SEPA (#1028)
* Codegen for openapi db6e2d0
1 parent a9f8e13 commit 63c476b

4 files changed

Lines changed: 223 additions & 9 deletions

File tree

types/2020-08-27/Cards.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ declare module 'stripe' {
9898
deleted?: void;
9999

100100
/**
101-
* Card description. (Only for internal use only and not typically available in standard API requests.)
101+
* Card description. (For internal use only and not typically available in standard API requests.)
102102
*/
103103
description?: string;
104104

@@ -128,12 +128,12 @@ declare module 'stripe' {
128128
funding: string;
129129

130130
/**
131-
* Issuer identification number of the card. (Only for internal use only and not typically available in standard API requests.)
131+
* Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
132132
*/
133133
iin?: string;
134134

135135
/**
136-
* Issuer bank name of the card. (Only for internal use only and not typically available in standard API requests.)
136+
* Issuer bank name of the card. (For internal use only and not typically available in standard API requests.)
137137
*/
138138
issuer?: string;
139139

types/2020-08-27/Charges.d.ts

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,16 @@ declare module 'stripe' {
598598
*/
599599
bic: string | null;
600600

601+
/**
602+
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
603+
*/
604+
generated_sepa_debit: string | Stripe.PaymentMethod | null;
605+
606+
/**
607+
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
608+
*/
609+
generated_sepa_debit_mandate: string | Stripe.Mandate | null;
610+
601611
/**
602612
* Last four characters of the IBAN.
603613
*/
@@ -637,7 +647,7 @@ declare module 'stripe' {
637647
country: string | null;
638648

639649
/**
640-
* Card description. (Only for internal use only and not typically available in standard API requests.)
650+
* Card description. (For internal use only and not typically available in standard API requests.)
641651
*/
642652
description?: string | null;
643653

@@ -662,7 +672,7 @@ declare module 'stripe' {
662672
funding: string | null;
663673

664674
/**
665-
* Issuer identification number of the card. (Only for internal use only and not typically available in standard API requests.)
675+
* Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
666676
*/
667677
iin?: string | null;
668678

@@ -674,7 +684,7 @@ declare module 'stripe' {
674684
installments: Card.Installments | null;
675685

676686
/**
677-
* Issuer bank name of the card. (Only for internal use only and not typically available in standard API requests.)
687+
* Issuer bank name of the card. (For internal use only and not typically available in standard API requests.)
678688
*/
679689
issuer?: string | null;
680690

@@ -1096,6 +1106,16 @@ declare module 'stripe' {
10961106
*/
10971107
bic: Ideal.Bic | null;
10981108

1109+
/**
1110+
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1111+
*/
1112+
generated_sepa_debit: string | Stripe.PaymentMethod | null;
1113+
1114+
/**
1115+
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1116+
*/
1117+
generated_sepa_debit_mandate: string | Stripe.Mandate | null;
1118+
10991119
/**
11001120
* Last four characters of the IBAN.
11011121
*/
@@ -1370,6 +1390,16 @@ declare module 'stripe' {
13701390
*/
13711391
country: string | null;
13721392

1393+
/**
1394+
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1395+
*/
1396+
generated_sepa_debit: string | Stripe.PaymentMethod | null;
1397+
1398+
/**
1399+
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
1400+
*/
1401+
generated_sepa_debit_mandate: string | Stripe.Mandate | null;
1402+
13731403
/**
13741404
* Last four characters of the IBAN.
13751405
*/

types/2020-08-27/PaymentMethods.d.ts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ declare module 'stripe' {
151151
country: string | null;
152152

153153
/**
154-
* Card description. (Only for internal use only and not typically available in standard API requests.)
154+
* Card description. (For internal use only and not typically available in standard API requests.)
155155
*/
156156
description?: string | null;
157157

@@ -176,12 +176,12 @@ declare module 'stripe' {
176176
funding: string;
177177

178178
/**
179-
* Issuer identification number of the card. (Only for internal use only and not typically available in standard API requests.)
179+
* Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
180180
*/
181181
iin?: string | null;
182182

183183
/**
184-
* Issuer bank name of the card. (Only for internal use only and not typically available in standard API requests.)
184+
* Issuer bank name of the card. (For internal use only and not typically available in standard API requests.)
185185
*/
186186
issuer?: string | null;
187187

@@ -443,12 +443,31 @@ declare module 'stripe' {
443443
*/
444444
fingerprint: string | null;
445445

446+
/**
447+
* Information about the object that generated this PaymentMethod.
448+
*/
449+
generated_from: SepaDebit.GeneratedFrom | null;
450+
446451
/**
447452
* Last four characters of the IBAN.
448453
*/
449454
last4: string | null;
450455
}
451456

457+
namespace SepaDebit {
458+
interface GeneratedFrom {
459+
/**
460+
* The ID of the Charge that generated this PaymentMethod, if any.
461+
*/
462+
charge: string | Stripe.Charge | null;
463+
464+
/**
465+
* The ID of the SetupAttempt that generated this PaymentMethod, if any.
466+
*/
467+
setup_attempt: string | Stripe.SetupAttempt | null;
468+
}
469+
}
470+
452471
interface Sofort {
453472
/**
454473
* Two-letter ISO code representing the country the bank account is located in.

types/2020-08-27/SetupAttempts.d.ts

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,69 @@ declare module 'stripe' {
7070

7171
namespace SetupAttempt {
7272
interface PaymentMethodDetails {
73+
bancontact?: PaymentMethodDetails.Bancontact;
74+
7375
card?: PaymentMethodDetails.Card;
7476

77+
ideal?: PaymentMethodDetails.Ideal;
78+
79+
sofort?: PaymentMethodDetails.Sofort;
80+
7581
/**
7682
* The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.
7783
*/
7884
type: string;
7985
}
8086

8187
namespace PaymentMethodDetails {
88+
interface Bancontact {
89+
/**
90+
* Bank code of bank associated with the bank account.
91+
*/
92+
bank_code: string | null;
93+
94+
/**
95+
* Name of the bank associated with the bank account.
96+
*/
97+
bank_name: string | null;
98+
99+
/**
100+
* Bank Identifier Code of the bank associated with the bank account.
101+
*/
102+
bic: string | null;
103+
104+
/**
105+
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
106+
*/
107+
generated_sepa_debit: string | Stripe.PaymentMethod | null;
108+
109+
/**
110+
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
111+
*/
112+
generated_sepa_debit_mandate: string | Stripe.Mandate | null;
113+
114+
/**
115+
* Last four characters of the IBAN.
116+
*/
117+
iban_last4: string | null;
118+
119+
/**
120+
* Preferred language of the Bancontact authorization page that the customer is redirected to.
121+
* Can be one of `en`, `de`, `fr`, or `nl`
122+
*/
123+
preferred_language: Bancontact.PreferredLanguage | null;
124+
125+
/**
126+
* Owner's verified full name. Values are verified or provided by Bancontact directly
127+
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
128+
*/
129+
verified_name: string | null;
130+
}
131+
132+
namespace Bancontact {
133+
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
134+
}
135+
82136
interface Card {
83137
/**
84138
* Populated if this authorization used 3D Secure authentication.
@@ -133,6 +187,117 @@ declare module 'stripe' {
133187
type Version = '1.0.2' | '2.1.0' | '2.2.0';
134188
}
135189
}
190+
191+
interface Ideal {
192+
/**
193+
* The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
194+
*/
195+
bank: Ideal.Bank | null;
196+
197+
/**
198+
* The Bank Identifier Code of the customer's bank.
199+
*/
200+
bic: Ideal.Bic | null;
201+
202+
/**
203+
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
204+
*/
205+
generated_sepa_debit: string | Stripe.PaymentMethod | null;
206+
207+
/**
208+
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
209+
*/
210+
generated_sepa_debit_mandate: string | Stripe.Mandate | null;
211+
212+
/**
213+
* Last four characters of the IBAN.
214+
*/
215+
iban_last4: string | null;
216+
217+
/**
218+
* Owner's verified full name. Values are verified or provided by iDEAL directly
219+
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
220+
*/
221+
verified_name: string | null;
222+
}
223+
224+
namespace Ideal {
225+
type Bank =
226+
| 'abn_amro'
227+
| 'asn_bank'
228+
| 'bunq'
229+
| 'handelsbanken'
230+
| 'ing'
231+
| 'knab'
232+
| 'moneyou'
233+
| 'rabobank'
234+
| 'regiobank'
235+
| 'sns_bank'
236+
| 'triodos_bank'
237+
| 'van_lanschot';
238+
239+
type Bic =
240+
| 'ABNANL2A'
241+
| 'ASNBNL21'
242+
| 'BUNQNL2A'
243+
| 'FVLBNL22'
244+
| 'HANDNL2A'
245+
| 'INGBNL2A'
246+
| 'KNABNL2H'
247+
| 'MOYONL21'
248+
| 'RABONL2U'
249+
| 'RBRBNL21'
250+
| 'SNSBNL2A'
251+
| 'TRIONL2U';
252+
}
253+
254+
interface Sofort {
255+
/**
256+
* Bank code of bank associated with the bank account.
257+
*/
258+
bank_code: string | null;
259+
260+
/**
261+
* Name of the bank associated with the bank account.
262+
*/
263+
bank_name: string | null;
264+
265+
/**
266+
* Bank Identifier Code of the bank associated with the bank account.
267+
*/
268+
bic: string | null;
269+
270+
/**
271+
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
272+
*/
273+
generated_sepa_debit: string | Stripe.PaymentMethod | null;
274+
275+
/**
276+
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
277+
*/
278+
generated_sepa_debit_mandate: string | Stripe.Mandate | null;
279+
280+
/**
281+
* Last four characters of the IBAN.
282+
*/
283+
iban_last4: string | null;
284+
285+
/**
286+
* Preferred language of the Sofort authorization page that the customer is redirected to.
287+
* Can be one of `en`, `de`, `fr`, or `nl`
288+
*/
289+
preferred_language: Sofort.PreferredLanguage | null;
290+
291+
/**
292+
* Owner's verified full name. Values are verified or provided by Sofort directly
293+
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
294+
*/
295+
verified_name: string | null;
296+
}
297+
298+
namespace Sofort {
299+
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
300+
}
136301
}
137302

138303
interface SetupError {

0 commit comments

Comments
 (0)