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

API Updates #1180

Merged
merged 1 commit into from
Jun 30, 2021
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
14 changes: 14 additions & 0 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ declare module 'stripe' {
type: string;

wechat?: PaymentMethodDetails.Wechat;

wechat_pay?: PaymentMethodDetails.WechatPay;
}

namespace PaymentMethodDetails {
Expand Down Expand Up @@ -1573,6 +1575,18 @@ declare module 'stripe' {
interface StripeAccount {}

interface Wechat {}

interface WechatPay {
/**
* Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
*/
fingerprint: string | null;

/**
* Transaction ID of this particular WeChat Pay transaction.
*/
transaction_id: string | null;
}
}

interface Shipping {
Expand Down
24 changes: 23 additions & 1 deletion types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,11 @@ declare module 'stripe' {
* contains details about the OXXO payment method options.
*/
oxxo?: PaymentMethodOptions.Oxxo;

/**
* contains details about the Wechat Pay payment method options.
*/
wechat_pay?: PaymentMethodOptions.WechatPay;
}

namespace PaymentMethodOptions {
Expand Down Expand Up @@ -1350,6 +1355,22 @@ declare module 'stripe' {
*/
expires_after_days?: number;
}

interface WechatPay {
/**
* The app ID registered with WeChat Pay. Only required when client is ios or android.
*/
app_id?: string;

/**
* The client type that the end customer will pay from
*/
client: WechatPay.Client;
}

namespace WechatPay {
type Client = 'android' | 'ios' | 'web';
}
}

type PaymentMethodType =
Expand All @@ -1368,7 +1389,8 @@ declare module 'stripe' {
| 'oxxo'
| 'p24'
| 'sepa_debit'
| 'sofort';
| 'sofort'
| 'wechat_pay';

interface SetupIntentData {
/**
Expand Down
9 changes: 6 additions & 3 deletions types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,8 @@ declare module 'stripe' {
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
| 'sofort';
| 'sofort'
| 'wechat_pay';
}

type Status =
Expand Down Expand Up @@ -954,7 +955,8 @@ declare module 'stripe' {
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
| 'sofort';
| 'sofort'
| 'wechat_pay';
}

interface TransferData {
Expand Down Expand Up @@ -1176,7 +1178,8 @@ declare module 'stripe' {
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
| 'sofort';
| 'sofort'
| 'wechat_pay';
}

interface TransferData {
Expand Down
173 changes: 170 additions & 3 deletions types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ declare module 'stripe' {
use_stripe_sdk?: NextAction.UseStripeSdk;

verify_with_microdeposits?: NextAction.VerifyWithMicrodeposits;

wechat_pay_display_qr_code?: NextAction.WechatPayDisplayQrCode;

wechat_pay_redirect_to_android_app?: NextAction.WechatPayRedirectToAndroidApp;

wechat_pay_redirect_to_ios_app?: NextAction.WechatPayRedirectToIosApp;
}

namespace NextAction {
Expand Down Expand Up @@ -431,6 +437,62 @@ declare module 'stripe' {
*/
hosted_verification_url: string;
}

interface WechatPayDisplayQrCode {
/**
* The data being used to generate QR code
*/
data: string;

/**
* The base64 image data for a pre-generated QR code
*/
image_data_url: string;
}

interface WechatPayRedirectToAndroidApp {
/**
* app_id is the APP ID registered on WeChat open platform
*/
app_id: string;

/**
* nonce_str is a random string
*/
nonce_str: string;

/**
* package is static value
*/
package: string;

/**
* an unique merchant ID assigned by Wechat Pay
*/
partner_id: string;

/**
* an unique trading ID assigned by Wechat Pay
*/
prepay_id: string;

/**
* A signature
*/
sign: string;

/**
* Specifies the current time in epoch format
*/
timestamp: string;
}

interface WechatPayRedirectToIosApp {
/**
* An universal link that redirect to Wechat Pay APP
*/
native_url: string;
}
}

interface PaymentMethodOptions {
Expand All @@ -455,6 +517,8 @@ declare module 'stripe' {
sepa_debit?: PaymentMethodOptions.SepaDebit;

sofort?: PaymentMethodOptions.Sofort;

wechat_pay?: PaymentMethodOptions.WechatPay;
}

namespace PaymentMethodOptions {
Expand Down Expand Up @@ -653,6 +717,22 @@ declare module 'stripe' {
| 'nl'
| 'pl';
}

interface WechatPay {
/**
* The app ID registered with WeChat Pay. Only required when client is ios or android.
*/
app_id: string | null;

/**
* The client type that the end customer will pay from
*/
client: WechatPay.Client | null;
}

namespace WechatPay {
type Client = 'android' | 'ios' | 'web';
}
}

type SetupFutureUsage = 'off_session' | 'on_session';
Expand Down Expand Up @@ -1013,6 +1093,11 @@ declare module 'stripe' {
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
*/
type: PaymentMethodData.Type;

/**
* If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
*/
wechat_pay?: PaymentMethodData.WechatPay;
}

namespace PaymentMethodData {
Expand Down Expand Up @@ -1304,7 +1389,10 @@ declare module 'stripe' {
| 'oxxo'
| 'p24'
| 'sepa_debit'
| 'sofort';
| 'sofort'
| 'wechat_pay';

interface WechatPay {}
}

interface PaymentMethodOptions {
Expand Down Expand Up @@ -1364,6 +1452,11 @@ declare module 'stripe' {
* If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
*/
sofort?: Stripe.Emptyable<PaymentMethodOptions.Sofort>;

/**
* If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
*/
wechat_pay?: Stripe.Emptyable<PaymentMethodOptions.WechatPay>;
}

namespace PaymentMethodOptions {
Expand Down Expand Up @@ -1567,6 +1660,22 @@ declare module 'stripe' {
| 'nl'
| 'pl';
}

interface WechatPay {
/**
* The app ID registered with WeChat Pay. Only required when client is ios or android.
*/
app_id?: string;

/**
* The client type that the end customer will pay from
*/
client: WechatPay.Client;
}

namespace WechatPay {
type Client = 'android' | 'ios' | 'web';
}
}

type SetupFutureUsage = 'off_session' | 'on_session';
Expand Down Expand Up @@ -1839,6 +1948,11 @@ declare module 'stripe' {
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
*/
type: PaymentMethodData.Type;

/**
* If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
*/
wechat_pay?: PaymentMethodData.WechatPay;
}

namespace PaymentMethodData {
Expand Down Expand Up @@ -2130,7 +2244,10 @@ declare module 'stripe' {
| 'oxxo'
| 'p24'
| 'sepa_debit'
| 'sofort';
| 'sofort'
| 'wechat_pay';

interface WechatPay {}
}

interface PaymentMethodOptions {
Expand Down Expand Up @@ -2190,6 +2307,11 @@ declare module 'stripe' {
* If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
*/
sofort?: Stripe.Emptyable<PaymentMethodOptions.Sofort>;

/**
* If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
*/
wechat_pay?: Stripe.Emptyable<PaymentMethodOptions.WechatPay>;
}

namespace PaymentMethodOptions {
Expand Down Expand Up @@ -2393,6 +2515,22 @@ declare module 'stripe' {
| 'nl'
| 'pl';
}

interface WechatPay {
/**
* The app ID registered with WeChat Pay. Only required when client is ios or android.
*/
app_id?: string;

/**
* The client type that the end customer will pay from
*/
client: WechatPay.Client;
}

namespace WechatPay {
type Client = 'android' | 'ios' | 'web';
}
}

type SetupFutureUsage = 'off_session' | 'on_session';
Expand Down Expand Up @@ -2779,6 +2917,11 @@ declare module 'stripe' {
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
*/
type: PaymentMethodData.Type;

/**
* If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
*/
wechat_pay?: PaymentMethodData.WechatPay;
}

namespace PaymentMethodData {
Expand Down Expand Up @@ -3070,7 +3213,10 @@ declare module 'stripe' {
| 'oxxo'
| 'p24'
| 'sepa_debit'
| 'sofort';
| 'sofort'
| 'wechat_pay';

interface WechatPay {}
}

interface PaymentMethodOptions {
Expand Down Expand Up @@ -3130,6 +3276,11 @@ declare module 'stripe' {
* If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
*/
sofort?: Stripe.Emptyable<PaymentMethodOptions.Sofort>;

/**
* If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
*/
wechat_pay?: Stripe.Emptyable<PaymentMethodOptions.WechatPay>;
}

namespace PaymentMethodOptions {
Expand Down Expand Up @@ -3333,6 +3484,22 @@ declare module 'stripe' {
| 'nl'
| 'pl';
}

interface WechatPay {
/**
* The app ID registered with WeChat Pay. Only required when client is ios or android.
*/
app_id?: string;

/**
* The client type that the end customer will pay from
*/
client: WechatPay.Client;
}

namespace WechatPay {
type Client = 'android' | 'ios' | 'web';
}
}

type SetupFutureUsage = 'off_session' | 'on_session';
Expand Down
Loading