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 FPX as a PaymentMethod #787

Merged
merged 1 commit into from
Jan 30, 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
12 changes: 6 additions & 6 deletions types/2019-12-03/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare module 'stripe' {
object: 'account';

/**
* Optional information related to the business.
* Business information about the account.
*/
business_profile: Account.BusinessProfile | null;

Expand Down Expand Up @@ -95,7 +95,7 @@ declare module 'stripe' {
namespace Account {
interface BusinessProfile {
/**
* The merchant category code for the account. MCCs are used to classify businesses based on the goods or services they provide.
* [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
*/
mcc: string | null;

Expand Down Expand Up @@ -542,7 +542,7 @@ declare module 'stripe' {
account_token?: string;

/**
* Non-essential business information about the account
* Business information about the account.
*/
business_profile?: AccountCreateParams.BusinessProfile;

Expand Down Expand Up @@ -617,7 +617,7 @@ declare module 'stripe' {
namespace AccountCreateParams {
interface BusinessProfile {
/**
* The merchant category code for the account. MCCs are used to classify businesses based on the goods or services they provide.
* [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
*/
mcc?: string;

Expand Down Expand Up @@ -1147,7 +1147,7 @@ declare module 'stripe' {
account_token?: string;

/**
* Non-essential business information about the account
* Business information about the account.
*/
business_profile?: AccountUpdateParams.BusinessProfile;

Expand Down Expand Up @@ -1212,7 +1212,7 @@ declare module 'stripe' {
namespace AccountUpdateParams {
interface BusinessProfile {
/**
* The merchant category code for the account. MCCs are used to classify businesses based on the goods or services they provide.
* [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
*/
mcc?: string;

Expand Down
46 changes: 46 additions & 0 deletions types/2019-12-03/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ declare module 'stripe' {

eps?: PaymentMethodDetails.Eps;

fpx?: PaymentMethodDetails.Fpx;

giropay?: PaymentMethodDetails.Giropay;

ideal?: PaymentMethodDetails.Ideal;
Expand Down Expand Up @@ -922,6 +924,50 @@ declare module 'stripe' {
verified_name: string | null;
}

interface Fpx {
/**
* Account holder type, if provided. Can be one of `individual` or `company`.
*/
account_holder_type: Fpx.AccountHolderType | null;

/**
* The customer's bank. Can be one of `affin_bank`, `alliance_bank`, `ambank`, `cimb`, `bank_islam`, `bank_rakyat`, `bank_muamalat`, `bsn`, `deutsche_bank`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `maybank2e`, `ocbc`, `public_bank`, `pb_enterprise`, `rhb`, `standard_chartered`, `uob`, or `uob_regional`.
*/
bank: Fpx.Bank;

/**
* Unique transaction id generated by FPX for every request from the merchant
*/
transaction_id: string | null;
}

namespace Fpx {
type AccountHolderType = 'company' | 'individual';

type Bank =
| 'affin_bank'
| 'alliance_bank'
| 'ambank'
| 'bank_islam'
| 'bank_muamalat'
| 'bank_rakyat'
| 'bsn'
| 'cimb'
| 'deutsche_bank'
| 'hong_leong_bank'
| 'hsbc'
| 'kfh'
| 'maybank2e'
| 'maybank2u'
| 'ocbc'
| 'pb_enterprise'
| 'public_bank'
| 'rhb'
| 'standard_chartered'
| 'uob'
| 'uob_regional';
}

interface Giropay {
/**
* Bank code of bank associated with the bank account.
Expand Down
87 changes: 87 additions & 0 deletions types/2019-12-03/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ declare module 'stripe' {
*/
customer: string | Stripe.Customer | null;

fpx?: PaymentMethod.Fpx;

ideal?: PaymentMethod.Ideal;

/**
Expand Down Expand Up @@ -264,6 +266,45 @@ declare module 'stripe' {

interface CardPresent {}

interface Fpx {
/**
* Account holder type, if provided. Can be one of `individual` or `company`.
*/
account_holder_type: Fpx.AccountHolderType | null;

/**
* The customer's bank, if provided. Can be one of `affin_bank`, `alliance_bank`, `ambank`, `cimb`, `bank_islam`, `bank_rakyat`, `bank_muamalat`, `bsn`, `deutsche_bank`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `maybank2e`, `ocbc`, `public_bank`, `pb_enterprise`, `rhb`, `standard_chartered`, `uob`, or `uob_regional`.
*/
bank: Fpx.Bank;
}

namespace Fpx {
type AccountHolderType = 'company' | 'individual';

type Bank =
| 'affin_bank'
| 'alliance_bank'
| 'ambank'
| 'bank_islam'
| 'bank_muamalat'
| 'bank_rakyat'
| 'bsn'
| 'cimb'
| 'deutsche_bank'
| 'hong_leong_bank'
| 'hsbc'
| 'kfh'
| 'maybank2e'
| 'maybank2u'
| 'ocbc'
| 'pb_enterprise'
| 'public_bank'
| 'rhb'
| 'standard_chartered'
| 'uob'
| 'uob_regional';
}

interface Ideal {
/**
* 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`.
Expand Down Expand Up @@ -337,6 +378,7 @@ declare module 'stripe' {
| 'au_becs_debit'
| 'card'
| 'card_present'
| 'fpx'
| 'ideal'
| 'sepa_debit';
}
Expand Down Expand Up @@ -367,6 +409,11 @@ declare module 'stripe' {
*/
expand?: Array<string>;

/**
* If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
*/
fpx?: PaymentMethodCreateParams.Fpx;

/**
* If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
*/
Expand Down Expand Up @@ -481,6 +528,45 @@ declare module 'stripe' {
token: string;
}

interface Fpx {
/**
* Account holder type for FPX transaction
*/
account_holder_type?: Fpx.AccountHolderType;

/**
* The customer's bank.
*/
bank: Fpx.Bank;
}

namespace Fpx {
type AccountHolderType = 'company' | 'individual';

type Bank =
| 'affin_bank'
| 'alliance_bank'
| 'ambank'
| 'bank_islam'
| 'bank_muamalat'
| 'bank_rakyat'
| 'bsn'
| 'cimb'
| 'deutsche_bank'
| 'hong_leong_bank'
| 'hsbc'
| 'kfh'
| 'maybank2e'
| 'maybank2u'
| 'ocbc'
| 'pb_enterprise'
| 'public_bank'
| 'rhb'
| 'standard_chartered'
| 'uob'
| 'uob_regional';
}

interface Ideal {
/**
* The customer's bank.
Expand Down Expand Up @@ -515,6 +601,7 @@ declare module 'stripe' {
| 'au_becs_debit'
| 'card'
| 'card_present'
| 'fpx'
| 'ideal'
| 'sepa_debit';
}
Expand Down