Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add support for Bancontact/iDEAL/Sofort -> SEPA #1028

Merged
merged 2 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,16 @@ declare module 'stripe' {
*/
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.
*/
Expand Down Expand Up @@ -1096,6 +1106,16 @@ declare module 'stripe' {
*/
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.
*/
Expand Down Expand Up @@ -1370,6 +1390,16 @@ declare module 'stripe' {
*/
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.
*/
Expand Down
19 changes: 19 additions & 0 deletions types/2020-08-27/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,31 @@ declare module 'stripe' {
*/
fingerprint: string | null;

/**
* Information about the object that generated this PaymentMethod.
*/
generated_from: SepaDebit.GeneratedFrom | null;

/**
* Last four characters of the IBAN.
*/
last4: string | null;
}

namespace SepaDebit {
interface GeneratedFrom {
/**
* The ID of the Charge that generated this PaymentMethod, if any.
*/
charge: string | Stripe.Charge | null;

/**
* The ID of the SetupAttempt that generated this PaymentMethod, if any.
*/
setup_attempt: string | Stripe.SetupAttempt | null;
}
}

interface Sofort {
/**
* Two-letter ISO code representing the country the bank account is located in.
Expand Down
165 changes: 165 additions & 0 deletions types/2020-08-27/SetupAttempts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,69 @@ declare module 'stripe' {

namespace SetupAttempt {
interface PaymentMethodDetails {
bancontact?: PaymentMethodDetails.Bancontact;

card?: PaymentMethodDetails.Card;

ideal?: PaymentMethodDetails.Ideal;

sofort?: PaymentMethodDetails.Sofort;

/**
* 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.
*/
type: string;
}

namespace PaymentMethodDetails {
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 SetupAttempt.
*/
generated_sepa_debit: string | Stripe.PaymentMethod | null;

/**
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
*/
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 Card {
/**
* Populated if this authorization used 3D Secure authentication.
Expand Down Expand Up @@ -133,6 +187,117 @@ declare module 'stripe' {
type Version = '1.0.2' | '2.1.0' | '2.2.0';
}
}

interface Ideal {
/**
* 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`.
*/
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 SetupAttempt.
*/
generated_sepa_debit: string | Stripe.PaymentMethod | null;

/**
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
*/
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'
| 'rabobank'
| 'regiobank'
| 'sns_bank'
| 'triodos_bank'
| 'van_lanschot';

type Bic =
| 'ABNANL2A'
| 'ASNBNL21'
| 'BUNQNL2A'
| 'FVLBNL22'
| 'HANDNL2A'
| 'INGBNL2A'
| 'KNABNL2H'
| 'MOYONL21'
| 'RABONL2U'
| 'RBRBNL21'
| 'SNSBNL2A'
| 'TRIONL2U';
}

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;

/**
* The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
*/
generated_sepa_debit: string | Stripe.PaymentMethod | null;

/**
* The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
*/
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 `en`, `de`, `fr`, or `nl`
*/
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' | 'fr' | 'nl';
}
}

interface SetupError {
Expand Down