View Source Stripe.PaymentIntent (stripity_stripe v3.3.1)
A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.
A PaymentIntent transitions through multiple statuses throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.
Related guide: Payment Intents API
Summary
Types
Provides industry-specific information about the amount.
When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
Configuration for the bank transfer funding type, if the funding_type is set to bank_transfer.
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
If this is a boleto PaymentMethod, this hash contains details about the Boleto payment method.
This sub-hash contains line item details that are specific to card payment method."
This sub-hash contains line item details that are specific to card_present payment method."
Cartes Bancaires-specific 3DS fields.
This hash contains details about the customer acceptance of the Mandate.
Customer's date of birth
If this is an eps PaymentMethod, this hash contains details about the EPS payment method.
Configuration for the eu_bank_transfer funding type.
Provide filters for the linked accounts that the customer can select for the payment method.
Additional fields for Financial Connections Session creation
Automations to be run during the PaymentIntent lifecycle
If this is an ideal PaymentMethod, this hash contains details about the iDEAL payment method.
Arguments passed in automations
Installment configuration for payments attempted on this PaymentIntent.
This sub-hash contains line item details that are specific to klarna payment method."
Additional fields for Mandate creation
Network specific 3DS fields. Network specific arguments require an explicit card brand choice. The parameter `payment_method_options.card.network`` must be populated accordingly
Additional fields for network related functions
Describes the upcoming charge for this subscription.
On-demand details if setting up or charging an on-demand payment.
If this is a Mandate accepted online, this hash contains details about the online acceptance.
If this is a p24 PaymentMethod, this hash contains details about the P24 payment method.
Provides industry-specific information about the charge.
If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the payment_method property on the PaymentIntent.
Payment method-specific configuration for this PaymentIntent.
This sub-hash contains line item details that are specific to paypal payment method."
Options to configure Radar. See Radar Session for more information.
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
Shipping information for this PaymentIntent.
The payment_intent type.
Tax arguments for automations
If 3D Secure authentication was performed with a third-party provider, the authentication details to use for this payment.
The parameters that you can use to automatically create a Transfer. Learn more about the use case for connected accounts.
If this is an us_bank_account PaymentMethod, this hash contains details about the US bank account payment method.
Functions
Manually reconcile the remaining amount for a customer_balance PaymentIntent.
You can cancel a PaymentIntent object when it’s in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.
Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
Confirm that your customer intends to pay with current or providedpayment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.
Creates a PaymentIntent object.
Perform an incremental authorization on an eligiblePaymentIntent. To be eligible, the
PaymentIntent’s status must be requires_capture and
incremental_authorization_supported
must be true.
Returns a list of PaymentIntents.
Retrieves the details of a PaymentIntent that has previously been created.
Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.
Updates properties on a PaymentIntent object without confirming.
Verifies microdeposits on a PaymentIntent object.
Types
@type acss_debit() :: %{ optional(:mandate_options) => mandate_options(), optional(:setup_future_usage) => :none | :off_session | :on_session, optional(:target_date) => binary(), optional(:verification_method) => :automatic | :instant | :microdeposits }
@type affirm() :: %{ optional(:capture_method) => :manual, optional(:preferred_locale) => binary(), optional(:setup_future_usage) => :none }
@type afterpay_clearpay() :: %{ optional(:capture_method) => :manual, optional(:reference) => binary(), optional(:setup_future_usage) => :none }
@type alipay() :: %{optional(:setup_future_usage) => :none | :off_session}
@type alma() :: %{optional(:capture_method) => :manual}
@type amazon_pay() :: %{
optional(:capture_method) => :manual,
optional(:setup_future_usage) => :none | :off_session
}
@type amount_details() :: %{ optional(:discount_amount) => integer() | binary(), optional(:line_items) => [line_items()] | binary(), optional(:shipping) => shipping() | binary(), optional(:tax) => tax() | binary() }
Provides industry-specific information about the amount.
@type au_becs_debit() :: %{ optional(:setup_future_usage) => :none | :off_session | :on_session, optional(:target_date) => binary() }
@type automatic_payment_methods() :: %{ optional(:allow_redirects) => :always | :never, optional(:enabled) => boolean() }
When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
@type bacs_debit() :: %{ optional(:mandate_options) => mandate_options(), optional(:setup_future_usage) => :none | :off_session | :on_session, optional(:target_date) => binary() }
@type bancontact() :: %{
optional(:preferred_language) => :de | :en | :fr | :nl,
optional(:setup_future_usage) => :none | :off_session
}
@type bank_transfer() :: %{ optional(:eu_bank_transfer) => eu_bank_transfer(), optional(:requested_address_types) => [ :aba | :iban | :sepa | :sort_code | :spei | :swift | :zengin ], optional(:type) => :eu_bank_transfer | :gb_bank_transfer | :jp_bank_transfer | :mx_bank_transfer | :us_bank_transfer }
Configuration for the bank transfer funding type, if the funding_type is set to bank_transfer.
@type billie() :: %{optional(:capture_method) => :manual}
@type billing_details() :: %{ optional(:address) => address() | binary(), optional(:email) => binary() | binary(), optional(:name) => binary() | binary(), optional(:phone) => binary() | binary(), optional(:tax_id) => binary() }
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
@type blik() :: %{optional(:code) => binary(), optional(:setup_future_usage) => :none}
@type boleto() :: %{optional(:tax_id) => binary()}
If this is a boleto PaymentMethod, this hash contains details about the Boleto payment method.
@type card() :: %{optional(:commodity_code) => binary()}
This sub-hash contains line item details that are specific to card payment method."
@type card_present() :: %{optional(:commodity_code) => binary()}
This sub-hash contains line item details that are specific to card_present payment method."
@type cartes_bancaires() :: %{ optional(:cb_avalgo) => :"0" | :"1" | :"2" | :"3" | :"4" | :A, optional(:cb_exemption) => binary(), optional(:cb_score) => integer() }
Cartes Bancaires-specific 3DS fields.
@type cashapp() :: %{
optional(:capture_method) => :manual,
optional(:setup_future_usage) => :none | :off_session | :on_session
}
@type crypto() :: %{optional(:setup_future_usage) => :none}
@type customer_acceptance() :: %{ optional(:accepted_at) => integer(), optional(:offline) => map(), optional(:online) => online(), optional(:type) => :offline | :online }
This hash contains details about the customer acceptance of the Mandate.
@type customer_balance() :: %{ optional(:bank_transfer) => bank_transfer(), optional(:funding_type) => :bank_transfer, optional(:setup_future_usage) => :none }
@type dob() :: %{ optional(:day) => integer(), optional(:month) => integer(), optional(:year) => integer() }
Customer's date of birth
@type eps() :: %{
optional(:bank) =>
:arzte_und_apotheker_bank
| :austrian_anadi_bank_ag
| :bank_austria
| :bankhaus_carl_spangler
| :bankhaus_schelhammer_und_schattera_ag
| :bawag_psk_ag
| :bks_bank_ag
| :brull_kallmus_bank_ag
| :btv_vier_lander_bank
| :capital_bank_grawe_gruppe_ag
| :deutsche_bank_ag
| :dolomitenbank
| :easybank_ag
| :erste_bank_und_sparkassen
| :hypo_alpeadriabank_international_ag
| :hypo_bank_burgenland_aktiengesellschaft
| :hypo_noe_lb_fur_niederosterreich_u_wien
| :hypo_oberosterreich_salzburg_steiermark
| :hypo_tirol_bank_ag
| :hypo_vorarlberg_bank_ag
| :marchfelder_bank
| :oberbank_ag
| :raiffeisen_bankengruppe_osterreich
| :schoellerbank_ag
| :sparda_bank_wien
| :volksbank_gruppe
| :volkskreditbank_ag
| :vr_bank_braunau
}
If this is an eps PaymentMethod, this hash contains details about the EPS payment method.
@type eu_bank_transfer() :: %{optional(:country) => binary()}
Configuration for the eu_bank_transfer funding type.
@type filters() :: %{optional(:account_subcategories) => [:checking | :savings]}
Provide filters for the linked accounts that the customer can select for the payment method.
@type financial_connections() :: %{ optional(:filters) => filters(), optional(:permissions) => [ :balances | :ownership | :payment_method | :transactions ], optional(:prefetch) => [:balances | :ownership | :transactions], optional(:return_url) => binary() }
Additional fields for Financial Connections Session creation
@type fpx() :: %{optional(:setup_future_usage) => :none}
@type giropay() :: %{optional(:setup_future_usage) => :none}
@type grabpay() :: %{optional(:setup_future_usage) => :none}
@type hooks() :: %{optional(:inputs) => inputs()}
Automations to be run during the PaymentIntent lifecycle
@type ideal() :: %{
optional(:bank) =>
:abn_amro
| :asn_bank
| :bunq
| :buut
| :finom
| :handelsbanken
| :ing
| :knab
| :moneyou
| :n26
| :nn
| :rabobank
| :regiobank
| :revolut
| :sns_bank
| :triodos_bank
| :van_lanschot
| :yoursafe
}
If this is an ideal PaymentMethod, this hash contains details about the iDEAL payment method.
@type inputs() :: %{optional(:tax) => tax()}
Arguments passed in automations
Installment configuration for payments attempted on this PaymentIntent.
For more information, see the installments integration guide.
@type kakao_pay() :: %{
optional(:capture_method) => :manual,
optional(:setup_future_usage) => :none | :off_session
}
@type klarna() :: %{ optional(:image_url) => binary(), optional(:product_url) => binary(), optional(:reference) => binary(), optional(:subscription_reference) => binary() }
This sub-hash contains line item details that are specific to klarna payment method."
@type kr_card() :: %{
optional(:capture_method) => :manual,
optional(:setup_future_usage) => :none | :off_session
}
@type line_items() :: %{ optional(:discount_amount) => integer(), optional(:payment_method_options) => payment_method_options(), optional(:product_code) => binary(), optional(:product_name) => binary(), optional(:quantity) => integer(), optional(:tax) => tax(), optional(:unit_cost) => integer(), optional(:unit_of_measure) => binary() }
@type link() :: %{ optional(:capture_method) => :manual, optional(:persistent_token) => binary(), optional(:setup_future_usage) => :none | :off_session }
@type mandate_data() :: %{optional(:customer_acceptance) => customer_acceptance()}
@type mandate_options() :: %{ optional(:custom_mandate_url) => binary() | binary(), optional(:interval_description) => binary(), optional(:payment_schedule) => :combined | :interval | :sporadic, optional(:transaction_type) => :business | :personal }
Additional fields for Mandate creation
@type mb_way() :: %{optional(:setup_future_usage) => :none}
@type mobilepay() :: %{
optional(:capture_method) => :manual,
optional(:setup_future_usage) => :none
}
@type multibanco() :: %{optional(:setup_future_usage) => :none}
@type network_options() :: %{optional(:cartes_bancaires) => cartes_bancaires()}
Network specific 3DS fields. Network specific arguments require an explicit card brand choice. The parameter `payment_method_options.card.network`` must be populated accordingly
@type networks() :: %{optional(:requested) => [:ach | :us_domestic_wire]}
Additional fields for network related functions
Describes the upcoming charge for this subscription.
@type nz_bank_account() :: %{ optional(:setup_future_usage) => :none | :off_session | :on_session, optional(:target_date) => binary() }
@type on_demand() :: %{ optional(:average_amount) => integer(), optional(:maximum_amount) => integer(), optional(:minimum_amount) => integer(), optional(:purchase_interval) => :day | :month | :week | :year, optional(:purchase_interval_count) => integer() }
On-demand details if setting up or charging an on-demand payment.
If this is a Mandate accepted online, this hash contains details about the online acceptance.
@type oxxo() :: %{ optional(:expires_after_days) => integer(), optional(:setup_future_usage) => :none }
@type p24() :: %{
optional(:bank) =>
:alior_bank
| :bank_millennium
| :bank_nowy_bfg_sa
| :bank_pekao_sa
| :banki_spbdzielcze
| :blik
| :bnp_paribas
| :boz
| :citi_handlowy
| :credit_agricole
| :envelobank
| :etransfer_pocztowy24
| :getin_bank
| :ideabank
| :ing
| :inteligo
| :mbank_mtransfer
| :nest_przelew
| :noble_pay
| :pbac_z_ipko
| :plus_bank
| :santander_przelew24
| :tmobile_usbugi_bankowe
| :toyota_bank
| :velobank
| :volkswagen_bank
}
If this is a p24 PaymentMethod, this hash contains details about the P24 payment method.
@type payco() :: %{optional(:capture_method) => :manual}
@type payment_details() :: %{ optional(:customer_reference) => binary() | binary(), optional(:order_reference) => binary() | binary() }
Provides industry-specific information about the charge.
@type payment_method_data() :: %{ optional(:sofort) => sofort(), optional(:customer_balance) => map(), optional(:satispay) => map(), optional(:boleto) => boleto(), optional(:alipay) => map(), optional(:au_becs_debit) => au_becs_debit(), optional(:amazon_pay) => map(), optional(:metadata) => %{optional(binary()) => binary()}, optional(:bancontact) => map(), optional(:interac_present) => map(), optional(:bacs_debit) => bacs_debit(), optional(:affirm) => map(), optional(:billing_details) => billing_details(), optional(:mobilepay) => map(), optional(:pay_by_bank) => map(), optional(:nz_bank_account) => nz_bank_account(), optional(:grabpay) => map(), optional(:eps) => eps(), optional(:billie) => map(), optional(:ideal) => ideal(), optional(:pix) => map(), optional(:giropay) => map(), optional(:multibanco) => map(), optional(:revolut_pay) => map(), optional(:klarna) => klarna(), optional(:mb_way) => map(), optional(:twint) => map(), optional(:naver_pay) => naver_pay(), optional(:crypto) => map(), optional(:acss_debit) => acss_debit(), optional(:link) => map(), optional(:kr_card) => map(), optional(:konbini) => map(), optional(:blik) => map(), optional(:p24) => p24(), optional(:paypal) => map(), optional(:fpx) => fpx(), optional(:oxxo) => map(), optional(:paynow) => map(), optional(:alma) => map(), optional(:wechat_pay) => map(), optional(:promptpay) => map(), optional(:type) => :acss_debit | :affirm | :afterpay_clearpay | :alipay | :alma | :amazon_pay | :au_becs_debit | :bacs_debit | :bancontact | :billie | :blik | :boleto | :cashapp | :crypto | :customer_balance | :eps | :fpx | :giropay | :grabpay | :ideal | :kakao_pay | :klarna | :konbini | :kr_card | :link | :mb_way | :mobilepay | :multibanco | :naver_pay | :nz_bank_account | :oxxo | :p24 | :pay_by_bank | :payco | :paynow | :paypal | :pix | :promptpay | :revolut_pay | :samsung_pay | :satispay | :sepa_debit | :sofort | :swish | :twint | :us_bank_account | :wechat_pay | :zip, optional(:samsung_pay) => map(), optional(:kakao_pay) => map(), optional(:radar_options) => radar_options(), optional(:cashapp) => map(), optional(:sepa_debit) => sepa_debit(), optional(:afterpay_clearpay) => map(), optional(:payco) => map(), optional(:allow_redisplay) => :always | :limited | :unspecified, optional(:us_bank_account) => us_bank_account(), optional(:swish) => map(), optional(:zip) => map() }
If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the payment_method property on the PaymentIntent.
@type payment_method_options() :: %{ optional(:sofort) => sofort() | binary(), optional(:customer_balance) => customer_balance() | binary(), optional(:satispay) => satispay() | binary(), optional(:boleto) => boleto() | binary(), optional(:alipay) => alipay() | binary(), optional(:au_becs_debit) => au_becs_debit() | binary(), optional(:amazon_pay) => amazon_pay() | binary(), optional(:card_present) => card_present() | binary(), optional(:bancontact) => bancontact() | binary(), optional(:interac_present) => map() | binary(), optional(:bacs_debit) => bacs_debit() | binary(), optional(:affirm) => affirm() | binary(), optional(:mobilepay) => mobilepay() | binary(), optional(:pay_by_bank) => map() | binary(), optional(:nz_bank_account) => nz_bank_account() | binary(), optional(:grabpay) => grabpay() | binary(), optional(:eps) => eps() | binary(), optional(:billie) => billie() | binary(), optional(:ideal) => ideal() | binary(), optional(:pix) => pix() | binary(), optional(:giropay) => giropay() | binary(), optional(:multibanco) => multibanco() | binary(), optional(:revolut_pay) => revolut_pay() | binary(), optional(:klarna) => klarna() | binary(), optional(:card) => card() | binary(), optional(:mb_way) => mb_way() | binary(), optional(:twint) => twint() | binary(), optional(:naver_pay) => naver_pay() | binary(), optional(:crypto) => crypto() | binary(), optional(:acss_debit) => acss_debit() | binary(), optional(:link) => link() | binary(), optional(:kr_card) => kr_card() | binary(), optional(:konbini) => konbini() | binary(), optional(:blik) => blik() | binary(), optional(:p24) => p24() | binary(), optional(:paypal) => paypal() | binary(), optional(:fpx) => fpx() | binary(), optional(:oxxo) => oxxo() | binary(), optional(:paynow) => paynow() | binary(), optional(:alma) => alma() | binary(), optional(:wechat_pay) => wechat_pay() | binary(), optional(:promptpay) => promptpay() | binary(), optional(:samsung_pay) => samsung_pay() | binary(), optional(:kakao_pay) => kakao_pay() | binary(), optional(:cashapp) => cashapp() | binary(), optional(:sepa_debit) => sepa_debit() | binary(), optional(:afterpay_clearpay) => afterpay_clearpay() | binary(), optional(:payco) => payco() | binary(), optional(:us_bank_account) => us_bank_account() | binary(), optional(:swish) => swish() | binary(), optional(:zip) => zip() | binary() }
Payment method-specific configuration for this PaymentIntent.
@type paynow() :: %{optional(:setup_future_usage) => :none}
@type paypal() :: %{ optional(:category) => :digital_goods | :donation | :physical_goods, optional(:description) => binary(), optional(:sold_by) => binary() }
This sub-hash contains line item details that are specific to paypal payment method."
@type plan() :: %{ optional(:count) => integer(), optional(:interval) => :month, optional(:type) => :bonus | :fixed_count | :revolving }
@type promptpay() :: %{optional(:setup_future_usage) => :none}
@type radar_options() :: %{optional(:session) => binary()}
Options to configure Radar. See Radar Session for more information.
@type revolut_pay() :: %{
optional(:capture_method) => :manual,
optional(:setup_future_usage) => :none | :off_session
}
@type routing() :: %{optional(:requested_priority) => :domestic | :international}
Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
@type samsung_pay() :: %{optional(:capture_method) => :manual}
@type satispay() :: %{optional(:capture_method) => :manual}
@type sepa_debit() :: %{ optional(:mandate_options) => mandate_options(), optional(:setup_future_usage) => :none | :off_session | :on_session, optional(:target_date) => binary() }
@type shipping() :: %{ optional(:address) => address(), optional(:carrier) => binary(), optional(:name) => binary(), optional(:phone) => binary(), optional(:tracking_number) => binary() }
Shipping information for this PaymentIntent.
@type sofort() :: %{
optional(:preferred_language) => :de | :en | :es | :fr | :it | :nl | :pl,
optional(:setup_future_usage) => :none | :off_session
}
@type subscriptions() :: %{ optional(:interval) => :day | :month | :week | :year, optional(:interval_count) => integer(), optional(:name) => binary(), optional(:next_billing) => next_billing(), optional(:reference) => binary() }
@type t() :: %Stripe.PaymentIntent{ amount: integer(), amount_capturable: integer(), amount_details: term(), amount_received: integer(), application: (binary() | term()) | nil, application_fee_amount: integer() | nil, automatic_payment_methods: term() | nil, canceled_at: integer() | nil, cancellation_reason: binary() | nil, capture_method: binary(), client_secret: binary() | nil, confirmation_method: binary(), created: integer(), currency: binary(), customer: (binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t()) | nil, description: binary() | nil, excluded_payment_method_types: term() | nil, hooks: term(), id: binary(), last_payment_error: Stripe.ApiErrors.t() | nil, latest_charge: (binary() | Stripe.Charge.t()) | nil, livemode: boolean(), metadata: term(), next_action: term() | nil, object: binary(), on_behalf_of: (binary() | Stripe.Account.t()) | nil, payment_details: term(), payment_method: (binary() | Stripe.PaymentMethod.t()) | nil, payment_method_configuration_details: term() | nil, payment_method_options: term() | nil, payment_method_types: term(), presentment_details: term(), processing: term() | nil, receipt_email: binary() | nil, review: (binary() | Stripe.Review.t()) | nil, setup_future_usage: binary() | nil, shipping: term() | nil, source: (binary() | Stripe.PaymentSource.t() | Stripe.DeletedPaymentSource.t()) | nil, statement_descriptor: binary() | nil, statement_descriptor_suffix: binary() | nil, status: binary(), transfer_data: term() | nil, transfer_group: binary() | nil }
The payment_intent type.
amountAmount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (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. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).amount_capturableAmount that can be captured from this PaymentIntent.amount_detailsamount_receivedAmount that this PaymentIntent collects.applicationID of the Connect application that created the PaymentIntent.application_fee_amountThe amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents use case for connected accounts.automatic_payment_methodsSettings to configure compatible payment methods from the Stripe Dashboardcanceled_atPopulated whenstatusiscanceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.cancellation_reasonReason for cancellation of this PaymentIntent, either user-provided (duplicate,fraudulent,requested_by_customer, orabandoned) or generated by Stripe internally (failed_invoice,void_invoice,automatic, orexpired).capture_methodControls when the funds will be captured from the customer's account.client_secretThe 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, 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 and learn about how client_secret should be handled.
confirmation_methodDescribes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.createdTime at which the object was created. Measured in seconds since the Unix epoch.currencyThree-letter ISO currency code, in lowercase. Must be a supported currency.customerID of the Customer this PaymentIntent belongs to, if one exists.
Payment methods attached to other Customers cannot be used with this PaymentIntent.
If setup_future_usage is set and this PaymentIntent's payment method is not card_present, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is card_present and isn't a digital wallet, then a generated_card payment method representing the card is created and attached to the Customer instead.
descriptionAn arbitrary string attached to the object. Often useful for displaying to users.excluded_payment_method_typesThe list of payment method types to exclude from use with this payment.hooksidUnique identifier for the object.last_payment_errorThe payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.latest_chargeID of the latest Charge object created by this PaymentIntent. This property isnulluntil PaymentIntent confirmation is attempted.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadataSet 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. Learn more about storing information in metadata.next_actionIf present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.objectString representing the object's type. Objects of the same type share the same value.on_behalf_ofThe account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details.payment_detailspayment_methodID of the payment method used in this PaymentIntent.payment_method_configuration_detailsInformation about the payment method configuration used for this PaymentIntent.payment_method_optionsPayment-method-specific configuration for this PaymentIntent.payment_method_typesThe list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found here.presentment_detailsprocessingIf present, this property tells you about the processing state of the payment.receipt_emailEmail address that the receipt for the resulting payment will be sent to. Ifreceipt_emailis specified for a payment in live mode, a receipt will be sent regardless of your email settings.reviewID of the review associated with this PaymentIntent, if any.setup_future_usageIndicates that you intend to make future payments with this PaymentIntent's payment method.
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still attach the payment method to a Customer after the transaction completes.
If the payment method is card_present and isn't a digital wallet, Stripe creates and attaches a generated_card payment method representing the card to the Customer instead.
When processing card payments, Stripe uses setup_future_usage to help you comply with regional legislation and network rules, such as SCA.
shippingShipping information for this PaymentIntent.sourceThis is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.statement_descriptorText that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.
Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix instead.
statement_descriptor_suffixProvides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement.statusStatus of this PaymentIntent, one ofrequires_payment_method,requires_confirmation,requires_action,processing,requires_capture,canceled, orsucceeded. Read more about each PaymentIntent status.transfer_dataThe data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts.transfer_groupA string that identifies the resulting payment as part of a group. Learn more about the use case for connected accounts.
Tax arguments for automations
@type three_d_secure() :: %{ optional(:ares_trans_status) => :A | :C | :I | :N | :R | :U | :Y, optional(:cryptogram) => binary(), optional(:electronic_commerce_indicator) => :"01" | :"02" | :"05" | :"06" | :"07", optional(:exemption_indicator) => :low_risk | :none, optional(:network_options) => network_options(), optional(:requestor_challenge_indicator) => binary(), optional(:transaction_id) => binary(), optional(:version) => :"1.0.2" | :"2.1.0" | :"2.2.0" }
If 3D Secure authentication was performed with a third-party provider, the authentication details to use for this payment.
The parameters that you can use to automatically create a Transfer. Learn more about the use case for connected accounts.
@type twint() :: %{optional(:setup_future_usage) => :none}
@type us_bank_account() :: %{ optional(:account_holder_type) => :company | :individual, optional(:account_number) => binary(), optional(:account_type) => :checking | :savings, optional(:financial_connections_account) => binary(), optional(:routing_number) => binary() }
If this is an us_bank_account PaymentMethod, this hash contains details about the US bank account payment method.
@type wechat_pay() :: %{ optional(:app_id) => binary(), optional(:client) => :android | :ios | :web, optional(:setup_future_usage) => :none }
@type zip() :: %{optional(:setup_future_usage) => :none}
Functions
@spec apply_customer_balance( intent :: binary(), params :: %{ optional(:amount) => integer(), optional(:currency) => binary(), optional(:expand) => [binary()] }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Manually reconcile the remaining amount for a customer_balance PaymentIntent.
Details
- Method:
post - Path:
/v1/payment_intents/{intent}/apply_customer_balance
@spec cancel( intent :: binary(), params :: %{ optional(:cancellation_reason) => :abandoned | :duplicate | :fraudulent | :requested_by_customer, optional(:expand) => [binary()] }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
You can cancel a PaymentIntent object when it’s in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.
After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.
Details
- Method:
post - Path:
/v1/payment_intents/{intent}/cancel
@spec capture( intent :: binary(), params :: %{ optional(:amount_details) => amount_details(), optional(:amount_to_capture) => integer(), optional(:application_fee_amount) => integer(), optional(:expand) => [binary()], optional(:final_capture) => boolean(), optional(:hooks) => hooks(), optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:payment_details) => payment_details() | binary(), optional(:statement_descriptor) => binary(), optional(:statement_descriptor_suffix) => binary(), optional(:transfer_data) => transfer_data() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
Learn more about separate authorization and capture.
Details
- Method:
post - Path:
/v1/payment_intents/{intent}/capture
@spec confirm( intent :: binary(), params :: %{ optional(:amount_details) => amount_details() | binary(), optional(:capture_method) => :automatic | :automatic_async | :manual, optional(:confirmation_token) => binary(), optional(:error_on_requires_action) => boolean(), optional(:excluded_payment_method_types) => [ :acss_debit | :affirm | :afterpay_clearpay | :alipay | :alma | :amazon_pay | :au_becs_debit | :bacs_debit | :bancontact | :billie | :blik | :boleto | :card | :cashapp | :crypto | :customer_balance | :eps | :fpx | :giropay | :grabpay | :ideal | :kakao_pay | :klarna | :konbini | :kr_card | :mb_way | :mobilepay | :multibanco | :naver_pay | :nz_bank_account | :oxxo | :p24 | :pay_by_bank | :payco | :paynow | :paypal | :pix | :promptpay | :revolut_pay | :samsung_pay | :satispay | :sepa_debit | :sofort | :swish | :twint | :us_bank_account | :wechat_pay | :zip ] | binary(), optional(:expand) => [binary()], optional(:hooks) => hooks(), optional(:mandate) => binary(), optional(:mandate_data) => mandate_data() | binary() | mandate_data(), optional(:off_session) => boolean() | :one_off | :recurring, optional(:payment_details) => payment_details() | binary(), optional(:payment_method) => binary(), optional(:payment_method_data) => payment_method_data(), optional(:payment_method_options) => payment_method_options(), optional(:payment_method_types) => [binary()], optional(:radar_options) => radar_options(), optional(:receipt_email) => binary() | binary(), optional(:return_url) => binary(), optional(:setup_future_usage) => :off_session | :on_session, optional(:shipping) => shipping() | binary(), optional(:use_stripe_sdk) => boolean() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Confirm that your customer intends to pay with current or providedpayment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.
If the selected payment method requires additional authentication steps, thePaymentIntent will transition to the requires_action status and
suggest additional actions via next_action. If payment fails,
the PaymentIntent transitions to the requires_payment_method status or the
canceled status if the confirmation limit is reached. If
payment succeeds, the PaymentIntent will transition to the succeeded
status (or requires_capture, if capture_method is set to manual).
If the confirmation_method is automatic, payment may be attemptedusing our client SDKs
and the PaymentIntent’s client_secret.
After next_actions are handled by the client, no additional
confirmation is required to complete the payment.
If the confirmation_method is manual, all payment attempts must beinitiated using a secret key.
If any actions are required for the payment, the PaymentIntent willreturn to the requires_confirmation state
after those actions are completed. Your server needs to then
explicitly re-confirm the PaymentIntent to initiate the next payment
attempt.
There is a variable upper limit on how many times a PaymentIntent can be confirmed.After this limit is reached, any further calls to this endpoint will
transition the PaymentIntent to the canceled state.
@spec create( params :: %{ optional(:confirmation_method) => :automatic | :manual, optional(:mandate) => binary(), optional(:setup_future_usage) => :off_session | :on_session, optional(:excluded_payment_method_types) => [ :acss_debit | :affirm | :afterpay_clearpay | :alipay | :alma | :amazon_pay | :au_becs_debit | :bacs_debit | :bancontact | :billie | :blik | :boleto | :card | :cashapp | :crypto | :customer_balance | :eps | :fpx | :giropay | :grabpay | :ideal | :kakao_pay | :klarna | :konbini | :kr_card | :mb_way | :mobilepay | :multibanco | :naver_pay | :nz_bank_account | :oxxo | :p24 | :pay_by_bank | :payco | :paynow | :paypal | :pix | :promptpay | :revolut_pay | :samsung_pay | :satispay | :sepa_debit | :sofort | :swish | :twint | :us_bank_account | :wechat_pay | :zip ], optional(:metadata) => %{optional(binary()) => binary()}, optional(:amount) => integer(), optional(:use_stripe_sdk) => boolean(), optional(:payment_method_configuration) => binary(), optional(:confirmation_token) => binary(), optional(:transfer_group) => binary(), optional(:error_on_requires_action) => boolean(), optional(:automatic_payment_methods) => automatic_payment_methods(), optional(:payment_method_types) => [binary()], optional(:on_behalf_of) => binary(), optional(:currency) => binary(), optional(:payment_method_options) => payment_method_options(), optional(:application_fee_amount) => integer(), optional(:description) => binary(), optional(:statement_descriptor_suffix) => binary(), optional(:transfer_data) => transfer_data(), optional(:confirm) => boolean(), optional(:return_url) => binary(), optional(:payment_method) => binary(), optional(:payment_details) => payment_details(), optional(:amount_details) => amount_details(), optional(:receipt_email) => binary(), optional(:capture_method) => :automatic | :automatic_async | :manual, optional(:mandate_data) => mandate_data() | binary(), optional(:statement_descriptor) => binary(), optional(:customer) => binary(), optional(:expand) => [binary()], optional(:payment_method_data) => payment_method_data(), optional(:shipping) => shipping(), optional(:radar_options) => radar_options(), optional(:off_session) => boolean() | :one_off | :recurring, optional(:hooks) => hooks() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a PaymentIntent object.
After the PaymentIntent is created, attach a payment method and confirmto continue the payment. Learn more about the available payment flows with the Payment Intents API.
When you use confirm=true during creation, it’s equivalent to creatingand confirming the PaymentIntent in the same call. You can use any parameters
available in the confirm API when you supply
confirm=true.
@spec increment_authorization( intent :: binary(), params :: %{ optional(:amount) => integer(), optional(:amount_details) => amount_details(), optional(:application_fee_amount) => integer(), optional(:description) => binary(), optional(:expand) => [binary()], optional(:hooks) => hooks(), optional(:metadata) => %{optional(binary()) => binary()}, optional(:payment_details) => payment_details(), optional(:statement_descriptor) => binary(), optional(:transfer_data) => transfer_data() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Perform an incremental authorization on an eligiblePaymentIntent. To be eligible, the
PaymentIntent’s status must be requires_capture and
incremental_authorization_supported
must be true.
Incremental authorizations attempt to increase the authorized amount onyour customer’s card to the new, higher amount provided. Similar to the
initial authorization, incremental authorizations can be declined. A
single PaymentIntent can call this endpoint multiple times to further
increase the authorized amount.
If the incremental authorization succeeds, the PaymentIntent objectreturns with the updated amount. If the incremental authorization fails, a card_declined error returns, and no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.After it’s captured, a PaymentIntent can no longer be incremented.
Learn more about incremental authorizations.
#### Details * Method: `post` * Path: `/v1/payment_intents/{intent}/increment_authorization`@spec list( params :: %{ optional(:created) => created() | integer(), optional(:customer) => binary(), optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of PaymentIntents.
Details
- Method:
get - Path:
/v1/payment_intents
@spec retrieve( intent :: binary(), params :: %{ optional(:client_secret) => binary(), optional(:expand) => [binary()] }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the details of a PaymentIntent that has previously been created.
You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string.
If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the payment intent object reference for more details.
Details
- Method:
get - Path:
/v1/payment_intents/{intent}
@spec search( params :: %{ optional(:expand) => [binary()], optional(:limit) => integer(), optional(:page) => binary(), optional(:query) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.SearchResult.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.
#### Details * Method: `get` * Path: `/v1/payment_intents/search`@spec update( intent :: binary(), params :: %{ optional(:amount) => integer(), optional(:amount_details) => amount_details() | binary(), optional(:application_fee_amount) => integer() | binary(), optional(:capture_method) => :automatic | :automatic_async | :manual, optional(:currency) => binary(), optional(:customer) => binary(), optional(:description) => binary(), optional(:excluded_payment_method_types) => [ :acss_debit | :affirm | :afterpay_clearpay | :alipay | :alma | :amazon_pay | :au_becs_debit | :bacs_debit | :bancontact | :billie | :blik | :boleto | :card | :cashapp | :crypto | :customer_balance | :eps | :fpx | :giropay | :grabpay | :ideal | :kakao_pay | :klarna | :konbini | :kr_card | :mb_way | :mobilepay | :multibanco | :naver_pay | :nz_bank_account | :oxxo | :p24 | :pay_by_bank | :payco | :paynow | :paypal | :pix | :promptpay | :revolut_pay | :samsung_pay | :satispay | :sepa_debit | :sofort | :swish | :twint | :us_bank_account | :wechat_pay | :zip ] | binary(), optional(:expand) => [binary()], optional(:hooks) => hooks(), optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:payment_details) => payment_details() | binary(), optional(:payment_method) => binary(), optional(:payment_method_configuration) => binary(), optional(:payment_method_data) => payment_method_data(), optional(:payment_method_options) => payment_method_options(), optional(:payment_method_types) => [binary()], optional(:receipt_email) => binary() | binary(), optional(:setup_future_usage) => :off_session | :on_session, optional(:shipping) => shipping() | binary(), optional(:statement_descriptor) => binary(), optional(:statement_descriptor_suffix) => binary(), optional(:transfer_data) => transfer_data(), optional(:transfer_group) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Updates properties on a PaymentIntent object without confirming.
Depending on which properties you update, you might need to confirm thePaymentIntent again. For example, updating the payment_method
always requires you to confirm the PaymentIntent again. If you prefer to
update and confirm at the same time, we recommend updating properties through
the confirm API instead.
@spec verify_microdeposits( intent :: binary(), params :: %{ optional(:amounts) => [integer()], optional(:descriptor_code) => binary(), optional(:expand) => [binary()] }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Verifies microdeposits on a PaymentIntent object.
Details
- Method:
post - Path:
/v1/payment_intents/{intent}/verify_microdeposits