@stripe/stripe-js
- Version 1.32.0
- Published
- 351 kB
- No dependencies
- MIT license
Install
npm i @stripe/stripe-js
yarn add @stripe/stripe-js
pnpm add @stripe/stripe-js
Overview
Stripe.js loading utility
Index
Functions
Interfaces
Source
- ach_credit_transfer
- ach_debit
- acss_debit
- alipay
- amount
- au_becs_debit
- bancontact
- card
- card_present
- client_secret
- code_verification
- created
- currency
- customer
- eps
- flow
- giropay
- id
- ideal
- klarna
- livemode
- metadata
- multibanco
- object
- owner
- p24
- receiver
- redirect
- sepa_credit_transfer
- sepa_debit
- sofort
- source_order
- statement_descriptor
- status
- three_d_secure
- type
- usage
Stripe
- collectBankAccountForPayment()
- collectBankAccountForSetup()
- confirmAcssDebitPayment()
- confirmAcssDebitSetup()
- confirmAffirmPayment()
- confirmAfterpayClearpayPayment()
- confirmAlipayPayment()
- confirmAuBecsDebitPayment()
- confirmAuBecsDebitSetup()
- confirmBacsDebitSetup()
- confirmBancontactPayment()
- confirmBancontactSetup()
- confirmBoletoPayment()
- confirmCardPayment()
- confirmCardSetup()
- confirmCustomerBalancePayment()
- confirmEpsPayment()
- confirmFpxPayment()
- confirmGiropayPayment()
- confirmGrabPayPayment()
- confirmIdealPayment()
- confirmIdealSetup()
- confirmKlarnaPayment()
- confirmKonbiniPayment()
- confirmOxxoPayment()
- confirmP24Payment()
- confirmPayment()
- confirmPayNowPayment()
- confirmPayPalPayment()
- confirmPayPalSetup()
- confirmPromptPayPayment()
- confirmSepaDebitPayment()
- confirmSepaDebitSetup()
- confirmSetup()
- confirmSofortPayment()
- confirmSofortSetup()
- confirmUsBankAccountPayment()
- confirmUsBankAccountSetup()
- confirmWechatPayPayment()
- createPaymentMethod()
- createSource()
- createToken()
- elements()
- handleCardAction()
- paymentRequest()
- processOrder()
- redirectToCheckout()
- registerAppInfo()
- retrieveOrder()
- retrievePaymentIntent()
- retrieveSetupIntent()
- retrieveSource()
- verifyIdentity()
- verifyMicrodepositsForPayment()
- verifyMicrodepositsForSetup()
Type Aliases
- CanMakePaymentResult
- CheckoutLocale
- CreatePaymentMethodData
- FieldOption
- PaymentIntentResult
- PaymentMethodResult
- PaymentRequestCompleteStatus
- PaymentRequestUpdateDetailsStatus
- PaymentRequestWallet
- ProcessOrderResult
- RedirectToCheckoutOptions
- RetrieveOrderResult
- SetupIntentResult
- SourceResult
- StripeAffirmMessageElement
- StripeAfterpayClearpayMessageElement
- StripeAuBankAccountElement
- StripeCardCvcElement
- StripeCardElement
- StripeCardExpiryElement
- StripeCardNumberElement
- StripeElement
- StripeElementBase
- StripeElementLocale
- StripeElementType
- StripeEpsBankElement
- StripeErrorType
- StripeFpxBankElement
- StripeIbanElement
- StripeIdealBankElement
- StripeLinkAuthenticationElement
- StripeP24BankElement
- StripePaymentElement
- StripePaymentRequestButtonElement
- StripeShippingAddressElement
- TermOption
- TokenResult
- VerificationSessionResult
- WalletOption
Namespaces
Functions
function loadStripe
loadStripe: ( publishableKey: string, options?: StripeConstructorOptions | undefined) => Promise<Stripe | null>;
Interfaces
interface AccountAddressParam
interface AccountAddressParam {}
property city
city?: string;
City, district, suburb, town, or village.
property country
country?: string;
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
property line1
line1?: string;
Address line 1 (e.g., street, PO Box, or company name).
property line2
line2?: string;
Address line 2 (e.g., apartment, suite, unit, or building).
property postal_code
postal_code?: string;
ZIP or postal code.
property state
state?: string;
State, county, province, or region.
interface Address
interface Address {}
The Address object.
property city
city: string | null;
City/District/Suburb/Town/Village.
property country
country: string | null;
2-letter country code.
property line1
line1: string | null;
Address line 1 (Street address/PO Box/Company name).
property line2
line2: string | null;
Address line 2 (Apartment/Suite/Unit/Building).
property postal_code
postal_code: string | null;
ZIP or postal code.
property state
state: string | null;
State/County/Province/Region.
interface AddressParam
interface AddressParam extends AccountAddressParam {}
property line1
line1: string;
Address line 1 (e.g., street, PO Box, or company name).
interface Appearance
interface Appearance {}
property disableAnimations
disableAnimations?: boolean;
property labels
labels?: 'above' | 'floating';
property rules
rules?: { [selector: string]: { [cssPropertyName: string]: string; };};
property theme
theme?: 'stripe' | 'night' | 'flat' | 'none';
property variables
variables?: { // General font styles fontFamily?: string; fontSmooth?: string; fontVariantLigatures?: string; fontVariationSettings?: string; fontLineHeight?: string;
// Font sizes fontSizeBase?: string; fontSizeSm?: string; fontSizeXs?: string; fontSize2Xs?: string; fontSize3Xs?: string; fontSizeLg?: string; fontSizeXl?: string;
// Font weights fontWeightLight?: string; fontWeightNormal?: string; fontWeightMedium?: string; fontWeightBold?: string;
// Spacing spacingUnit?: string; spacingGridRow?: string; spacingGridColumn?: string; spacingTab?: string;
// Colors colorPrimary?: string; colorPrimaryText?: string; colorBackground?: string; colorBackgroundText?: string; colorText?: string; colorSuccess?: string; colorSuccessText?: string; colorDanger?: string; colorDangerText?: string; colorWarning?: string; colorWarningText?: string;
// Text variations colorTextSecondary?: string; colorTextPlaceholder?: string;
// Icons colorIcon?: string; colorIconHover?: string; colorIconCardError?: string; colorIconCardCvc?: string; colorIconCardCvcError?: string; colorIconCheckmark?: string; colorIconChevronDown?: string; colorIconChevronDownHover?: string; colorIconRedirect?: string; colorIconTab?: string; colorIconTabHover?: string; colorIconTabSelected?: string; colorIconTabMore?: string; colorIconTabMoreHover?: string;
// Logos colorLogo?: string; colorLogoTab?: string; colorLogoTabSelected?: string; colorLogoBlock?: string;
// Focus focusBoxShadow?: string; focusOutline?: string;
// Radius borderRadius?: string;};
interface BankAccount
interface BankAccount {}
The BankAccount object.
property account_holder_name
account_holder_name: string | null;
The name of the person or business that owns the bank account.
property account_holder_type
account_holder_type: string | null;
The type of entity that holds the account. This can be either
individual
orcompany
.
property bank_name
bank_name: string | null;
Name of the bank associated with the routing number (e.g.,
WELLS FARGO
).
property country
country: string;
Two-letter ISO code representing the country the bank account is located in.
property currency
currency: string;
Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
property fingerprint
fingerprint: string | null;
Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
property id
id: string;
Unique identifier for the object.
property last4
last4: string;
The last four digits of the bank account number.
property object
object: 'bank_account';
String representing the object's type. Objects of the same type share the same value.
property routing_number
routing_number: string | null;
The routing transit number for the bank account.
property status
status: string;
For bank accounts, possible values are
new
,validated
,verified
,verification_failed
, orerrored
. A bank account that hasn't had any activity or validation performed isnew
. If Stripe can determine that the bank account exists, its status will bevalidated
. 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 beverified
. If the verification failed for any reason, such as microdeposit failure, the status will beverification_failed
. If a transfer sent to this bank account fails, we'll set the status toerrored
and will not continue to send transfers until the bank details are updated.For external accounts, possible values are
new
anderrored
. 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 toerrored
and transfers are stopped until account details are updated.
interface Card
interface Card {}
The Card object.
property address_city
address_city: string | null;
City/District/Suburb/Town/Village.
property address_country
address_country: string | null;
Billing address country, if provided when creating card.
property address_line1
address_line1: string | null;
Address line 1 (Street address/PO Box/Company name).
property address_line1_check
address_line1_check: string | null;
If
address_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.
property address_line2
address_line2: string | null;
Address line 2 (Apartment/Suite/Unit/Building).
property address_state
address_state: string | null;
State/County/Province/Region.
property address_zip
address_zip: string | null;
ZIP or postal code.
property address_zip_check
address_zip_check: string | null;
If
address_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.
property brand
brand: string;
Card brand. Can be
American Express
,Diners Club
,Discover
,JCB
,MasterCard
,UnionPay
,Visa
, orUnknown
.
property country
country: string | 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.
property currency
currency?: 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).
property customer
customer?: 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.
property cvc_check
cvc_check: string | null;
If a CVC was provided, results of the check:
pass
,fail
,unavailable
, orunchecked
.
property dynamic_last4
dynamic_last4: string | null;
(For tokenized numbers only.) The last four digits of the device account number.
property exp_month
exp_month: number;
Two-digit number representing the card's expiration month.
property exp_year
exp_year: number;
Four-digit number representing the card's expiration year.
property fingerprint
fingerprint?: string | null;
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.
property funding
funding: string;
Card funding type. Can be
credit
,debit
,prepaid
, orunknown
.
property id
id: string;
Unique identifier for the object.
property last4
last4: string;
The last four digits of the card.
property metadata
metadata: Metadata;
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.
property name
name: string | null;
Cardholder name.
property object
object: 'card';
String representing the object's type. Objects of the same type share the same value.
property tokenization_method
tokenization_method: string | null;
If the card number is tokenized, this is the method that was used. Can be
apple_pay
orgoogle_pay
.
interface CollectBankAccountForPaymentOptions
interface CollectBankAccountForPaymentOptions {}
Data to be sent with a
stripe.collectBankAccountForPayment
request.
property clientSecret
clientSecret: string;
The client secret of the PaymentIntent.
property expand
expand?: Array<string>;
Specifies which fields in the response should be expanded.
property params
params: CollectBankAccountParams;
interface CollectBankAccountForSetupOptions
interface CollectBankAccountForSetupOptions {}
Data to be sent with a
stripe.collectBankAccountForSetup
request.
property clientSecret
clientSecret: string;
The client secret of the SetupIntent.
property expand
expand?: Array<string>;
Specifies which fields in the response should be expanded.
property params
params: CollectBankAccountParams;
interface CollectBankAccountParams
interface CollectBankAccountParams {}
property payment_method_data
payment_method_data: CollectBankAccountPaymentMethodData;
Payment method specific data to be sent with the request (billing details)
property payment_method_type
payment_method_type: string;
The payment method type for the bank account details (e.g.
us_bank_account
)
interface CollectBankAccountPaymentMethodData
interface CollectBankAccountPaymentMethodData {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails;
The customer's billing details.
name
,email
, andaddress
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
interface ConfirmAcssDebitPaymentData
interface ConfirmAcssDebitPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmAcssDebitPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodAcssDebitData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
interface ConfirmAcssDebitPaymentOptions
interface ConfirmAcssDebitPaymentOptions {}
An options object to control the behavior of
stripe.confirmAcssDebitPayment
.
property skipMandate
skipMandate?: boolean;
Set
skipMandate
totrue
if you want to skip displaying the mandate confirmation screen.
interface ConfirmAcssDebitSetupData
interface ConfirmAcssDebitSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmAcssDebitSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodAcssDebitData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisSetupIntent
.
interface ConfirmAcssDebitSetupOptions
interface ConfirmAcssDebitSetupOptions {}
An options object to control the behavior of
stripe.confirmAcssDebitSetup
.
property skipMandate
skipMandate?: boolean;
Set this to true if you want to skip displaying the mandate confirmation.
interface ConfirmAffirmPaymentData
interface ConfirmAffirmPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmAffirmPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodAffirmData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmAffirmPaymentOptions
interface ConfirmAffirmPaymentOptions {}
An options object to control the behavior of
stripe.confirmAffirmPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to handle next actions yourself. Please refer to our [Stripe Affirm integration guide](https://stripe.com/docs/payments/affirm/accept-a-payment) for more info. Default istrue
.
interface ConfirmAfterpayClearpayPaymentData
interface ConfirmAfterpayClearpayPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmAfterpayClearpayPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodAfterpayClearpayData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmAfterpayClearpayPaymentOptions
interface ConfirmAfterpayClearpayPaymentOptions {}
An options object to control the behavior of
stripe.confirmAfterpayClearpayPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to handle next actions yourself. Please refer to our [Stripe Afterpay / Clearpay integration guide](https://stripe.com/docs/payments/afterpay-clearpay/accept-a-payment#handle-redirect) for more info. Default istrue
.
interface ConfirmAlipayPaymentData
interface ConfirmAlipayPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmAlipayPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodAlipayData, 'type'>;
The
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods). This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
or a newPaymentMethod
will be created.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmAlipayPaymentOptions
interface ConfirmAlipayPaymentOptions {}
An options object to control the behavior of
stripe.confirmAlipayPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/alipay/accept-a-payment#handle-redirect). Default istrue
.
interface ConfirmAuBecsDebitPaymentData
interface ConfirmAuBecsDebitPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmAuBecsDebitPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodAuBecsDebitData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property setup_future_usage
setup_future_usage?: 'off_session';
To save the BECS Direct Debit account for reuse, set this parameter to
off_session
. BECS Direct Debit only accepts anoff_session
value for this parameter.
interface ConfirmAuBecsDebitSetupData
interface ConfirmAuBecsDebitSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmAuBecsDebitSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodAuBecsDebitData, 'type'>;
interface ConfirmBacsDebitSetupData
interface ConfirmBacsDebitSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmBacsDebitSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodBacsDebitData, 'type'>;
interface ConfirmBancontactPaymentData
interface ConfirmBancontactPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmBancontactPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodBancontactData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmBancontactPaymentOptions
interface ConfirmBancontactPaymentOptions {}
An options object to control the behavior of
stripe.confirmBancontactPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/bancontact#handle-redirect). Default istrue
.
interface ConfirmBancontactSetupData
interface ConfirmBancontactSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmBancontactSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodBancontactData, 'type'>;
interface ConfirmBoletoPaymentData
interface ConfirmBoletoPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmBoletoPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodBoletoData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
interface ConfirmBoletoPaymentOptions
interface ConfirmBoletoPaymentOptions {}
An options object to control the behavior of
stripe.confirmBoletoPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to handle next actions yourself. Please refer to our [Stripe Boleto integration guide](https://stripe.com/docs/payments/boleto) for more info. Default istrue
.
interface ConfirmCardPaymentData
interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmCardPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodCardData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property payment_method_options
payment_method_options?: { /** * Configuration for this card payment. */ card: { /** * Use the provided `CardCvcElement` when confirming the PaymentIntent with an existing PaymentMethod. */ cvc?: StripeCardCvcElement;
/** * Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. */ network?: string; };};
An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
interface ConfirmCardPaymentOptions
interface ConfirmCardPaymentOptions {}
An options object to control the behavior of
stripe.confirmCardPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)). Default istrue
.
interface ConfirmCardSetupData
interface ConfirmCardSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmCardSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodCardData, 'type'>;
interface ConfirmCardSetupOptions
interface ConfirmCardSetupOptions {}
An options object to control the behavior of
stripe.confirmCardSetup
.
property handleActions
handleActions?: boolean;
interface ConfirmCustomerBalancePaymentData
interface ConfirmCustomerBalancePaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmCustomerBalancePayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method: CreatePaymentMethodCustomerBalanceData;
An object specifying the
customer_balance
type.
property payment_method_options
payment_method_options?: { customer_balance?: { funding_type?: 'bank_transfer'; bank_transfer?: { type: | 'us_bank_account' | 'eu_bank_account' | 'id_bank_account' | 'gb_bank_account' | 'jp_bank_account' | 'mx_bank_account'; eu_bank_account?: { country: 'ES' | 'FR' | 'IE' | 'NL'; }; id_bank_account?: { bank: 'bni' | 'bca'; }; requested_address_types?: Array< | 'aba' | 'swift' | 'sort_code' | 'zengin' | 'iban' | 'spei' | 'id_bban' | 'sepa' >; }; };};
interface ConfirmCustomerBalancePaymentOptions
interface ConfirmCustomerBalancePaymentOptions {}
An options object to control the behavior of
stripe.confirmCustomerBalancePayment
.
property handleActions
handleActions: false;
This must be set to
false
. The Customer Balance does not handle the next actions for you automatically (e.g. displaying bank transfer details). To make future upgrades easier, this option is required to always be sent. Please refer to our [Stripe Customer Balance integration guide](https://stripe.com/docs/payments/bank-transfers) for more info.
interface ConfirmEpsPaymentData
interface ConfirmEpsPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmEpsPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodEpsData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmEpsPaymentOptions
interface ConfirmEpsPaymentOptions {}
An options object to control the behavior of
stripe.confirmEpsPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/eps#handle-redirect). Default istrue
.
interface ConfirmFpxPaymentData
interface ConfirmFpxPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmFpxPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodFpxData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmFpxPaymentOptions
interface ConfirmFpxPaymentOptions {}
An options object to control the behavior of
stripe.confirmFpxPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/fpx#handle-redirect). Default istrue
.
interface ConfirmGiropayPaymentData
interface ConfirmGiropayPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmGiropayPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodGiropayData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmGiropayPaymentOptions
interface ConfirmGiropayPaymentOptions {}
An options object to control the behavior of
stripe.confirmGiropayPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/giropay#handle-redirect). Default istrue
.
interface ConfirmGrabPayPaymentData
interface ConfirmGrabPayPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmGrabPayPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodGrabPayData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmGrabPayPaymentOptions
interface ConfirmGrabPayPaymentOptions {}
An options object to control the behavior of
stripe.confirmGrabPayPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to handle next actions yourself. Please refer to our [Stripe GrabPay integration guide](https://stripe.com/docs/payments/grabpay/accept-a-payment) for more info. Default istrue
.
interface ConfirmIdealPaymentData
interface ConfirmIdealPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmIdealPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodIdealData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmIdealPaymentOptions
interface ConfirmIdealPaymentOptions {}
An options object to control the behavior of
stripe.confirmIdealPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect). Default istrue
.
interface ConfirmIdealSetupData
interface ConfirmIdealSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmIdealSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodIdealData, 'type'>;
interface ConfirmKlarnaPaymentData
interface ConfirmKlarnaPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmKlarnaPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodKlarnaData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmKlarnaPaymentOptions
interface ConfirmKlarnaPaymentOptions {}
An options object to control the behavior of
stripe.confirmKlarnaPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/klarna#handle-redirect). Default istrue
.
interface ConfirmKonbiniPaymentData
interface ConfirmKonbiniPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmKonbiniPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodKonbiniData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property payment_method_options
payment_method_options?: { /** * Configuration for this Konbini payment. */ konbini: { /** * An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. May not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number. */ confirmation_number?: string; };};
An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
interface ConfirmKonbiniPaymentOptions
interface ConfirmKonbiniPaymentOptions {}
An options object to control the behavior of
stripe.confirmKonbiniPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to handle next actions yourself. Please refer to our [integration guide](https://stripe.com/docs/payments/konbini/accept-a-payment) for more info. Default istrue
.
interface ConfirmOxxoPaymentData
interface ConfirmOxxoPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmOxxoPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodOxxoData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
interface ConfirmOxxoPaymentOptions
interface ConfirmOxxoPaymentOptions {}
An options object to control the behavior of
stripe.confirmOxxoPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to handle next actions yourself. Please refer to our [Stripe OXXO integration guide](https://stripe.com/docs/payments/oxxo) for more info. Default istrue
.
interface ConfirmP24PaymentData
interface ConfirmP24PaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmP24Payment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodP24Data, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property payment_method_options
payment_method_options?: { /** * Configuration for this Przelewy24 payment. */ p24: { /** * Specify that payer has agreed to the Przelewy24 Terms of Service */ tos_shown_and_accepted?: boolean; };};
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
interface ConfirmP24PaymentOptions
interface ConfirmP24PaymentOptions {}
An options object to control the behavior of
stripe.confirmP24Payment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect). Default istrue
.
interface ConfirmPaymentData
interface ConfirmPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property expand
expand?: Array<string>;
Specifies which fields in the response should be expanded.
property payment_method_data
payment_method_data?: { /** * The customer's billing details. Details collected by Elements will override values passed here. * Billing fields that are omitted in the Payment Element via the `fields` option required. * * @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_data-billing_details */ billing_details?: PaymentMethodCreateParams.BillingDetails;};
An object to attach additional billing_details to the PaymentMethod created via Elements.
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_data
property return_url
return_url: string;
The url your customer will be directed to after they complete payment.
interface ConfirmPayNowPaymentData
interface ConfirmPayNowPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmPayNowPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodPayNowData, 'type'>;
The
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods). This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
or a newPaymentMethod
will be created.
interface ConfirmPayNowPaymentOptions
interface ConfirmPayNowPaymentOptions {}
An options object to control the behavior of
stripe.confirmPayNowPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect). Default istrue
.
interface ConfirmPayPalPaymentData
interface ConfirmPayPalPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmPayPalPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodPayPalData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url: string;
The required url your customer will be directed to after they complete authentication.
interface ConfirmPayPalSetupData
interface ConfirmPayPalSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmIdealSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodPayPalData, 'type'>;
property return_url
return_url: string;
The required url your customer will be directed to after they complete authentication.
interface ConfirmPromptPayPaymentData
interface ConfirmPromptPayPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmPayNowPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodPromptPayData, 'type'>;
The
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods). This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
or a newPaymentMethod
will be created.
interface ConfirmPromptPayPaymentOptions
interface ConfirmPromptPayPaymentOptions {}
An options object to control the behavior of
stripe.confirmPayNowPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect). Default istrue
.
interface ConfirmSepaDebitPaymentData
interface ConfirmSepaDebitPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmSepaDebitPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodSepaDebitData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property setup_future_usage
setup_future_usage?: 'off_session';
To save the SEPA Direct Debit account for reuse, set this parameter to
off_session
. SEPA Direct Debit only accepts anoff_session
value for this parameter.
interface ConfirmSepaDebitSetupData
interface ConfirmSepaDebitSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmSepaDebitSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodSepaDebitData, 'type'>;
interface ConfirmSofortPaymentData
interface ConfirmSofortPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmSofortPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
property return_url
return_url?: string;
The url your customer will be directed to after they complete authentication.
property setup_future_usage
setup_future_usage?: 'off_session';
To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment, set this parameter to
off_session
. When using this parameter, acustomer
will need to be set on the [PaymentIntent](https://stripe.com/docs/api/payment_intents). The newly created SEPA Direct Debit [PaymentMethod](https://stripe.com/docs/api/payment_methods) will be attached to this customer.
interface ConfirmSofortPaymentOptions
interface ConfirmSofortPaymentOptions {}
An options object to control the behavior of
stripe.confirmSofortPayment
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect). Default istrue
.
interface ConfirmSofortSetupData
interface ConfirmSofortSetupData extends SetupIntentConfirmParams {}
Data to be sent with a
stripe.confirmSofortSetup
request. Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
interface ConfirmSofortSetupOptions
interface ConfirmSofortSetupOptions {}
An options object to control the behavior of
stripe.confirmSofortSetup
.
property handleActions
handleActions?: boolean;
Set this to
false
if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect). Default istrue
.
interface ConfirmUsBankAccountPaymentData
interface ConfirmUsBankAccountPaymentData extends PaymentIntentConfirmParams {}
property payment_method
payment_method?: string | Omit<CreatePaymentMethodUsBankAccountData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
.
interface ConfirmUsBankAccountSetupData
interface ConfirmUsBankAccountSetupData extends SetupIntentConfirmParams {}
property payment_method
payment_method?: string | Omit<CreatePaymentMethodUsBankAccountData, 'type'>;
Either the
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create aPaymentMethod
with. This field is optional if aPaymentMethod
has already been attached to thisSetupIntent
.
interface ConfirmWechatPayPaymentData
interface ConfirmWechatPayPaymentData extends PaymentIntentConfirmParams {}
Data to be sent with a
stripe.confirmWechatPayPayment
request. Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
property payment_method
payment_method?: string | Omit<CreatePaymentMethodWechatPayData, 'type'>;
The
id
of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods). This field is optional if aPaymentMethod
has already been attached to thisPaymentIntent
or a newPaymentMethod
will be created.
property payment_method_options
payment_method_options?: { /** * Configuration for this wechat payment. */ wechat_pay: { client?: 'web'; };};
An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
interface ConfirmWechatPayPaymentOptions
interface ConfirmWechatPayPaymentOptions {}
An options object to control the behavior of
stripe.confirmWechatPayPayment
.
property handleActions
handleActions: boolean;
This must be set to false, and you are responsible for handling the next_action after confirming the PaymentIntent.
interface CreatePaymentMethodAcssDebitData
interface CreatePaymentMethodAcssDebitData extends PaymentMethodCreateParams {}
property acss_debit
acss_debit?: { /** * Customer’s bank account number. */ account_number: string;
/** * Institution number of the customer’s bank. */ institution_number: string;
/** * Transit number of the customer’s bank. */ transit_number: string;};
Can be omitted as Stripe will help to collect bank account details and verification. Refer to our [integration guide](https://stripe.com/docs/payments/acss-debit/accept-a-payment) for more details.
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails;
The customer's billing details.
name
,email
, andaddress
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'acss_debit';
interface CreatePaymentMethodAffirmData
interface CreatePaymentMethodAffirmData extends PaymentMethodCreateParams {}
interface CreatePaymentMethodAfterpayClearpayData
interface CreatePaymentMethodAfterpayClearpayData extends PaymentMethodCreateParams {}
property afterpay_clearpay
afterpay_clearpay?: {};
Can be omitted as there are no AfterpayClearpay-specific fields.
property type
type: 'afterpay_clearpay';
interface CreatePaymentMethodAlipayData
interface CreatePaymentMethodAlipayData extends PaymentMethodCreateParams {}
property type
type: 'alipay';
interface CreatePaymentMethodAuBecsDebitData
interface CreatePaymentMethodAuBecsDebitData extends PaymentMethodCreateParams {}
property au_becs_debit
au_becs_debit: | StripeAuBankAccountElement | { /** * A BSB number. */ bsb_number: string;
/** * An account number. */ account_number: string; };
Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information.
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { name: string; email: string;};
The customer's billing details.
name
andemail
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'au_becs_debit';
Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information.
interface CreatePaymentMethodBacsDebitData
interface CreatePaymentMethodBacsDebitData extends PaymentMethodCreateParams {}
property bacs_debit
bacs_debit: { /** * A sort code. */ sort_code: string;
/** * An account number. */ account_number: string;};
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { name: string; email: string; address: PaymentMethodCreateParams.BillingDetails.Address & { line1: string; city: string; country: string; postal_code: string; };};
The customer's billing details.
name
,email
, andaddress
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'bacs_debit';
interface CreatePaymentMethodBancontactData
interface CreatePaymentMethodBancontactData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { name: string;};
The customer's billing details.
name
is required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'bancontact';
interface CreatePaymentMethodBoletoData
interface CreatePaymentMethodBoletoData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { email: string; name: string; address: PaymentMethodCreateParams.BillingDetails.Address & { line1: string; city: string; postal_code: string; state: string; country: string; };};
The customer's billing details.
name
,email
, and fulladdress
is required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property boleto
boleto: { tax_id: string;};
property type
type: 'boleto';
interface CreatePaymentMethodCardData
interface CreatePaymentMethodCardData extends PaymentMethodCreateParams {}
interface CreatePaymentMethodCustomerBalanceData
interface CreatePaymentMethodCustomerBalanceData extends PaymentMethodCreateParams {}
property customer_balance
customer_balance: Record<string, never>;
Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information.
interface CreatePaymentMethodEpsData
interface CreatePaymentMethodEpsData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { name: string;};
The customer's billing details.
name
is required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property eps
eps: | StripeEpsBankElement | { /** * The customer's bank */ bank?: string; };
property type
type: 'eps';
interface CreatePaymentMethodFpxData
interface CreatePaymentMethodFpxData extends PaymentMethodCreateParams {}
interface CreatePaymentMethodGiropayData
interface CreatePaymentMethodGiropayData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { name: string;};
The customer's billing details.
name
is required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'giropay';
interface CreatePaymentMethodGrabPayData
interface CreatePaymentMethodGrabPayData extends PaymentMethodCreateParams {}
interface CreatePaymentMethodIdealData
interface CreatePaymentMethodIdealData extends PaymentMethodCreateParams {}
interface CreatePaymentMethodKlarnaData
interface CreatePaymentMethodKlarnaData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { address: PaymentMethodCreateParams.BillingDetails.Address & { country: string; };};
The customer's billing details.
address.country
is required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'klarna';
Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information.
interface CreatePaymentMethodKonbiniData
interface CreatePaymentMethodKonbiniData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { email: string; name: string;};
The customer's billing details.
email
andname
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'konbini';
interface CreatePaymentMethodOxxoData
interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { email: string; name: string;};
The customer's billing details.
email
andname
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'oxxo';
interface CreatePaymentMethodP24Data
interface CreatePaymentMethodP24Data extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { email: string;};
The customer's billing details.
email
is required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property p24
p24?: | StripeP24BankElement | { /** * The customer's bank. */ bank?: string; };
property type
type: 'p24';
interface CreatePaymentMethodPayNowData
interface CreatePaymentMethodPayNowData extends PaymentMethodCreateParams {}
property type
type: 'paynow';
interface CreatePaymentMethodPayPalData
interface CreatePaymentMethodPayPalData extends PaymentMethodCreateParams {}
property type
type: 'paypal';
interface CreatePaymentMethodPromptPayData
interface CreatePaymentMethodPromptPayData extends PaymentMethodCreateParams {}
property type
type: 'promptpay';
interface CreatePaymentMethodSepaDebitData
interface CreatePaymentMethodSepaDebitData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails & { name: string; email: string;};
The customer's billing details.
name
andemail
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property sepa_debit
sepa_debit: | StripeIbanElement | { /** * An IBAN account number. */ iban: string; };
property type
type: 'sepa_debit';
interface CreatePaymentMethodSofortData
interface CreatePaymentMethodSofortData extends PaymentMethodCreateParams {}
property billing_details
billing_details?: PaymentMethodCreateParams.BillingDetails;
The customer's billing details. Required when
setup_future_usage
is set tooff_session
.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property sofort
sofort: { /** * The country code where customer's bank is located. */ country: string;};
property type
type: 'sofort';
interface CreatePaymentMethodUsBankAccountData
interface CreatePaymentMethodUsBankAccountData extends PaymentMethodCreateParams {}
property billing_details
billing_details: PaymentMethodCreateParams.BillingDetails;
The customer's billing details.
name
,email
, andaddress
are required.https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
property type
type: 'us_bank_account';
property us_bank_account
us_bank_account: { /** * Customer’s 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;};
Can be omitted as Stripe will help to collect bank account details and verification. Refer to our [integration guide](https://stripe.com/docs/payments/acss-debit/accept-a-payment) for more details.
interface CreatePaymentMethodWechatPayData
interface CreatePaymentMethodWechatPayData extends PaymentMethodCreateParams {}
property type
type: 'wechat_pay';
Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information.
interface CreateSourceData
interface CreateSourceData extends SourceCreateParams {}
A required object containing the
type
ofSource
you want to create, and any additional payment information that you have collected. See the [Sources API](https://stripe.com/docs/api#create_source) reference for details.You cannot pass raw card information to
stripe.createSource(sourceData)
. Instead, you must gather card information in anElement
and usestripe.createSource(element, sourceData)
. You can also pass an existing card token to convert it into aSource
object.
property bancontact
bancontact?: CreateSourceData.DeprecatedMethodData;
property ideal
ideal?: CreateSourceData.DeprecatedMethodData;
property klarna
klarna?: CreateSourceData.DeprecatedMethodData;
property sepa_debit
sepa_debit?: CreateSourceData.DeprecatedMethodData;
property sofort
sofort?: CreateSourceData.DeprecatedMethodData;
interface CreateTokenBankAccountData
interface CreateTokenBankAccountData {}
property account_holder_name
account_holder_name?: string;
property account_holder_type
account_holder_type: string;
property account_number
account_number: string;
property account_type
account_type?: string;
property country
country: string;
property currency
currency: string;
property routing_number
routing_number?: string;
interface CreateTokenCardData
interface CreateTokenCardData {}
An object containing additional payment information you might have collected.
Although these fields are optional, we highly recommend collecting name and address. This information can be used to perform a number of verifications, such as CVC, ZIP, and address verification. Radar includes built-in rules that can block payments where the ZIP or CVC verifications with the cardholder’s bank failed.
property address_city
address_city?: string;
property address_country
address_country?: string;
A two character country code (for example,
US
).
property address_line1
address_line1?: string;
property address_line2
address_line2?: string;
property address_state
address_state?: string;
property address_zip
address_zip?: string;
property currency
currency?: string;
Required in order to [add the card to a Connect account](https://stripe.com/docs/connect/payouts#bank-accounts) (in all other cases, this parameter is not used). Currently, the only supported currency for debit card payouts is
usd
.
property name
name?: string;
interface CreateTokenIbanData
interface CreateTokenIbanData {}
property account_holder_name
account_holder_name: string;
property account_holder_type
account_holder_type: string;
property currency
currency: string;
Three character currency code (e.g.,
eur
).
interface CreateTokenPiiData
interface CreateTokenPiiData {}
property personal_id_number
personal_id_number: string;
interface CssFontSource
interface CssFontSource {}
property cssSrc
cssSrc: string;
A relative or absolute URL pointing to a CSS file with [@font-face](https://developer.mozilla.org/en/docs/Web/CSS/@font-face) definitions, for example:
https://fonts.googleapis.com/css?family=Open+Sans
Note that if you are using a [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) (CSP), [additional directives](https://stripe.com/docs/security#content-security-policy) may be necessary.
interface CustomerOptions
interface CustomerOptions {}
property customer
customer: string;
The Customer id.
property ephemeralKey
ephemeralKey: string;
The ephemeral key for a Customer that grants temporary access to Customer data.
interface CustomFontSource
interface CustomFontSource {}
property display
display?: string;
A valid [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) value.
property family
family: string;
The name to give the font
property src
src: string;
A valid [src](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src) value pointing to your custom font file. This is usually (though not always) a link to a file with a
.woff
,.otf
, or.svg
suffix.
property style
style?: 'normal' | 'italic' | 'oblique';
Defaults to
normal
.
property unicodeRange
unicodeRange?: string;
A valid [unicode-range](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) value.
property weight
weight?: string;
A valid [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight), as a string.
interface FieldsOption
interface FieldsOption {}
property billingDetails
billingDetails?: | FieldOption | { name?: FieldOption; email?: FieldOption; phone?: FieldOption; address?: | FieldOption | { country?: FieldOption; postalCode?: FieldOption; state?: FieldOption; city?: FieldOption; line1?: FieldOption; line2?: FieldOption; }; };
interface JapanAddressParam
interface JapanAddressParam {}
property city
city?: string;
City or ward.
property country
country?: string;
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
property line1
line1?: string;
Block or building number.
property line2
line2?: string;
Building details.
property postal_code
postal_code?: string;
Postal code.
property state
state?: string;
Prefecture.
property town
town?: string;
Town or cho-me.
interface Metadata
interface Metadata {}
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.
index signature
[name: string]: string;
interface MetadataParam
interface MetadataParam {}
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.
index signature
[name: string]: string | number | null;
interface Order
interface Order {}
The Order object.
property amount_subtotal
amount_subtotal: 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).
property amount_total
amount_total: number;
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).
property billing_details
billing_details: Order.Billing | null;
Customer billing details associated with the order.
property created
created: number;
Time at which the object was created. Measured in seconds since the Unix epoch.
property currency
currency: string;
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).
property id
id: string;
Unique identifier for the object.
property livemode
livemode: boolean;
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode.
property object
object: 'order';
String representing the object's type. Objects of the same type share the same value.
property payment
payment: Order.Payment;
Payment information associated with the order.
property shipping_details
shipping_details: Order.Shipping | null;
Customer shipping information associated with the order.
property status
status: Order.Status;
The overall status of the order.
interface PaymentIntent
interface PaymentIntent {}
The PaymentIntent object.
property amount
amount: number;
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).
property canceled_at
canceled_at: number | null;
Populated when
status
iscanceled
, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
property cancellation_reason
cancellation_reason: PaymentIntent.CancellationReason | null;
Reason for cancellation of this PaymentIntent, either user-provided (
duplicate
,fraudulent
,requested_by_customer
, orabandoned
) or generated by Stripe internally (failed_invoice
,void_invoice
, orautomatic
).
property capture_method
capture_method: PaymentIntent.CaptureMethod;
Controls when the funds will be captured from the customer's account.
property client_secret
client_secret: string | null;
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.
property confirmation_method
confirmation_method: PaymentIntent.ConfirmationMethod;
property created
created: number;
Time at which the object was created. Measured in seconds since the Unix epoch.
property currency
currency: string;
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).
property description
description: string | null;
An arbitrary string attached to the object. Often useful for displaying to users.
property id
id: string;
Unique identifier for the object.
property last_payment_error
last_payment_error: PaymentIntent.LastPaymentError | null;
The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
property livemode
livemode: boolean;
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode.
property next_action
next_action: PaymentIntent.NextAction | null;
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.
property object
object: 'payment_intent';
String representing the object's type. Objects of the same type share the same value.
property payment_method
payment_method: string | null | PaymentMethod;
ID of the payment method used in this PaymentIntent, or the PaymentMethod itself if this field is expanded.
property payment_method_types
payment_method_types: Array<string>;
The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
property receipt_email
receipt_email: string | null;
Email address that the receipt for the resulting payment will be sent to.
property setup_future_usage
setup_future_usage: PaymentIntent.SetupFutureUsage | 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), usingoff_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.
property shipping
shipping: PaymentIntent.Shipping | null;
Shipping information for this PaymentIntent.
property status
status: PaymentIntent.Status;
Status of this PaymentIntent, one of
requires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
interface PaymentIntentConfirmParams
interface PaymentIntentConfirmParams {}
property mandate_data
mandate_data?: { [k: string]: any };
This hash contains details about the Mandate to create
property receipt_email
receipt_email?: string | '';
Email address that the receipt for the resulting payment will be sent to.
property return_url
return_url?: 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.
property save_payment_method
save_payment_method?: boolean;
If the PaymentIntent has a
payment_method
and acustomer
or if you're attaching a payment method to the PaymentIntent in this request, you can passsave_payment_method=true
to save the payment method to the customer. Defaults tofalse
.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).
property setup_future_usage
setup_future_usage?: PaymentIntentConfirmParams.SetupFutureUsage | 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.
Use
on_session
if you intend to only reuse the payment method when your customer is present in your checkout flow. Useoff_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), usingoff_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 fromon_session
tooff_session
.
property shipping
shipping?: PaymentIntentConfirmParams.Shipping | null;
Shipping information for this PaymentIntent.
interface PaymentMethod
interface PaymentMethod {}
The PaymentMethod object.
property acss_debit
acss_debit?: PaymentMethod.AcssDebit;
property affirm
affirm?: PaymentMethod.Affirm;
property afterpay_clearpay
afterpay_clearpay?: PaymentMethod.AfterpayClearpay;
property au_becs_debit
au_becs_debit?: PaymentMethod.AuBecsDebit;
property billing_details
billing_details: PaymentMethod.BillingDetails;
property card
card?: PaymentMethod.Card;
property card_present
card_present?: PaymentMethod.CardPresent;
property created
created: number;
Time at which the object was created. Measured in seconds since the Unix epoch.
property customer
customer: string | null;
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.
property eps
eps?: PaymentMethod.Eps;
property fpx
fpx?: PaymentMethod.Fpx;
property grabpay
grabpay?: PaymentMethod.GrabPay;
property id
id: string;
Unique identifier for the object.
property ideal
ideal?: PaymentMethod.Ideal;
property livemode
livemode: boolean;
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode.
property metadata
metadata: Metadata;
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.
property object
object: 'payment_method';
String representing the object's type. Objects of the same type share the same value.
property p24
p24?: PaymentMethod.P24;
property sepa_debit
sepa_debit?: PaymentMethod.SepaDebit;
property type
type: 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.
property us_bank_account
us_bank_account?: PaymentMethod.UsBankAccount;
interface PaymentMethodCreateParams
interface PaymentMethodCreateParams {}
property billing_details
billing_details?: PaymentMethodCreateParams.BillingDetails;
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
property metadata
metadata?: MetadataParam;
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
.
property payment_method
payment_method?: string;
The PaymentMethod to share.
property type
type?: 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)
interface PaymentRequest
interface PaymentRequest {}
property abort
abort: () => void;
Closes the browser’s payment interface.
property isShowing
isShowing: () => boolean;
true
if the browser’s payment interface is showing. When using thePaymentRequestButtonElement
, this is called for you automatically.
method canMakePayment
canMakePayment: () => Promise<CanMakePaymentResult | null>;
Returns a
Promise
that resolves with a truthy value if an enabled wallet is ready to pay. If no wallet is available, it resolves withnull
.
method off
off: { ( eventType: 'token', handler?: (event: PaymentRequestTokenEvent) => any ): this; ( eventType: 'paymentmethod', handler?: (event: PaymentRequestPaymentMethodEvent) => any ): this; ( eventType: 'source', handler?: (event: PaymentRequestSourceEvent) => any ): this; (eventType: 'cancel', handler?: () => any): this; ( eventType: 'shippingaddresschange', handler?: (event: PaymentRequestShippingAddressEvent) => any ): this; ( eventType: 'shippingoptionchange', handler?: (event: PaymentRequestShippingOptionEvent) => any ): this;};
method on
on: { ( eventType: 'token', handler: (event: PaymentRequestTokenEvent) => any ): this; ( eventType: 'paymentmethod', handler: (event: PaymentRequestPaymentMethodEvent) => any ): this; ( eventType: 'source', handler: (event: PaymentRequestSourceEvent) => any ): this; (eventType: 'cancel', handler: () => any): this; ( eventType: 'shippingaddresschange', handler: (event: PaymentRequestShippingAddressEvent) => any ): this; ( eventType: 'shippingoptionchange', handler: (event: PaymentRequestShippingOptionEvent) => any ): this;};
Stripe.js automatically creates a
Token
after the customer is done interacting with the browser’s payment interface. To access the createdToken
, listen for this event.Stripe.js automatically creates a
PaymentMethod
after the customer is done interacting with the browser’s payment interface. To access the createdPaymentMethod
, listen for this event.Stripe.js automatically creates a
Source
after the customer is done interacting with the browser’s payment interface. To access the createdSource
, listen for this event.The cancel event is emitted from a
PaymentRequest
when the browser's payment interface is dismissed.Note that in some browsers, the payment interface may be dismissed by the customer even after they authorize the payment. This means that you may receive a cancel event on your
PaymentRequest
object after receiving atoken
,paymentmethod
, orsource
event. If you’re using the cancel event as a hook for canceling the customer’s order, make sure you also refund the payment that you just created.The
shippingaddresschange
event is emitted from aPaymentRequest
whenever the customer selects a new address in the browser's payment interface.The
shippingoptionchange
event is emitted from aPaymentRequest
whenever the customer selects a new shipping option in the browser's payment interface.
method once
once: { ( eventType: 'token', handler: (event: PaymentRequestTokenEvent) => any ): this; ( eventType: 'paymentmethod', handler: (event: PaymentRequestPaymentMethodEvent) => any ): this; ( eventType: 'source', handler: (event: PaymentRequestSourceEvent) => any ): this; (eventType: 'cancel', handler: () => any): this; ( eventType: 'shippingaddresschange', handler: (event: PaymentRequestShippingAddressEvent) => any ): this; ( eventType: 'shippingoptionchange', handler: (event: PaymentRequestShippingOptionEvent) => any ): this;};
method show
show: () => void;
Shows the browser’s payment interface. When using the
PaymentRequestButtonElement
, this is called for you automatically. This method must be called as the result of a user interaction (for example, in a click handler).
method update
update: (options: PaymentRequestUpdateOptions) => void;
PaymentRequest
instances can be updated with an options object.paymentRequest.update
can only be called when the browser payment interface is not showing. Listen to the [click](https://stripe.com/docs/js/element/events) and [cancel](https://stripe.com/docs/js/element/events) events to detect if the payment interface has been initiated. To update thePaymentRequest
right before the payment interface is initiated, callpaymentRequest.update
in your click event handler.
interface PaymentRequestEvent
interface PaymentRequestEvent {}
property complete
complete: (status: PaymentRequestCompleteStatus) => void;
Call this function with a
CompleteStatus
when you have processed the token data provided by the API. Note that you must must call complete within 30 seconds.
property methodName
methodName: string;
Deprecated
Use walletName instead.
property payerEmail
payerEmail?: string;
The customer's email. Only present if it was explicitly asked for [creating the PaymentRequest object](https://stripe.com/docs/js/payment_request/create).
property payerName
payerName?: string;
The customer's name. Only present if it was explicitly asked for [creating the PaymentRequest object](https://stripe.com/docs/js/payment_request/create).
property payerPhone
payerPhone?: string;
The customer's phone. Only present if it was explicitly asked for [creating the PaymentRequest object](https://stripe.com/docs/js/payment_request/create).
property shippingAddress
shippingAddress?: PaymentRequestShippingAddress;
The final
ShippingAddress
the customer selected. Only present whenrequestShipping
istrue
when [creating the PaymentRequest object](https://stripe.com/docs/js/payment_request/create), and you've supplied at least oneShippingOption
.
property shippingOption
shippingOption?: PaymentRequestShippingOption;
The final
ShippingOption
the customer selected. Only present whenrequestShipping
istrue
when [creating the PaymentRequest object](https://stripe.com/docs/js/payment_request/create), and you've supplied at least oneShippingOption
.
property walletName
walletName: PaymentRequestWallet | string;
The unique name of the wallet the customer chose to authorize payment. For example,
browserCard
.
interface PaymentRequestItem
interface PaymentRequestItem {}
A
PaymentRequestItem
object is used to configure aPaymentRequest
.
property amount
amount: number;
The amount in the currency's subunit (e.g. cents, yen, etc.)
property label
label: string;
A name that the browser shows the customer in the payment interface.
property pending
pending?: boolean;
If you might change this amount later (for example, after you have calcluated shipping costs), set this to
true
. Note that browsers treat this as a hint for how to display things, and not necessarily as something that will prevent submission.
interface PaymentRequestOptions
interface PaymentRequestOptions {}
An set of options to create this
PaymentRequest
instance with. These options can be updated usingpaymentRequest.update
.
property country
country: string;
The two-letter country code of your Stripe account (e.g.,
US
).
property currency
currency: string;
Three character currency code (e.g.,
usd
).
property disableWallets
disableWallets?: PaymentRequestWallet[];
An array of wallet strings. Can be one or more of
applePay
,googlePay
andbrowserCard
. Use this option to disable Google Pay, Apple Pay and/or browser-saved cards.
property displayItems
displayItems?: PaymentRequestItem[];
An array of PaymentRequestItem objects. These objects are shown as line items in the browser’s payment interface. Note that the sum of the line item amounts does not need to add up to the
total
amount above.
property requestPayerEmail
requestPayerEmail?: boolean;
See the
requestPayerName
option.
property requestPayerName
requestPayerName?: boolean;
By default, the browser's payment interface only asks the customer for actual payment information. A customer name can be collected by setting this option to
true
. This collected name will appears in thePaymentRequestEvent
object.We highly recommend you collect at least one of name, email, or phone as this also results in collection of billing address for Apple Pay. The billing address can be used to perform address verification and block fraudulent payments. For all other payment methods, the billing address is automatically collected when available.
property requestPayerPhone
requestPayerPhone?: boolean;
See the
requestPayerName
option.
property requestShipping
requestShipping?: boolean;
Collect shipping address by setting this option to
true
. The address appears in thePaymentRequestEvent
.You must also supply a valid
PaymentRequestShippingOption
to theshippingOptions
property. This can be up front at the timestripe.paymentRequest
is called, or in response to ashippingaddresschange
event using theupdateWith
callback.
property shippingOptions
shippingOptions?: PaymentRequestShippingOption[];
An array of
ShippingOption
objects. The first shipping option listed appears in the browser payment interface as the default option.