Skip to content

Commit

Permalink
Merge pull request #918 from stripe/remi/codegen-56aa36d
Browse files Browse the repository at this point in the history
Add support for Cartes Bancaires payments on `PaymentIntent` and `Pay…
  • Loading branch information
remi-stripe authored Jun 11, 2020
2 parents 9f99ffd + e0b43c6 commit a1fdff0
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 3 deletions.
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

0 comments on commit a1fdff0

Please sign in to comment.