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 Cartes Bancaires payments on PaymentIntent and `Pay… #918

Merged
merged 1 commit into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions types/2020-03-02/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ declare module 'stripe' {
moto?: boolean | null;

/**
* Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;

Expand Down Expand Up @@ -942,7 +942,7 @@ declare module 'stripe' {
last4: string | null;

/**
* Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;

Expand Down Expand Up @@ -1182,7 +1182,7 @@ declare module 'stripe' {
last4: string | null;

/**
* Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;

Expand Down
68 changes: 68 additions & 0 deletions types/2020-03-02/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ declare module 'stripe' {
*/
installments: Card.Installments | null;

/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
*/
network: Card.Network | null;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
*/
Expand Down Expand Up @@ -433,6 +438,18 @@ declare module 'stripe' {
}
}

type Network =
| 'amex'
| 'cartes_bancaires'
| 'diners'
| 'discover'
| 'interac'
| 'jcb'
| 'mastercard'
| 'unionpay'
| 'unknown'
| 'visa';

type RequestThreeDSecure = 'any' | 'automatic' | 'challenge_only';
}
}
Expand Down Expand Up @@ -743,6 +760,11 @@ declare module 'stripe' {
*/
moto?: boolean;

/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
*/
network?: Card.Network;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
*/
Expand Down Expand Up @@ -785,6 +807,18 @@ declare module 'stripe' {
}
}

type Network =
| 'amex'
| 'cartes_bancaires'
| 'diners'
| 'discover'
| 'interac'
| 'jcb'
| 'mastercard'
| 'unionpay'
| 'unknown'
| 'visa';

type RequestThreeDSecure = 'any' | 'automatic';
}
}
Expand Down Expand Up @@ -1003,6 +1037,11 @@ declare module 'stripe' {
*/
moto?: boolean;

/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
*/
network?: Card.Network;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
*/
Expand Down Expand Up @@ -1045,6 +1084,18 @@ declare module 'stripe' {
}
}

type Network =
| 'amex'
| 'cartes_bancaires'
| 'diners'
| 'discover'
| 'interac'
| 'jcb'
| 'mastercard'
| 'unionpay'
| 'unknown'
| 'visa';

type RequestThreeDSecure = 'any' | 'automatic';
}
}
Expand Down Expand Up @@ -1379,6 +1430,11 @@ declare module 'stripe' {
*/
moto?: boolean;

/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
*/
network?: Card.Network;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
*/
Expand Down Expand Up @@ -1421,6 +1477,18 @@ declare module 'stripe' {
}
}

type Network =
| 'amex'
| 'cartes_bancaires'
| 'diners'
| 'discover'
| 'interac'
| 'jcb'
| 'mastercard'
| 'unionpay'
| 'unknown'
| 'visa';

type RequestThreeDSecure = 'any' | 'automatic';
}
}
Expand Down
17 changes: 17 additions & 0 deletions types/2020-03-02/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ declare module 'stripe' {
*/
last4: string;

/**
* Contains information about card networks that can be used to process the payment.
*/
networks: Card.Networks | null;

/**
* Contains details on how this Card maybe be used for 3D Secure authentication.
*/
Expand Down Expand Up @@ -210,6 +215,18 @@ declare module 'stripe' {
cvc_check: string | null;
}

interface Networks {
/**
* All available networks for the card.
*/
available: Array<string>;

/**
* The preferred network for the card.
*/
preferred: string | null;
}

interface ThreeDSecureUsage {
/**
* Whether 3D Secure is supported on this card.
Expand Down