FRE-600: Fix code review blockers

- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-25 00:08:01 -04:00
parent 65b552bb08
commit 7c684a42cc
48450 changed files with 5679671 additions and 383 deletions

View File

@@ -0,0 +1,61 @@
/**
* The BankAccount object.
*/
export interface BankAccount {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'bank_account';
/**
* The name of the person or business that owns the bank account.
*/
account_holder_name: string | null;
/**
* The type of entity that holds the account. This can be either `individual` or `company`.
*/
account_holder_type: string | null;
/**
* Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
*/
bank_name: string | null;
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
country: string;
/**
* Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
*/
currency: string;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* The last four digits of the bank account number.
*/
last4: string;
/**
* The routing transit number for the bank account.
*/
routing_number: string | null;
/**
* For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.
*
* For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.
*/
status: string;
}

View File

@@ -0,0 +1,61 @@
/**
* The BankAccount object.
*/
export interface BankAccount {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'bank_account';
/**
* The name of the person or business that owns the bank account.
*/
account_holder_name: string | null;
/**
* The type of entity that holds the account. This can be either `individual` or `company`.
*/
account_holder_type: string | null;
/**
* Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
*/
bank_name: string | null;
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
country: string;
/**
* Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
*/
currency: string;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* The last four digits of the bank account number.
*/
last4: string;
/**
* The routing transit number for the bank account.
*/
routing_number: string | null;
/**
* For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.
*
* For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.
*/
status: string;
}

130
node_modules/@stripe/stripe-js/dist/api/cards.d.mts generated vendored Normal file
View File

@@ -0,0 +1,130 @@
import {Metadata} from './shared';
/**
* The Card object.
*/
export interface Card {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'card';
/**
* City/District/Suburb/Town/Village.
*/
address_city: string | null;
/**
* Billing address country, if provided when creating card.
*/
address_country: string | null;
/**
* Address line 1 (Street address/PO Box/Company name).
*/
address_line1: string | null;
/**
* If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_line1_check: string | null;
/**
* Address line 2 (Apartment/Suite/Unit/Building).
*/
address_line2: string | null;
/**
* State/County/Province/Region.
*/
address_state: string | null;
/**
* ZIP or postal code.
*/
address_zip: string | null;
/**
* If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_zip_check: string | null;
/**
* Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
*/
brand: string;
/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
*/
country: string | null;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency?: string | null;
/**
* The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
*/
customer?: string | null;
/**
* If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
cvc_check: string | null;
/**
* (For tokenized numbers only.) The last four digits of the device account number.
*/
dynamic_last4: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example.
*/
fingerprint?: string | null;
/**
* Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
*/
funding: string;
/**
* The last four digits of the card.
*/
last4: string;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* Cardholder name.
*/
name: string | null;
/**
* If the card number is tokenized, this is the method that was used. Can be `apple_pay` or `google_pay`.
*/
tokenization_method: string | null;
}
export namespace Card {
export type AvailablePayoutMethod = 'instant' | 'standard';
}

130
node_modules/@stripe/stripe-js/dist/api/cards.d.ts generated vendored Normal file
View File

@@ -0,0 +1,130 @@
import {Metadata} from './shared';
/**
* The Card object.
*/
export interface Card {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'card';
/**
* City/District/Suburb/Town/Village.
*/
address_city: string | null;
/**
* Billing address country, if provided when creating card.
*/
address_country: string | null;
/**
* Address line 1 (Street address/PO Box/Company name).
*/
address_line1: string | null;
/**
* If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_line1_check: string | null;
/**
* Address line 2 (Apartment/Suite/Unit/Building).
*/
address_line2: string | null;
/**
* State/County/Province/Region.
*/
address_state: string | null;
/**
* ZIP or postal code.
*/
address_zip: string | null;
/**
* If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_zip_check: string | null;
/**
* Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
*/
brand: string;
/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
*/
country: string | null;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency?: string | null;
/**
* The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
*/
customer?: string | null;
/**
* If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
*/
cvc_check: string | null;
/**
* (For tokenized numbers only.) The last four digits of the device account number.
*/
dynamic_last4: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example.
*/
fingerprint?: string | null;
/**
* Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
*/
funding: string;
/**
* The last four digits of the card.
*/
last4: string;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
/**
* Cardholder name.
*/
name: string | null;
/**
* If the card number is tokenized, this is the method that was used. Can be `apple_pay` or `google_pay`.
*/
tokenization_method: string | null;
}
export namespace Card {
export type AvailablePayoutMethod = 'instant' | 'standard';
}

View File

@@ -0,0 +1,188 @@
import {StripeElements} from '../stripe-js';
import {Address} from './shared';
import {PaymentMethod, PaymentMethodCreateParams} from './payment-methods';
import {PaymentIntent} from './payment-intents';
/**
* The ConfirmationToken object.
*/
export interface ConfirmationToken {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'confirmation_token';
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used. Measured in seconds since the Unix epoch.
*/
expires_at: number;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
*/
payment_intent: null | string;
/**
* Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
*/
payment_method_preview: ConfirmationToken.PaymentMethodPreview;
/**
* The URL your customer is redirected to after they complete the payment.
*/
return_url: string | null;
/**
* Indicates that you intend to make future payments with this ConfirmationTokens payment method.
*
* The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntents Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
*
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
*/
setup_future_usage: PaymentIntent.SetupFutureUsage | null;
/**
* ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
*/
setup_intent: null | string;
/**
* Shipping information for this ConfirmationToken.
*/
shipping: PaymentIntent.Shipping | null;
/**
* Set to true when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
*/
use_stripe_sdk: boolean;
}
export interface ConfirmationTokenCreateParams {
/**
* Data used to create a new payment method.
*
*/
payment_method_data?: {
/**
* The customer's billing details.
*/
billing_details?: PaymentMethodCreateParams.BillingDetails;
/**
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
*/
allow_redisplay?: 'always' | 'limited' | 'unspecified';
};
/**
* Shipping information.
*/
shipping?: ConfirmationToken.Shipping;
/**
* The url your customer will be directed to after they complete authentication.
*/
return_url?: string | null;
}
export interface CreateConfirmationToken {
/**
* The Elements instance.
*
* @docs https://stripe.com/docs/js/elements_object
*/
elements: StripeElements;
/**
* Parameters for creating the ConfirmationToken.
* Details collected by Elements will be overriden by values passed here.
*/
params?: ConfirmationTokenCreateParams;
}
export namespace ConfirmationToken {
export interface Shipping {
/**
* Recipient address.
*/
address: Address;
/**
* Recipient name.
*/
name: string | null;
/**
* Recipient phone (including extension).
*/
phone?: string | null;
}
export interface PaymentMethodPreview {
/**
* The type of the PaymentMethod. An additional hash is included on payment_method_preview with a name matching this value. It contains additional information specific to the PaymentMethod type.
*/
type: string;
billing_details: PaymentMethod.BillingDetails;
acss_debit?: PaymentMethod.AcssDebit;
affirm?: PaymentMethod.Affirm;
afterpay_clearpay?: PaymentMethod.AfterpayClearpay;
au_becs_debit?: PaymentMethod.AuBecsDebit;
card?: PaymentMethod.Card;
card_present?: PaymentMethod.CardPresent;
eps?: PaymentMethod.Eps;
fpx?: PaymentMethod.Fpx;
grabpay?: PaymentMethod.GrabPay;
ideal?: PaymentMethod.Ideal;
p24?: PaymentMethod.P24;
sepa_debit?: PaymentMethod.SepaDebit;
us_bank_account?: PaymentMethod.UsBankAccount;
}
export interface MandateData {
customer_acceptance: {
type: 'online';
online?: {
/**
* The IP address from which the Mandate was accepted by the customer.
*/
ip_address: string;
/**
* The user agent of the browser from which the Mandate was accepted by the customer.
*/
user_agent: string;
};
};
}
}

View File

@@ -0,0 +1,188 @@
import {StripeElements} from '../stripe-js';
import {Address} from './shared';
import {PaymentMethod, PaymentMethodCreateParams} from './payment-methods';
import {PaymentIntent} from './payment-intents';
/**
* The ConfirmationToken object.
*/
export interface ConfirmationToken {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'confirmation_token';
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used. Measured in seconds since the Unix epoch.
*/
expires_at: number;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
*/
payment_intent: null | string;
/**
* Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
*/
payment_method_preview: ConfirmationToken.PaymentMethodPreview;
/**
* The URL your customer is redirected to after they complete the payment.
*/
return_url: string | null;
/**
* Indicates that you intend to make future payments with this ConfirmationTokens payment method.
*
* The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntents Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
*
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
*/
setup_future_usage: PaymentIntent.SetupFutureUsage | null;
/**
* ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
*/
setup_intent: null | string;
/**
* Shipping information for this ConfirmationToken.
*/
shipping: PaymentIntent.Shipping | null;
/**
* Set to true when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
*/
use_stripe_sdk: boolean;
}
export interface ConfirmationTokenCreateParams {
/**
* Data used to create a new payment method.
*
*/
payment_method_data?: {
/**
* The customer's billing details.
*/
billing_details?: PaymentMethodCreateParams.BillingDetails;
/**
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
*/
allow_redisplay?: 'always' | 'limited' | 'unspecified';
};
/**
* Shipping information.
*/
shipping?: ConfirmationToken.Shipping;
/**
* The url your customer will be directed to after they complete authentication.
*/
return_url?: string | null;
}
export interface CreateConfirmationToken {
/**
* The Elements instance.
*
* @docs https://stripe.com/docs/js/elements_object
*/
elements: StripeElements;
/**
* Parameters for creating the ConfirmationToken.
* Details collected by Elements will be overriden by values passed here.
*/
params?: ConfirmationTokenCreateParams;
}
export namespace ConfirmationToken {
export interface Shipping {
/**
* Recipient address.
*/
address: Address;
/**
* Recipient name.
*/
name: string | null;
/**
* Recipient phone (including extension).
*/
phone?: string | null;
}
export interface PaymentMethodPreview {
/**
* The type of the PaymentMethod. An additional hash is included on payment_method_preview with a name matching this value. It contains additional information specific to the PaymentMethod type.
*/
type: string;
billing_details: PaymentMethod.BillingDetails;
acss_debit?: PaymentMethod.AcssDebit;
affirm?: PaymentMethod.Affirm;
afterpay_clearpay?: PaymentMethod.AfterpayClearpay;
au_becs_debit?: PaymentMethod.AuBecsDebit;
card?: PaymentMethod.Card;
card_present?: PaymentMethod.CardPresent;
eps?: PaymentMethod.Eps;
fpx?: PaymentMethod.Fpx;
grabpay?: PaymentMethod.GrabPay;
ideal?: PaymentMethod.Ideal;
p24?: PaymentMethod.P24;
sepa_debit?: PaymentMethod.SepaDebit;
us_bank_account?: PaymentMethod.UsBankAccount;
}
export interface MandateData {
customer_acceptance: {
type: 'online';
online?: {
/**
* The IP address from which the Mandate was accepted by the customer.
*/
ip_address: string;
/**
* The user agent of the browser from which the Mandate was accepted by the customer.
*/
user_agent: string;
};
};
}
}

View File

@@ -0,0 +1,232 @@
type SupportedPaymentMethodType = 'us_bank_account' | 'link';
interface CommonBalance {
/**
* The time that the external institution calculated this balance. Measured
* in seconds since the Unix epoch.
*/
as_of: number;
/**
* The balances owed to (or by) the account holder.
*
* Each key is a three-letter ISO currency code, in lowercase.
*
* Each value is a integer amount. A positive amount indicates money owed to
* the account holder. A negative amount indicates money owed by the account
* holder.
*/
current: {
[key: string]: number | undefined;
};
}
interface CashBalance {
/**
* Information on a `cash` balance. Only set if `balance.type` is `cash`.
*/
cash: {
/**
* The funds available to the account holder. Typically this is the
* current balance less any holds.
*
* Each key is a three-letter ISO currency code, in lowercase.
*
* Each value is a integer amount. A positive amount indicates money owed
* to the account holder. A negative amount indicates money owed by the
* account holder.
*/
available: {[key: string]: number | undefined};
};
type: 'cash';
}
interface CreditBalance {
/**
* Information on a `credit` balance. Only set if `balance.type` is `credit`.
*/
credit: {
/**
* The credit that has been used by the account holder.
*
* Each key is a three-letter ISO currency code, in lowercase
*
* Each value is a integer amount. A positive amount indicates money owed
* to the account holder. A negative amount indicates money owed by the
* account holder.
*/
used: {[key: string]: number | undefined};
};
type: 'credit';
}
type Balance = (CommonBalance & CashBalance) | (CommonBalance & CreditBalance);
interface BalanceRefresh {
/**
* The status of the Balance Refresh
*/
status: 'pending' | 'succeeded' | 'failed';
/**
* Time at which the Balance Refresh was attempted. Measured in seconds since the Unix epoch.
*/
last_attempted_at: number;
}
interface OwnershipRefresh {
/**
* The status of the Ownership Refresh
*/
status: 'pending' | 'succeeded' | 'failed';
/**
* Time at which the Ownersip Refresh was attempted. Measured in seconds since the Unix epoch.
*/
last_attempted_at: number;
}
/**
* The Financial Connections Session object
*/
export interface FinancialConnectionsSession {
/**
* Unique identifier for the object.
*/
id: string;
/**
* List of accounts collected by the Session
*/
accounts: FinancialConnectionsSession.Account[];
/**
* Filters applied to the Session
*/
filters?: FinancialConnectionsSession.Filters;
/**
* List of data permissions requested in the Session
*/
permissions?: FinancialConnectionsSession.Permission[];
/**
* For webview integrations only. The user will be redirected to this URL to return to your app.
*/
return_url?: string;
}
export namespace FinancialConnectionsSession {
/**
* The Financial Connections Account object
*/
export interface Account {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. `'linked_account'` is present for backwards-compatibility.
*/
object: 'linked_account' | 'financial_connections.account';
/**
* The balance for this Account
*/
balance: null | Balance;
/**
* The most recent Balance Refresh for this Account
*/
balance_refresh: null | BalanceRefresh;
/**
* The type of the account.
*/
category: 'cash' | 'credit' | 'investment' | 'other';
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* A human-readable name that has been assigned to this account, either by the account holder or by the institution.
*/
display_name: string;
/**
* The name of the institution that holds this account.
*/
institution_name: string;
/**
* The last 4 digits of the account number. If present, this will be 4 numeric characters.
*/
last4: string | null;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* The ID of this account's Ownership resource.
*/
ownership: string | null;
/**
* The most recent Ownership Refresh for this Account
*/
ownership_refresh: null | OwnershipRefresh;
/**
* Permissions granted on this Account
*/
permissions: Permission[];
/**
* The status of the Account
*/
status: 'active' | 'inactive' | 'disconnected';
/**
* The sub-category of the Account
*/
subcategory:
| 'checking'
| 'savings'
| 'mortgage'
| 'line_of_credit'
| 'credit_card'
| 'other';
/**
* The types of Payment Methods which can be set up by this Account
*/
supported_payment_method_types: SupportedPaymentMethodType[];
}
/**
* Filters to restrict the kinds of accounts to collect.
*/
export interface Filters {
/**
* List of countries from which to collect accounts.
*/
countries?: string[];
}
/**
* Data features to which access can be requested
*/
export type Permission =
| 'payment_method'
| 'balances'
| 'transactions'
| 'ownership'
| 'account_numbers';
}

View File

@@ -0,0 +1,232 @@
type SupportedPaymentMethodType = 'us_bank_account' | 'link';
interface CommonBalance {
/**
* The time that the external institution calculated this balance. Measured
* in seconds since the Unix epoch.
*/
as_of: number;
/**
* The balances owed to (or by) the account holder.
*
* Each key is a three-letter ISO currency code, in lowercase.
*
* Each value is a integer amount. A positive amount indicates money owed to
* the account holder. A negative amount indicates money owed by the account
* holder.
*/
current: {
[key: string]: number | undefined;
};
}
interface CashBalance {
/**
* Information on a `cash` balance. Only set if `balance.type` is `cash`.
*/
cash: {
/**
* The funds available to the account holder. Typically this is the
* current balance less any holds.
*
* Each key is a three-letter ISO currency code, in lowercase.
*
* Each value is a integer amount. A positive amount indicates money owed
* to the account holder. A negative amount indicates money owed by the
* account holder.
*/
available: {[key: string]: number | undefined};
};
type: 'cash';
}
interface CreditBalance {
/**
* Information on a `credit` balance. Only set if `balance.type` is `credit`.
*/
credit: {
/**
* The credit that has been used by the account holder.
*
* Each key is a three-letter ISO currency code, in lowercase
*
* Each value is a integer amount. A positive amount indicates money owed
* to the account holder. A negative amount indicates money owed by the
* account holder.
*/
used: {[key: string]: number | undefined};
};
type: 'credit';
}
type Balance = (CommonBalance & CashBalance) | (CommonBalance & CreditBalance);
interface BalanceRefresh {
/**
* The status of the Balance Refresh
*/
status: 'pending' | 'succeeded' | 'failed';
/**
* Time at which the Balance Refresh was attempted. Measured in seconds since the Unix epoch.
*/
last_attempted_at: number;
}
interface OwnershipRefresh {
/**
* The status of the Ownership Refresh
*/
status: 'pending' | 'succeeded' | 'failed';
/**
* Time at which the Ownersip Refresh was attempted. Measured in seconds since the Unix epoch.
*/
last_attempted_at: number;
}
/**
* The Financial Connections Session object
*/
export interface FinancialConnectionsSession {
/**
* Unique identifier for the object.
*/
id: string;
/**
* List of accounts collected by the Session
*/
accounts: FinancialConnectionsSession.Account[];
/**
* Filters applied to the Session
*/
filters?: FinancialConnectionsSession.Filters;
/**
* List of data permissions requested in the Session
*/
permissions?: FinancialConnectionsSession.Permission[];
/**
* For webview integrations only. The user will be redirected to this URL to return to your app.
*/
return_url?: string;
}
export namespace FinancialConnectionsSession {
/**
* The Financial Connections Account object
*/
export interface Account {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. `'linked_account'` is present for backwards-compatibility.
*/
object: 'linked_account' | 'financial_connections.account';
/**
* The balance for this Account
*/
balance: null | Balance;
/**
* The most recent Balance Refresh for this Account
*/
balance_refresh: null | BalanceRefresh;
/**
* The type of the account.
*/
category: 'cash' | 'credit' | 'investment' | 'other';
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* A human-readable name that has been assigned to this account, either by the account holder or by the institution.
*/
display_name: string;
/**
* The name of the institution that holds this account.
*/
institution_name: string;
/**
* The last 4 digits of the account number. If present, this will be 4 numeric characters.
*/
last4: string | null;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* The ID of this account's Ownership resource.
*/
ownership: string | null;
/**
* The most recent Ownership Refresh for this Account
*/
ownership_refresh: null | OwnershipRefresh;
/**
* Permissions granted on this Account
*/
permissions: Permission[];
/**
* The status of the Account
*/
status: 'active' | 'inactive' | 'disconnected';
/**
* The sub-category of the Account
*/
subcategory:
| 'checking'
| 'savings'
| 'mortgage'
| 'line_of_credit'
| 'credit_card'
| 'other';
/**
* The types of Payment Methods which can be set up by this Account
*/
supported_payment_method_types: SupportedPaymentMethodType[];
}
/**
* Filters to restrict the kinds of accounts to collect.
*/
export interface Filters {
/**
* List of countries from which to collect accounts.
*/
countries?: string[];
}
/**
* Data features to which access can be requested
*/
export type Permission =
| 'payment_method'
| 'balances'
| 'transactions'
| 'ownership'
| 'account_numbers';
}

12
node_modules/@stripe/stripe-js/dist/api/index.d.mts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export * from './shared';
export * from './payment-methods';
export * from './confirmation-tokens';
export * from './payment-intents';
export * from './orders';
export * from './setup-intents';
export * from './sources';
export * from './tokens';
export * from './bank-accounts';
export * from './cards';
export * from './verification-sessions';
export * from './financial-connections';

12
node_modules/@stripe/stripe-js/dist/api/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export * from './shared';
export * from './payment-methods';
export * from './confirmation-tokens';
export * from './payment-intents';
export * from './orders';
export * from './setup-intents';
export * from './sources';
export * from './tokens';
export * from './bank-accounts';
export * from './cards';
export * from './verification-sessions';
export * from './financial-connections';

122
node_modules/@stripe/stripe-js/dist/api/orders.d.mts generated vendored Normal file
View File

@@ -0,0 +1,122 @@
import {Address} from './shared';
import {PaymentIntent} from './payment-intents';
/**
* The Order object.
*/
export interface Order {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'order';
/**
* Total order cost after discounts and taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
*/
amount_total: number;
/**
* Order cost before any discounts or taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
*/
amount_subtotal: number;
/**
* Customer billing details associated with the order.
*/
billing_details: Order.Billing | null;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* Customer shipping information associated with the order.
*/
shipping_details: Order.Shipping | null;
/**
* Payment information associated with the order.
*/
payment: Order.Payment;
/**
* The overall status of the order.
*/
status: Order.Status;
}
export namespace Order {
export interface Billing {
/**
* Billing address for the order.
*/
address?: Address;
/**
* Email address for the order.
*/
email?: string | null;
/**
* Full name for the order.
*/
name?: string | null;
/**
* Billing phone number for the order (including extension).
*/
phone?: string | null;
}
export interface Shipping {
/**
* Recipient shipping address. Required if the order includes products that are shippable.
*/
address?: Address;
/**
* Recipient name.
*/
name?: string | null;
/**
* Recipient phone (including extension).
*/
phone?: string | null;
}
export interface Payment {
/**
* Payment intent associated with this order. Null when the order is `open`.
*/
payment_intent?: PaymentIntent | null;
/**
* The status of the underlying payment associated with this order, if any. Null when the order is `open`.
*/
status?: PaymentIntent.Status | null;
}
export type Status =
| 'open'
| 'submitted'
| 'processing'
| 'complete'
| 'canceled';
}

122
node_modules/@stripe/stripe-js/dist/api/orders.d.ts generated vendored Normal file
View File

@@ -0,0 +1,122 @@
import {Address} from './shared';
import {PaymentIntent} from './payment-intents';
/**
* The Order object.
*/
export interface Order {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'order';
/**
* Total order cost after discounts and taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
*/
amount_total: number;
/**
* Order cost before any discounts or taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
*/
amount_subtotal: number;
/**
* Customer billing details associated with the order.
*/
billing_details: Order.Billing | null;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* Customer shipping information associated with the order.
*/
shipping_details: Order.Shipping | null;
/**
* Payment information associated with the order.
*/
payment: Order.Payment;
/**
* The overall status of the order.
*/
status: Order.Status;
}
export namespace Order {
export interface Billing {
/**
* Billing address for the order.
*/
address?: Address;
/**
* Email address for the order.
*/
email?: string | null;
/**
* Full name for the order.
*/
name?: string | null;
/**
* Billing phone number for the order (including extension).
*/
phone?: string | null;
}
export interface Shipping {
/**
* Recipient shipping address. Required if the order includes products that are shippable.
*/
address?: Address;
/**
* Recipient name.
*/
name?: string | null;
/**
* Recipient phone (including extension).
*/
phone?: string | null;
}
export interface Payment {
/**
* Payment intent associated with this order. Null when the order is `open`.
*/
payment_intent?: PaymentIntent | null;
/**
* The status of the underlying payment associated with this order, if any. Null when the order is `open`.
*/
status?: PaymentIntent.Status | null;
}
export type Status =
| 'open'
| 'submitted'
| 'processing'
| 'complete'
| 'canceled';
}

View File

@@ -0,0 +1,360 @@
import {Address, AddressParam} from './shared';
import {PaymentMethod} from './payment-methods';
/**
* The PaymentIntent object.
*/
export interface PaymentIntent {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'payment_intent';
/**
* Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
*/
amount: number;
/**
* Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
*/
canceled_at: number | null;
/**
* Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).
*/
cancellation_reason: PaymentIntent.CancellationReason | null;
/**
* Controls when the funds will be captured from the customer's account.
*/
capture_method: PaymentIntent.CaptureMethod;
/**
* The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
*
* The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
*
* Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment) and learn about how `client_secret` should be handled.
*/
client_secret: string | null;
confirmation_method: PaymentIntent.ConfirmationMethod;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
*/
last_payment_error: PaymentIntent.LastPaymentError | null;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
*/
next_action: PaymentIntent.NextAction | null;
/**
* ID of the payment method used in this PaymentIntent, or the PaymentMethod itself if this field is expanded.
*/
payment_method: string | null | PaymentMethod;
/**
* The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
*/
payment_method_types: Array<string>;
/**
* Email address that the receipt for the resulting payment will be sent to.
*/
receipt_email: string | null;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If present, the payment method used with this PaymentIntent can be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer, even after the transaction completes.
*
* For more, learn to [save card details after a payment](https://stripe.com/docs/payments/save-after-payment).
*
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
*/
setup_future_usage: PaymentIntent.SetupFutureUsage | null;
/**
* Shipping information for this PaymentIntent.
*/
shipping: PaymentIntent.Shipping | null;
/**
* Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
*/
status: PaymentIntent.Status;
}
export namespace PaymentIntent {
export type CancellationReason =
| 'abandoned'
| 'automatic'
| 'duplicate'
| 'failed_invoice'
| 'fraudulent'
| 'requested_by_customer'
| 'void_invoice';
export type CaptureMethod = 'automatic' | 'manual';
export type ConfirmationMethod = 'automatic' | 'manual';
export interface LastPaymentError {
/**
* For card errors, the ID of the failed charge.
*/
charge?: string;
/**
* For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
*/
code?: string;
/**
* For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
*/
decline_code?: string;
/**
* A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
*/
doc_url?: string;
/**
* A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
*/
message?: string;
/**
* If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
*/
param?: string;
payment_method?: PaymentMethod;
/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
*/
type: LastPaymentError.Type;
}
export namespace LastPaymentError {
export type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
}
export interface NextAction {
/**
* Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `wechat_pay_display_qr_code`, or `verify_with_microdeposits`.
*/
type: string;
/**
* Contains instructions for authenticating a payment by redirecting your customer to another page or application.
*/
redirect_to_url?: NextAction.RedirectToUrl;
/**
* When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
*/
use_stripe_sdk?: NextAction.UseStripeSdk;
/**
* Wechat Pay display qrcode
*/
wechat_pay_display_qr_code?: NextAction.WechatPayDisplayQrCode;
/**
* Contains details describing microdeposits verification flow.
*/
verify_with_microdeposits?: NextAction.VerifyWithMicrodeposits;
}
export namespace NextAction {
export interface RedirectToUrl {
/**
* If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
*/
return_url: string | null;
/**
* The URL you must redirect your customer to in order to authenticate the payment.
*/
url: string | null;
}
export interface WechatPayDisplayQrCode {
/**
* Render and display `paymentIntent.next_action.wechat_pay_display_qr_code.data` as a QR code on your checkout page.
*/
data: string;
/**
* Use `paymentIntent.next_action.wechat_pay_display_qr_code.image_data_url` as an image source.
*/
image_data_url: string;
}
export interface UseStripeSdk {}
export interface VerifyWithMicrodeposits {
/**
* The timestamp when the microdeposits are expected to land.
*/
arrival_date: number;
/**
* The URL for the hosted verification page, which allows customers to verify their bank account.
*/
hosted_verification_url: string;
/**
* The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
*/
microdeposit_type: string | null;
}
}
export type SetupFutureUsage = 'off_session' | 'on_session';
export interface Shipping {
address?: Address;
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
carrier?: string | null;
/**
* Recipient name.
*/
name?: string | null;
/**
* Recipient phone (including extension).
*/
phone?: string | null;
/**
* The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
*/
tracking_number?: string | null;
}
export type Status =
| 'canceled'
| 'processing'
| 'requires_action'
| 'requires_capture'
| 'requires_confirmation'
| 'requires_payment_method'
| 'succeeded';
}
export interface PaymentIntentConfirmParams {
/**
* This hash contains details about the Mandate to create
*/
mandate_data?: {[k: string]: any};
/**
* Email address that the receipt for the resulting payment will be sent to.
*/
receipt_email?: string | '';
/**
* The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
* If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
* This parameter is only used for cards and other redirect-based payment methods.
*/
return_url?: string;
/**
* If the PaymentIntent has a `payment_method` and a `customer` or if you're attaching a payment method to the PaymentIntent in this request, you can pass `save_payment_method=true` to save the payment method to the customer. Defaults to `false`.
*
* If the payment method is already saved to a customer, this does nothing. If this type of payment method cannot be saved to a customer, the request will error.
*
* _Note that saving a payment method using this parameter does not guarantee that the payment method can be charged._ To ensure that only payment methods which can be charged are saved to a customer, you can [manually save](https://stripe.com/docs/api/customers/create#create_customer-source) the payment method in response to the [`payment_intent.succeeded` webhook](https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded).
*/
save_payment_method?: boolean;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If present, the payment method used with this PaymentIntent can be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer, even after the transaction completes.
*
* Use `on_session` if you intend to only reuse the payment method when your customer is present in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow.
*
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
*
* If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
*/
setup_future_usage?: PaymentIntentConfirmParams.SetupFutureUsage | null;
/**
* Shipping information for this PaymentIntent.
*/
shipping?: PaymentIntentConfirmParams.Shipping | null;
}
export namespace PaymentIntentConfirmParams {
export type SetupFutureUsage = 'off_session' | 'on_session';
export interface Shipping {
/**
* Shipping address.
*/
address: AddressParam;
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
carrier?: string;
/**
* Recipient name.
*/
name: string;
/**
* Recipient phone (including extension).
*/
phone?: string;
/**
* The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
*/
tracking_number?: string;
}
}

View File

@@ -0,0 +1,360 @@
import {Address, AddressParam} from './shared';
import {PaymentMethod} from './payment-methods';
/**
* The PaymentIntent object.
*/
export interface PaymentIntent {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'payment_intent';
/**
* Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
*/
amount: number;
/**
* Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
*/
canceled_at: number | null;
/**
* Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).
*/
cancellation_reason: PaymentIntent.CancellationReason | null;
/**
* Controls when the funds will be captured from the customer's account.
*/
capture_method: PaymentIntent.CaptureMethod;
/**
* The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
*
* The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
*
* Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment) and learn about how `client_secret` should be handled.
*/
client_secret: string | null;
confirmation_method: PaymentIntent.ConfirmationMethod;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
*/
last_payment_error: PaymentIntent.LastPaymentError | null;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
*/
next_action: PaymentIntent.NextAction | null;
/**
* ID of the payment method used in this PaymentIntent, or the PaymentMethod itself if this field is expanded.
*/
payment_method: string | null | PaymentMethod;
/**
* The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
*/
payment_method_types: Array<string>;
/**
* Email address that the receipt for the resulting payment will be sent to.
*/
receipt_email: string | null;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If present, the payment method used with this PaymentIntent can be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer, even after the transaction completes.
*
* For more, learn to [save card details after a payment](https://stripe.com/docs/payments/save-after-payment).
*
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
*/
setup_future_usage: PaymentIntent.SetupFutureUsage | null;
/**
* Shipping information for this PaymentIntent.
*/
shipping: PaymentIntent.Shipping | null;
/**
* Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
*/
status: PaymentIntent.Status;
}
export namespace PaymentIntent {
export type CancellationReason =
| 'abandoned'
| 'automatic'
| 'duplicate'
| 'failed_invoice'
| 'fraudulent'
| 'requested_by_customer'
| 'void_invoice';
export type CaptureMethod = 'automatic' | 'manual';
export type ConfirmationMethod = 'automatic' | 'manual';
export interface LastPaymentError {
/**
* For card errors, the ID of the failed charge.
*/
charge?: string;
/**
* For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
*/
code?: string;
/**
* For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
*/
decline_code?: string;
/**
* A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
*/
doc_url?: string;
/**
* A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
*/
message?: string;
/**
* If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
*/
param?: string;
payment_method?: PaymentMethod;
/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
*/
type: LastPaymentError.Type;
}
export namespace LastPaymentError {
export type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
}
export interface NextAction {
/**
* Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `wechat_pay_display_qr_code`, or `verify_with_microdeposits`.
*/
type: string;
/**
* Contains instructions for authenticating a payment by redirecting your customer to another page or application.
*/
redirect_to_url?: NextAction.RedirectToUrl;
/**
* When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
*/
use_stripe_sdk?: NextAction.UseStripeSdk;
/**
* Wechat Pay display qrcode
*/
wechat_pay_display_qr_code?: NextAction.WechatPayDisplayQrCode;
/**
* Contains details describing microdeposits verification flow.
*/
verify_with_microdeposits?: NextAction.VerifyWithMicrodeposits;
}
export namespace NextAction {
export interface RedirectToUrl {
/**
* If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
*/
return_url: string | null;
/**
* The URL you must redirect your customer to in order to authenticate the payment.
*/
url: string | null;
}
export interface WechatPayDisplayQrCode {
/**
* Render and display `paymentIntent.next_action.wechat_pay_display_qr_code.data` as a QR code on your checkout page.
*/
data: string;
/**
* Use `paymentIntent.next_action.wechat_pay_display_qr_code.image_data_url` as an image source.
*/
image_data_url: string;
}
export interface UseStripeSdk {}
export interface VerifyWithMicrodeposits {
/**
* The timestamp when the microdeposits are expected to land.
*/
arrival_date: number;
/**
* The URL for the hosted verification page, which allows customers to verify their bank account.
*/
hosted_verification_url: string;
/**
* The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
*/
microdeposit_type: string | null;
}
}
export type SetupFutureUsage = 'off_session' | 'on_session';
export interface Shipping {
address?: Address;
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
carrier?: string | null;
/**
* Recipient name.
*/
name?: string | null;
/**
* Recipient phone (including extension).
*/
phone?: string | null;
/**
* The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
*/
tracking_number?: string | null;
}
export type Status =
| 'canceled'
| 'processing'
| 'requires_action'
| 'requires_capture'
| 'requires_confirmation'
| 'requires_payment_method'
| 'succeeded';
}
export interface PaymentIntentConfirmParams {
/**
* This hash contains details about the Mandate to create
*/
mandate_data?: {[k: string]: any};
/**
* Email address that the receipt for the resulting payment will be sent to.
*/
receipt_email?: string | '';
/**
* The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
* If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
* This parameter is only used for cards and other redirect-based payment methods.
*/
return_url?: string;
/**
* If the PaymentIntent has a `payment_method` and a `customer` or if you're attaching a payment method to the PaymentIntent in this request, you can pass `save_payment_method=true` to save the payment method to the customer. Defaults to `false`.
*
* If the payment method is already saved to a customer, this does nothing. If this type of payment method cannot be saved to a customer, the request will error.
*
* _Note that saving a payment method using this parameter does not guarantee that the payment method can be charged._ To ensure that only payment methods which can be charged are saved to a customer, you can [manually save](https://stripe.com/docs/api/customers/create#create_customer-source) the payment method in response to the [`payment_intent.succeeded` webhook](https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded).
*/
save_payment_method?: boolean;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If present, the payment method used with this PaymentIntent can be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer, even after the transaction completes.
*
* Use `on_session` if you intend to only reuse the payment method when your customer is present in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow.
*
* Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
*
* If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
*/
setup_future_usage?: PaymentIntentConfirmParams.SetupFutureUsage | null;
/**
* Shipping information for this PaymentIntent.
*/
shipping?: PaymentIntentConfirmParams.Shipping | null;
}
export namespace PaymentIntentConfirmParams {
export type SetupFutureUsage = 'off_session' | 'on_session';
export interface Shipping {
/**
* Shipping address.
*/
address: AddressParam;
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
carrier?: string;
/**
* Recipient name.
*/
name: string;
/**
* Recipient phone (including extension).
*/
phone?: string;
/**
* The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
*/
tracking_number?: string;
}
}

View File

@@ -0,0 +1,467 @@
import {StripeElement, StripeElements} from '../stripe-js';
import {Metadata, MetadataParam, Address} from './shared';
/**
* The PaymentMethod object.
*/
export interface PaymentMethod {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'payment_method';
billing_details: PaymentMethod.BillingDetails;
card?: PaymentMethod.Card;
card_present?: PaymentMethod.CardPresent;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
*/
customer: string | null;
eps?: PaymentMethod.Eps;
fpx?: PaymentMethod.Fpx;
grabpay?: PaymentMethod.GrabPay;
ideal?: PaymentMethod.Ideal;
p24?: PaymentMethod.P24;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
sepa_debit?: PaymentMethod.SepaDebit;
/**
* 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: string;
affirm?: PaymentMethod.Affirm;
afterpay_clearpay?: PaymentMethod.AfterpayClearpay;
acss_debit?: PaymentMethod.AcssDebit;
au_becs_debit?: PaymentMethod.AuBecsDebit;
us_bank_account?: PaymentMethod.UsBankAccount;
}
export namespace PaymentMethod {
export interface AuBecsDebit {
/**
* Bank State Branch
*/
bsb_number: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four characters of the account number.
*/
last4: string | null;
}
export interface BillingDetails {
/**
* Billing address.
*/
address: Address | null;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
/**
* Billing phone number (including extension).
*/
phone: string | null;
}
export interface Card {
/**
* Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
brand: string;
/**
* Checks on Card address and CVC if provided.
*/
checks: Card.Checks | null;
/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
*/
country: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number.
*/
fingerprint?: string | null;
/**
* Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
*/
funding: string;
/**
* The last four digits of the card.
*/
last4: string;
/**
* Contains information about card networks that can be used to process the payment.
*/
networks: {
/**
* The preferred network for co-branded cards.
*/
preferred: string | null;
/**
* All available networks for the card.
*/
available: string[];
} | null;
/**
* Contains details on how this Card maybe be used for 3D Secure authentication.
*/
three_d_secure_usage: Card.ThreeDSecureUsage | null;
/**
* If this Card is part of a card wallet, this contains the details of the card wallet.
*/
wallet: null | {[k: string]: any};
}
export namespace Card {
export interface Checks {
/**
* If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_line1_check: string | null;
/**
* If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_postal_code_check: string | null;
/**
* If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
*/
cvc_check: string | null;
}
export interface ThreeDSecureUsage {
/**
* Whether 3D Secure is supported on this card.
*/
supported: boolean;
}
}
export interface CardPresent {}
export interface Eps {
/**
* The customer's bank.
*/
bank: string;
}
export interface Fpx {
/**
* The customer's bank.
*/
bank: string;
}
export interface GrabPay {}
export interface Ideal {
/**
* The customer's bank, if provided.
*/
bank: string | null;
/**
* The Bank Identifier Code of the customer's bank, if the bank was provided.
*/
bic: string | null;
}
export interface P24 {
/**
* The customer's bank.
*/
bank: string;
}
export interface SepaDebit {
/**
* Bank code of bank associated with the bank account.
*/
bank_code: string | null;
/**
* Branch code of bank associated with the bank account.
*/
branch_code: string | null;
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
country: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four characters of the IBAN.
*/
last4: string | null;
}
export interface Affirm {}
export interface AfterpayClearpay {}
export interface AcssDebit {
/**
* Customers bank account number.
*/
account_number: string;
/**
* Institution number of the customers bank.
*/
institution_number: string;
/**
* Transit number of the customers bank.
*/
transit_number: string;
}
export interface UsBankAccount {
/**
* Customers bank account number.
*/
account_number: string;
/**
* The routing transit number for the bank account.
*/
routing_number: string;
/**
* The type of entity that holds the account. This can be either `individual` or `company`.
*/
account_holder_type: string;
/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type: string;
/**
* The name of the bank.
*/
bank_name: string;
/**
* The ID of the Financial Connections Account used to create the payment method.
*/
financial_connections_account: string;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string;
/**
* Last four digits of the bank account number.
*/
last4: string;
/**
* Contains information about US bank account networks that can be used.
*/
networks: {
/**
* The preferred network.
*/
preferred: string;
/**
* All supported networks.
*/
supported: string[];
};
}
}
export interface PaymentMethodCreateParams {
/**
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
*/
billing_details?: PaymentMethodCreateParams.BillingDetails;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
/**
* The PaymentMethod to share.
*/
payment_method?: string;
/**
* 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. Required unless `payment_method` is specified (see the [Cloning PaymentMethods](https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods) guide)
*/
type?: string;
}
export interface CreatePaymentMethodFromElements {
/**
* The Elements instance
*
* @docs https://stripe.com/docs/js/elements_object
*/
elements: StripeElements;
/**
* Parameters that will be passed on to the PaymentMethod API
*
* @docs https://stripe.com/docs/api/payment_methods/create
*/
params?: PaymentMethodCreateParams;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
}
export interface CreatePaymentMethodFromElement {
/**
* The specific Element used to collect payment details
*
* @docs https://stripe.com/docs/js/element
*/
element: StripeElement;
/**
* Parameters that will be passed on to the PaymentMethod API
*
* @docs https://stripe.com/docs/api/payment_methods/create
*/
params?: PaymentMethodCreateParams;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
}
export namespace PaymentMethodCreateParams {
export interface BillingDetails {
/**
* Billing address.
*/
address?: BillingDetails.Address;
/**
* Email address.
*/
email?: string | null;
/**
* Full name.
*/
name?: string | null;
/**
* Billing phone number (including extension).
*/
phone?: string | null;
}
export namespace BillingDetails {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string | null;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string | null;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string | null;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string | null;
/**
* ZIP or postal code.
*/
postal_code?: string | null;
/**
* State, county, province, or region.
*/
state?: string | null;
}
}
}

View File

@@ -0,0 +1,467 @@
import {StripeElement, StripeElements} from '../stripe-js';
import {Metadata, MetadataParam, Address} from './shared';
/**
* The PaymentMethod object.
*/
export interface PaymentMethod {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'payment_method';
billing_details: PaymentMethod.BillingDetails;
card?: PaymentMethod.Card;
card_present?: PaymentMethod.CardPresent;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
*/
customer: string | null;
eps?: PaymentMethod.Eps;
fpx?: PaymentMethod.Fpx;
grabpay?: PaymentMethod.GrabPay;
ideal?: PaymentMethod.Ideal;
p24?: PaymentMethod.P24;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata: Metadata;
sepa_debit?: PaymentMethod.SepaDebit;
/**
* 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: string;
affirm?: PaymentMethod.Affirm;
afterpay_clearpay?: PaymentMethod.AfterpayClearpay;
acss_debit?: PaymentMethod.AcssDebit;
au_becs_debit?: PaymentMethod.AuBecsDebit;
us_bank_account?: PaymentMethod.UsBankAccount;
}
export namespace PaymentMethod {
export interface AuBecsDebit {
/**
* Bank State Branch
*/
bsb_number: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four characters of the account number.
*/
last4: string | null;
}
export interface BillingDetails {
/**
* Billing address.
*/
address: Address | null;
/**
* Email address.
*/
email: string | null;
/**
* Full name.
*/
name: string | null;
/**
* Billing phone number (including extension).
*/
phone: string | null;
}
export interface Card {
/**
* Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
brand: string;
/**
* Checks on Card address and CVC if provided.
*/
checks: Card.Checks | null;
/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
*/
country: string | null;
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
/**
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number.
*/
fingerprint?: string | null;
/**
* Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
*/
funding: string;
/**
* The last four digits of the card.
*/
last4: string;
/**
* Contains information about card networks that can be used to process the payment.
*/
networks: {
/**
* The preferred network for co-branded cards.
*/
preferred: string | null;
/**
* All available networks for the card.
*/
available: string[];
} | null;
/**
* Contains details on how this Card maybe be used for 3D Secure authentication.
*/
three_d_secure_usage: Card.ThreeDSecureUsage | null;
/**
* If this Card is part of a card wallet, this contains the details of the card wallet.
*/
wallet: null | {[k: string]: any};
}
export namespace Card {
export interface Checks {
/**
* If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_line1_check: string | null;
/**
* If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
*/
address_postal_code_check: string | null;
/**
* If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
*/
cvc_check: string | null;
}
export interface ThreeDSecureUsage {
/**
* Whether 3D Secure is supported on this card.
*/
supported: boolean;
}
}
export interface CardPresent {}
export interface Eps {
/**
* The customer's bank.
*/
bank: string;
}
export interface Fpx {
/**
* The customer's bank.
*/
bank: string;
}
export interface GrabPay {}
export interface Ideal {
/**
* The customer's bank, if provided.
*/
bank: string | null;
/**
* The Bank Identifier Code of the customer's bank, if the bank was provided.
*/
bic: string | null;
}
export interface P24 {
/**
* The customer's bank.
*/
bank: string;
}
export interface SepaDebit {
/**
* Bank code of bank associated with the bank account.
*/
bank_code: string | null;
/**
* Branch code of bank associated with the bank account.
*/
branch_code: string | null;
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
country: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four characters of the IBAN.
*/
last4: string | null;
}
export interface Affirm {}
export interface AfterpayClearpay {}
export interface AcssDebit {
/**
* Customers bank account number.
*/
account_number: string;
/**
* Institution number of the customers bank.
*/
institution_number: string;
/**
* Transit number of the customers bank.
*/
transit_number: string;
}
export interface UsBankAccount {
/**
* Customers bank account number.
*/
account_number: string;
/**
* The routing transit number for the bank account.
*/
routing_number: string;
/**
* The type of entity that holds the account. This can be either `individual` or `company`.
*/
account_holder_type: string;
/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type: string;
/**
* The name of the bank.
*/
bank_name: string;
/**
* The ID of the Financial Connections Account used to create the payment method.
*/
financial_connections_account: string;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string;
/**
* Last four digits of the bank account number.
*/
last4: string;
/**
* Contains information about US bank account networks that can be used.
*/
networks: {
/**
* The preferred network.
*/
preferred: string;
/**
* All supported networks.
*/
supported: string[];
};
}
}
export interface PaymentMethodCreateParams {
/**
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
*/
billing_details?: PaymentMethodCreateParams.BillingDetails;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
/**
* The PaymentMethod to share.
*/
payment_method?: string;
/**
* 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. Required unless `payment_method` is specified (see the [Cloning PaymentMethods](https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods) guide)
*/
type?: string;
}
export interface CreatePaymentMethodFromElements {
/**
* The Elements instance
*
* @docs https://stripe.com/docs/js/elements_object
*/
elements: StripeElements;
/**
* Parameters that will be passed on to the PaymentMethod API
*
* @docs https://stripe.com/docs/api/payment_methods/create
*/
params?: PaymentMethodCreateParams;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
}
export interface CreatePaymentMethodFromElement {
/**
* The specific Element used to collect payment details
*
* @docs https://stripe.com/docs/js/element
*/
element: StripeElement;
/**
* Parameters that will be passed on to the PaymentMethod API
*
* @docs https://stripe.com/docs/api/payment_methods/create
*/
params?: PaymentMethodCreateParams;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
}
export namespace PaymentMethodCreateParams {
export interface BillingDetails {
/**
* Billing address.
*/
address?: BillingDetails.Address;
/**
* Email address.
*/
email?: string | null;
/**
* Full name.
*/
name?: string | null;
/**
* Billing phone number (including extension).
*/
phone?: string | null;
}
export namespace BillingDetails {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string | null;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string | null;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string | null;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string | null;
/**
* ZIP or postal code.
*/
postal_code?: string | null;
/**
* State, county, province, or region.
*/
state?: string | null;
}
}
}

View File

@@ -0,0 +1,209 @@
import {PaymentMethod} from './payment-methods';
/**
* The SetupIntent object.
*/
export interface SetupIntent {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'setup_intent';
/**
* Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
*/
cancellation_reason: SetupIntent.CancellationReason | null;
/**
* The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
*
* The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
*/
client_secret: string | null;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* The error encountered in the previous SetupIntent confirmation.
*/
last_setup_error: SetupIntent.LastSetupError | null;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
*/
next_action: SetupIntent.NextAction | null;
/**
* ID of the payment method used with this SetupIntent, or the PaymentMethod itself if this field is expanded.
*/
payment_method: string | null | PaymentMethod;
/**
* The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
*/
payment_method_types: Array<string>;
/**
* [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
*/
status: SetupIntent.Status;
/**
* Indicates how the payment method is intended to be used in the future.
*
* Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
*/
usage: string;
}
export namespace SetupIntent {
export type CancellationReason =
| 'abandoned'
| 'duplicate'
| 'requested_by_customer';
export interface LastSetupError {
/**
* For card errors, the ID of the failed charge.
*/
charge?: string;
/**
* For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
*/
code?: string;
/**
* For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
*/
decline_code?: string;
/**
* A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
*/
doc_url?: string;
/**
* A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
*/
message?: string;
/**
* If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
*/
param?: string;
payment_method?: PaymentMethod;
/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
*/
type: LastSetupError.Type;
}
export namespace LastSetupError {
export type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
}
export interface NextAction {
/**
* Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, or `verify_with_microdeposits`.
*/
type: string;
/**
* Contains instructions for authenticating a payment by redirecting your customer to another page or application.
*/
redirect_to_url?: NextAction.RedirectToUrl;
/**
* When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
*/
use_stripe_sdk?: NextAction.UseStripeSdk;
/**
* Contains details describing microdeposits verification flow.
*/
verify_with_microdeposits?: NextAction.VerifyWithMicrodeposits;
}
export namespace NextAction {
export interface RedirectToUrl {
/**
* If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
*/
return_url: string | null;
/**
* The URL you must redirect your customer to in order to authenticate.
*/
url: string | null;
}
export interface UseStripeSdk {}
export interface VerifyWithMicrodeposits {
/**
* The timestamp when the microdeposits are expected to land.
*/
arrival_date: number;
/**
* The URL for the hosted verification page, which allows customers to verify their bank account.
*/
hosted_verification_url: string;
/**
* The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
*/
microdeposit_type: string | null;
}
}
export type Status =
| 'canceled'
| 'processing'
| 'requires_action'
| 'requires_confirmation'
| 'requires_payment_method'
| 'succeeded';
}
export interface SetupIntentConfirmParams {
/**
* This hash contains details about the Mandate to create
*/
mandate_data?: {[k: string]: any};
/**
* The URL to redirect your customer back to after they authenticate on the payment method's app or site.
* If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
* This parameter is only used for cards and other redirect-based payment methods.
*/
return_url?: string;
}

View File

@@ -0,0 +1,209 @@
import {PaymentMethod} from './payment-methods';
/**
* The SetupIntent object.
*/
export interface SetupIntent {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'setup_intent';
/**
* Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
*/
cancellation_reason: SetupIntent.CancellationReason | null;
/**
* The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
*
* The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
*/
client_secret: string | null;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
description: string | null;
/**
* The error encountered in the previous SetupIntent confirmation.
*/
last_setup_error: SetupIntent.LastSetupError | null;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
*/
next_action: SetupIntent.NextAction | null;
/**
* ID of the payment method used with this SetupIntent, or the PaymentMethod itself if this field is expanded.
*/
payment_method: string | null | PaymentMethod;
/**
* The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
*/
payment_method_types: Array<string>;
/**
* [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
*/
status: SetupIntent.Status;
/**
* Indicates how the payment method is intended to be used in the future.
*
* Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
*/
usage: string;
}
export namespace SetupIntent {
export type CancellationReason =
| 'abandoned'
| 'duplicate'
| 'requested_by_customer';
export interface LastSetupError {
/**
* For card errors, the ID of the failed charge.
*/
charge?: string;
/**
* For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
*/
code?: string;
/**
* For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
*/
decline_code?: string;
/**
* A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
*/
doc_url?: string;
/**
* A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
*/
message?: string;
/**
* If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
*/
param?: string;
payment_method?: PaymentMethod;
/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
*/
type: LastSetupError.Type;
}
export namespace LastSetupError {
export type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
}
export interface NextAction {
/**
* Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, or `verify_with_microdeposits`.
*/
type: string;
/**
* Contains instructions for authenticating a payment by redirecting your customer to another page or application.
*/
redirect_to_url?: NextAction.RedirectToUrl;
/**
* When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
*/
use_stripe_sdk?: NextAction.UseStripeSdk;
/**
* Contains details describing microdeposits verification flow.
*/
verify_with_microdeposits?: NextAction.VerifyWithMicrodeposits;
}
export namespace NextAction {
export interface RedirectToUrl {
/**
* If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
*/
return_url: string | null;
/**
* The URL you must redirect your customer to in order to authenticate.
*/
url: string | null;
}
export interface UseStripeSdk {}
export interface VerifyWithMicrodeposits {
/**
* The timestamp when the microdeposits are expected to land.
*/
arrival_date: number;
/**
* The URL for the hosted verification page, which allows customers to verify their bank account.
*/
hosted_verification_url: string;
/**
* The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
*/
microdeposit_type: string | null;
}
}
export type Status =
| 'canceled'
| 'processing'
| 'requires_action'
| 'requires_confirmation'
| 'requires_payment_method'
| 'succeeded';
}
export interface SetupIntentConfirmParams {
/**
* This hash contains details about the Mandate to create
*/
mandate_data?: {[k: string]: any};
/**
* The URL to redirect your customer back to after they authenticate on the payment method's app or site.
* If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
* This parameter is only used for cards and other redirect-based payment methods.
*/
return_url?: string;
}

125
node_modules/@stripe/stripe-js/dist/api/shared.d.mts generated vendored Normal file
View File

@@ -0,0 +1,125 @@
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
export interface Metadata {
[name: string]: string;
}
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* While you can send values as numbers, they will be returned as strings.
*/
export interface MetadataParam {
[name: string]: string | number | null;
}
/**
* The Address object.
*/
export interface Address {
/**
* City/District/Suburb/Town/Village.
*/
city: string | null;
/**
* 2-letter country code.
*/
country: string | null;
/**
* Address line 1 (Street address/PO Box/Company name).
*/
line1: string | null;
/**
* Address line 2 (Apartment/Suite/Unit/Building).
*/
line2: string | null;
/**
* ZIP or postal code.
*/
postal_code: string | null;
/**
* State/County/Province/Region.
*/
state: string | null;
}
export interface AccountAddressParam {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export interface AddressParam extends AccountAddressParam {
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1: string;
}
export interface JapanAddressParam {
/**
* City or ward.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Block or building number.
*/
line1?: string;
/**
* Building details.
*/
line2?: string;
/**
* Postal code.
*/
postal_code?: string;
/**
* Prefecture.
*/
state?: string;
/**
* Town or cho-me.
*/
town?: string;
}

125
node_modules/@stripe/stripe-js/dist/api/shared.d.ts generated vendored Normal file
View File

@@ -0,0 +1,125 @@
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
export interface Metadata {
[name: string]: string;
}
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* While you can send values as numbers, they will be returned as strings.
*/
export interface MetadataParam {
[name: string]: string | number | null;
}
/**
* The Address object.
*/
export interface Address {
/**
* City/District/Suburb/Town/Village.
*/
city: string | null;
/**
* 2-letter country code.
*/
country: string | null;
/**
* Address line 1 (Street address/PO Box/Company name).
*/
line1: string | null;
/**
* Address line 2 (Apartment/Suite/Unit/Building).
*/
line2: string | null;
/**
* ZIP or postal code.
*/
postal_code: string | null;
/**
* State/County/Province/Region.
*/
state: string | null;
}
export interface AccountAddressParam {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export interface AddressParam extends AccountAddressParam {
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1: string;
}
export interface JapanAddressParam {
/**
* City or ward.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Block or building number.
*/
line1?: string;
/**
* Building details.
*/
line2?: string;
/**
* Postal code.
*/
postal_code?: string;
/**
* Prefecture.
*/
state?: string;
/**
* Town or cho-me.
*/
town?: string;
}

1045
node_modules/@stripe/stripe-js/dist/api/sources.d.mts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1045
node_modules/@stripe/stripe-js/dist/api/sources.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

639
node_modules/@stripe/stripe-js/dist/api/tokens.d.mts generated vendored Normal file
View File

@@ -0,0 +1,639 @@
import {Omit} from '../utils';
import {Card} from './cards';
import {BankAccount} from './bank-accounts';
import {JapanAddressParam, MetadataParam} from './shared';
/**
* The Token object.
*/
export interface Token {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'token';
bank_account?: BankAccount;
card?: Card;
/**
* IP address of the client that generated the token.
*/
client_ip: string | null;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* Type of the token: `account`, `bank_account`, `card`, or `pii`.
*/
type: string;
/**
* Whether this token has already been used (tokens can be used only once).
*/
used: boolean;
}
export type BankAccountToken = Omit<Token, 'card'> & {
bank_account: BankAccount;
};
export namespace TokenCreateParams {
export interface Account {
/**
* The business type.
*/
business_type?: Account.BusinessType;
/**
* Information about the company or business.
*/
company?: Account.Company;
/**
* Information about the person represented by the account.
*/
individual?: Account.Individual;
/**
* Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/docs/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
*/
tos_shown_and_accepted?: boolean;
}
export namespace Account {
export type BusinessType =
| 'company'
| 'government_entity'
| 'individual'
| 'non_profit';
export interface Company {
/**
* The company's primary address.
*/
address?: Company.Address;
/**
* The Kana variation of the company's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
/**
* The Kanji variation of the company's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
/**
* Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
*/
directors_provided?: boolean;
/**
* Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement.
*/
executives_provided?: boolean;
/**
* The company's legal name.
*/
name?: string;
/**
* The Kana variation of the company's legal name (Japan only).
*/
name_kana?: string;
/**
* The Kanji variation of the company's legal name (Japan only).
*/
name_kanji?: string;
/**
* Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement.
*/
owners_provided?: boolean;
/**
* The company's phone number (used for verification).
*/
phone?: string;
/**
* The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
*/
structure?: Company.Structure | null;
/**
* The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
*/
tax_id?: string;
/**
* The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
*/
tax_id_registrar?: string;
/**
* The VAT number of the company.
*/
vat_id?: string;
/**
* Information on the verification state of the company.
*/
verification?: Company.Verification;
}
export namespace Company {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export type Structure =
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'limited_liability_partnership'
| 'multi_member_llc'
| 'private_company'
| 'private_corporation'
| 'private_partnership'
| 'public_company'
| 'public_corporation'
| 'public_partnership'
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
export interface Verification {
/**
* A document verifying the business.
*/
document?: Verification.Document;
}
export namespace Verification {
export interface Document {
/**
* The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
}
}
export interface Individual {
/**
* The individual's primary address.
*/
address?: Individual.Address;
/**
* The Kana variation of the the individual's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
/**
* The Kanji variation of the the individual's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
/**
* The individual's date of birth.
*/
dob?: Individual.Dob | null;
/**
* The individual's email address.
*/
email?: string;
/**
* The individual's first name.
*/
first_name?: string;
/**
* The Kana variation of the the individual's first name (Japan only).
*/
first_name_kana?: string;
/**
* The Kanji variation of the individual's first name (Japan only).
*/
first_name_kanji?: string;
/**
* The individual's gender (International regulations require either "male" or "female").
*/
gender?: string;
/**
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
*/
id_number?: string;
/**
* The individual's last name.
*/
last_name?: string;
/**
* The Kana varation of the individual's last name (Japan only).
*/
last_name_kana?: string;
/**
* The Kanji varation of the individual's last name (Japan only).
*/
last_name_kanji?: string;
/**
* The individual's maiden name.
*/
maiden_name?: string;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam | null;
/**
* The individual's phone number.
*/
phone?: string;
/**
* Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
*/
political_exposure?: Individual.PoliticalExposure;
/**
* The last four digits of the individual's Social Security Number (U.S. only).
*/
ssn_last_4?: string;
/**
* The individual's verification document information.
*/
verification?: Individual.Verification;
}
export namespace Individual {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export interface Dob {
/**
* The day of birth, between 1 and 31.
*/
day: number;
/**
* The month of birth, between 1 and 12.
*/
month: number;
/**
* The four-digit year of birth.
*/
year: number;
}
export type PoliticalExposure = 'none' | 'existing';
export interface Verification {
/**
* A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
*/
additional_document?: Verification.AdditionalDocument;
/**
* An identifying document, either a passport or local ID card.
*/
document?: Verification.Document;
}
export namespace Verification {
export interface AdditionalDocument {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
export interface Document {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
}
}
}
export interface Person {
/**
* The person's address.
*/
address?: Person.Address;
/**
* The Kana variation of the person's address (Japan only).
*/
address_kana?: JapanAddressParam;
/**
* The Kanji variation of the person's address (Japan only).
*/
address_kanji?: JapanAddressParam;
/**
* The person's date of birth.
*/
dob?: Person.Dob | null;
/**
* The person's email address.
*/
email?: string;
/**
* The person's first name.
*/
first_name?: string;
/**
* The Kana variation of the person's first name (Japan only).
*/
first_name_kana?: string;
/**
* The Kanji variation of the person's first name (Japan only).
*/
first_name_kanji?: string;
/**
* The person's gender (International regulations require either "male" or "female").
*/
gender?: string;
/**
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
*/
id_number?: string;
/**
* The person's last name.
*/
last_name?: string;
/**
* The Kana variation of the person's last name (Japan only).
*/
last_name_kana?: string;
/**
* The Kanji variation of the person's last name (Japan only).
*/
last_name_kanji?: string;
/**
* The person's maiden name.
*/
maiden_name?: string;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam | null;
/**
* The person's phone number.
*/
phone?: string;
/**
* The relationship that this person has with the account's legal entity.
*/
relationship?: Person.Relationship;
/**
* The last 4 digits of the person's social security number.
*/
ssn_last_4?: string;
/**
* The person's verification status.
*/
verification?: Person.Verification;
}
export namespace Person {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export interface Dob {
/**
* The day of birth, between 1 and 31.
*/
day: number;
/**
* The month of birth, between 1 and 12.
*/
month: number;
/**
* The four-digit year of birth.
*/
year: number;
}
export interface Relationship {
/**
* Whether the person is a director of the account's legal entity. Currently only required for accounts in the EU. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
*/
director?: boolean;
/**
* Whether the person has significant responsibility to control, manage, or direct the organization.
*/
executive?: boolean;
/**
* Whether the person is an owner of the account's legal entity.
*/
owner?: boolean;
/**
* The percent owned by the person of the account's legal entity.
*/
percent_ownership?: number | null;
/**
* Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
*/
representative?: boolean;
/**
* The person's title (e.g., CEO, Support Engineer).
*/
title?: string;
}
export interface Verification {
/**
* A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
*/
additional_document?: Verification.AdditionalDocument;
/**
* An identifying document, either a passport or local ID card.
*/
document?: Verification.Document;
}
export namespace Verification {
export interface AdditionalDocument {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
export interface Document {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
}
}
}

639
node_modules/@stripe/stripe-js/dist/api/tokens.d.ts generated vendored Normal file
View File

@@ -0,0 +1,639 @@
import {Omit} from '../utils';
import {Card} from './cards';
import {BankAccount} from './bank-accounts';
import {JapanAddressParam, MetadataParam} from './shared';
/**
* The Token object.
*/
export interface Token {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'token';
bank_account?: BankAccount;
card?: Card;
/**
* IP address of the client that generated the token.
*/
client_ip: string | null;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* Type of the token: `account`, `bank_account`, `card`, or `pii`.
*/
type: string;
/**
* Whether this token has already been used (tokens can be used only once).
*/
used: boolean;
}
export type BankAccountToken = Omit<Token, 'card'> & {
bank_account: BankAccount;
};
export namespace TokenCreateParams {
export interface Account {
/**
* The business type.
*/
business_type?: Account.BusinessType;
/**
* Information about the company or business.
*/
company?: Account.Company;
/**
* Information about the person represented by the account.
*/
individual?: Account.Individual;
/**
* Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/docs/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
*/
tos_shown_and_accepted?: boolean;
}
export namespace Account {
export type BusinessType =
| 'company'
| 'government_entity'
| 'individual'
| 'non_profit';
export interface Company {
/**
* The company's primary address.
*/
address?: Company.Address;
/**
* The Kana variation of the company's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
/**
* The Kanji variation of the company's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
/**
* Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
*/
directors_provided?: boolean;
/**
* Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement.
*/
executives_provided?: boolean;
/**
* The company's legal name.
*/
name?: string;
/**
* The Kana variation of the company's legal name (Japan only).
*/
name_kana?: string;
/**
* The Kanji variation of the company's legal name (Japan only).
*/
name_kanji?: string;
/**
* Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement.
*/
owners_provided?: boolean;
/**
* The company's phone number (used for verification).
*/
phone?: string;
/**
* The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
*/
structure?: Company.Structure | null;
/**
* The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
*/
tax_id?: string;
/**
* The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
*/
tax_id_registrar?: string;
/**
* The VAT number of the company.
*/
vat_id?: string;
/**
* Information on the verification state of the company.
*/
verification?: Company.Verification;
}
export namespace Company {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export type Structure =
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'limited_liability_partnership'
| 'multi_member_llc'
| 'private_company'
| 'private_corporation'
| 'private_partnership'
| 'public_company'
| 'public_corporation'
| 'public_partnership'
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
export interface Verification {
/**
* A document verifying the business.
*/
document?: Verification.Document;
}
export namespace Verification {
export interface Document {
/**
* The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
}
}
export interface Individual {
/**
* The individual's primary address.
*/
address?: Individual.Address;
/**
* The Kana variation of the the individual's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
/**
* The Kanji variation of the the individual's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
/**
* The individual's date of birth.
*/
dob?: Individual.Dob | null;
/**
* The individual's email address.
*/
email?: string;
/**
* The individual's first name.
*/
first_name?: string;
/**
* The Kana variation of the the individual's first name (Japan only).
*/
first_name_kana?: string;
/**
* The Kanji variation of the individual's first name (Japan only).
*/
first_name_kanji?: string;
/**
* The individual's gender (International regulations require either "male" or "female").
*/
gender?: string;
/**
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
*/
id_number?: string;
/**
* The individual's last name.
*/
last_name?: string;
/**
* The Kana varation of the individual's last name (Japan only).
*/
last_name_kana?: string;
/**
* The Kanji varation of the individual's last name (Japan only).
*/
last_name_kanji?: string;
/**
* The individual's maiden name.
*/
maiden_name?: string;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam | null;
/**
* The individual's phone number.
*/
phone?: string;
/**
* Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
*/
political_exposure?: Individual.PoliticalExposure;
/**
* The last four digits of the individual's Social Security Number (U.S. only).
*/
ssn_last_4?: string;
/**
* The individual's verification document information.
*/
verification?: Individual.Verification;
}
export namespace Individual {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export interface Dob {
/**
* The day of birth, between 1 and 31.
*/
day: number;
/**
* The month of birth, between 1 and 12.
*/
month: number;
/**
* The four-digit year of birth.
*/
year: number;
}
export type PoliticalExposure = 'none' | 'existing';
export interface Verification {
/**
* A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
*/
additional_document?: Verification.AdditionalDocument;
/**
* An identifying document, either a passport or local ID card.
*/
document?: Verification.Document;
}
export namespace Verification {
export interface AdditionalDocument {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
export interface Document {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
}
}
}
export interface Person {
/**
* The person's address.
*/
address?: Person.Address;
/**
* The Kana variation of the person's address (Japan only).
*/
address_kana?: JapanAddressParam;
/**
* The Kanji variation of the person's address (Japan only).
*/
address_kanji?: JapanAddressParam;
/**
* The person's date of birth.
*/
dob?: Person.Dob | null;
/**
* The person's email address.
*/
email?: string;
/**
* The person's first name.
*/
first_name?: string;
/**
* The Kana variation of the person's first name (Japan only).
*/
first_name_kana?: string;
/**
* The Kanji variation of the person's first name (Japan only).
*/
first_name_kanji?: string;
/**
* The person's gender (International regulations require either "male" or "female").
*/
gender?: string;
/**
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
*/
id_number?: string;
/**
* The person's last name.
*/
last_name?: string;
/**
* The Kana variation of the person's last name (Japan only).
*/
last_name_kana?: string;
/**
* The Kanji variation of the person's last name (Japan only).
*/
last_name_kanji?: string;
/**
* The person's maiden name.
*/
maiden_name?: string;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam | null;
/**
* The person's phone number.
*/
phone?: string;
/**
* The relationship that this person has with the account's legal entity.
*/
relationship?: Person.Relationship;
/**
* The last 4 digits of the person's social security number.
*/
ssn_last_4?: string;
/**
* The person's verification status.
*/
verification?: Person.Verification;
}
export namespace Person {
export interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export interface Dob {
/**
* The day of birth, between 1 and 31.
*/
day: number;
/**
* The month of birth, between 1 and 12.
*/
month: number;
/**
* The four-digit year of birth.
*/
year: number;
}
export interface Relationship {
/**
* Whether the person is a director of the account's legal entity. Currently only required for accounts in the EU. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
*/
director?: boolean;
/**
* Whether the person has significant responsibility to control, manage, or direct the organization.
*/
executive?: boolean;
/**
* Whether the person is an owner of the account's legal entity.
*/
owner?: boolean;
/**
* The percent owned by the person of the account's legal entity.
*/
percent_ownership?: number | null;
/**
* Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
*/
representative?: boolean;
/**
* The person's title (e.g., CEO, Support Engineer).
*/
title?: string;
}
export interface Verification {
/**
* A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
*/
additional_document?: Verification.AdditionalDocument;
/**
* An identifying document, either a passport or local ID card.
*/
document?: Verification.Document;
}
export namespace Verification {
export interface AdditionalDocument {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
export interface Document {
/**
* The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
back?: string;
/**
* The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
*/
front?: string;
}
}
}
}

View File

@@ -0,0 +1,9 @@
/**
* The VerificationSession object.
*/
export interface VerificationSession {
/**
* Unique identifier for the object.
*/
id: string;
}

View File

@@ -0,0 +1,9 @@
/**
* The VerificationSession object.
*/
export interface VerificationSession {
/**
* Unique identifier for the object.
*/
id: string;
}