Attributes
- idstringretrievable with publishable key
Unique identifier for the object.
- amountintegerretrievable with publishable key
Amount 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).
- automatic_
payment_ nullable objectretrievable with publishable keymethods Settings to configure compatible payment methods from the Stripe Dashboard
- client_
secret nullable stringretrievable with publishable keyThe 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_
should be handled.secret - currencyenumretrievable with publishable key
Three-letter ISO currency code, in lowercase. Must be a supported currency.
- customernullable stringExpandable
ID 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_
, 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 ispresent card_
and isn’t a digital wallet, then a generated_card payment method representing the card is created and attached to the Customer instead.present - descriptionnullable stringretrievable with publishable key
An arbitrary string attached to the object. Often useful for displaying to users.
- last_
payment_ nullable objectretrievable with publishable keyerror The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
- latest_
charge nullable stringExpandableID of the latest Charge object created by this PaymentIntent. This property is
null
until PaymentIntent confirmation is attempted. - metadataobject
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. Learn more about storing information in metadata.
- next_
action nullable objectretrievable with publishable keyIf present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
- payment_
method nullable stringExpandableretrievable with publishable keyID of the payment method used in this PaymentIntent.
- receipt_
email nullable stringretrievable with publishable keyEmail address that the receipt for the resulting payment will be sent to. If
receipt_
is specified for a payment in live mode, a receipt will be sent regardless of your email settings.email - setup_
future_ nullable enumretrievable with publishable keyusage Indicates 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_
and isn’t a digital wallet, Stripe creates and attaches a generated_card payment method representing the card to the Customer instead.present When processing card payments, Stripe uses
setup_
to help you comply with regional legislation and network rules, such as SCA.future_ usage Possible enum valuesoff_
session Use
off_
if your customer may or may not be present in your checkout flow.session on_
session Use
on_
if you intend to only reuse the payment method when your customer is present in your checkout flow.session - shippingnullable objectretrievable with publishable key
Shipping information for this PaymentIntent.
- statement_
descriptor nullable stringText 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_ nullable stringsuffix Provides 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.
- statusenumretrievable with publishable key
Status of this PaymentIntent, one of
requires_
,payment_ method requires_
,confirmation requires_
,action processing
,requires_
,capture canceled
, orsucceeded
. Read more about each PaymentIntent status.Possible enum valuescanceled
processing
requires_
action requires_
capture requires_
confirmation requires_
payment_ method succeeded
More attributes
- objectstringretrievable with publishable key
- amount_
capturable integer - amount_
details nullable object - amount_
received integer - applicationnullable stringExpandableConnect only
- application_
fee_ nullable integerConnect onlyamount - canceled_
at nullable timestampretrievable with publishable key - cancellation_
reason nullable enumretrievable with publishable key - capture_
method enumretrievable with publishable key - confirmation_
method enumretrievable with publishable key - createdtimestampretrievable with publishable key
- invoicenullable stringExpandable
- livemodebooleanretrievable with publishable key
- on_
behalf_ nullable stringExpandableConnect onlyof - payment_
method_ nullable objectconfiguration_ details - payment_
method_ nullable objectoptions - payment_
method_ array of stringsretrievable with publishable keytypes - processingnullable objectretrievable with publishable key
- reviewnullable stringExpandable
- transfer_
data nullable objectConnect only - transfer_
group nullable stringConnect only
{ "id": "pi_3MtwBwLkdIwHu7ix28a3tqPa", "object": "payment_intent", "amount": 2000, "amount_capturable": 0, "amount_details": { "tip": {} }, "amount_received": 0, "application": null, "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH", "confirmation_method": "automatic", "created": 1680800504, "currency": "usd", "customer": null, "description": null, "invoice": null, "last_payment_error": null, "latest_charge": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "mandate_options": null, "network": null, "request_three_d_secure": "automatic" }, "link": { "persistent_token": null } }, "payment_method_types": [ "card", "link" ], "processing": null, "receipt_email": null, "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null}
Creates a PaymentIntent object.
After the PaymentIntent is created, attach a payment method and confirm to 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 creating and confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply confirm=true
.
Parameters
- amountintegerRequired
Amount 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).
- currencyenumRequired
Three-letter ISO currency code, in lowercase. Must be a supported currency.
- automatic_
payment_ objectmethods 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.
- confirmboolean
Set to
true
to attempt to confirm this PaymentIntent immediately. This parameter defaults tofalse
. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the Confirm API. - customerstring
ID 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_
, 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 ispresent card_
and isn’t a digital wallet, then a generated_card payment method representing the card is created and attached to the Customer instead.present - descriptionstring
An arbitrary string attached to the object. Often useful for displaying to users.
- metadataobject
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
. - off_
session boolean | stringonly when confirm=trueSet to
true
to indicate that the customer isn’t in your checkout flow during this payment attempt and can’t authenticate. Use this parameter in scenarios where you collect card details and charge them later. This parameter can only be used withconfirm=true
. - payment_
method stringID of the payment method (a PaymentMethod, Card, or compatible Source object) to attach to this PaymentIntent.
If you omit this parameter with
confirm=true
,customer.
attaches as this PaymentIntent’s payment instrument to improve migration for users of the Charges API. We recommend that you explicitly provide thedefault_ source payment_
moving forward.method - receipt_
email stringEmail address to send the receipt to. If you specify
receipt_
for a payment in live mode, you send a receipt regardless of your email settings.email - setup_
future_ enumusage Indicates 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_
and isn’t a digital wallet, Stripe creates and attaches a generated_card payment method representing the card to the Customer instead.present When processing card payments, Stripe uses
setup_
to help you comply with regional legislation and network rules, such as SCA.future_ usage Possible enum valuesoff_
session Use
off_
if your customer may or may not be present in your checkout flow.session on_
session Use
on_
if you intend to only reuse the payment method when your customer is present in your checkout flow.session - shippingobject
Shipping information for this PaymentIntent.
- statement_
descriptor stringText 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_ stringsuffix Provides 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.
More parameters
- application_
fee_ integerConnect onlyamount - capture_
method enum - confirmation_
method enum - confirmation_
token stringonly when confirm=true - error_
on_ booleanonly when confirm=truerequires_ action - mandatestringonly when confirm=true
- mandate_
data objectonly when confirm=true - on_
behalf_ stringConnect onlyof - payment_
method_ stringconfiguration - payment_
method_ objectdata - payment_
method_ objectoptions - payment_
method_ array of stringstypes - radar_
options object - return_
url stringonly when confirm=true - transfer_
data objectConnect only - transfer_
group stringConnect only - use_
stripe_ booleansdk
Returns
Returns a PaymentIntent object.
{ "id": "pi_3MtwBwLkdIwHu7ix28a3tqPa", "object": "payment_intent", "amount": 2000, "amount_capturable": 0, "amount_details": { "tip": {} }, "amount_received": 0, "application": null, "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH", "confirmation_method": "automatic", "created": 1680800504, "currency": "usd", "customer": null, "description": null, "invoice": null, "last_payment_error": null, "latest_charge": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "mandate_options": null, "network": null, "request_three_d_secure": "automatic" }, "link": { "persistent_token": null } }, "payment_method_types": [ "card", "link" ], "processing": null, "receipt_email": null, "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null}
Updates properties on a PaymentIntent object without confirming.
Depending on which properties you update, you might need to confirm the PaymentIntent again. For example, updating the payment_
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.
Parameters
- amountinteger
Amount 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).
- currencyenum
Three-letter ISO currency code, in lowercase. Must be a supported currency.
- customerstring
ID 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_
, 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 ispresent card_
and isn’t a digital wallet, then a generated_card payment method representing the card is created and attached to the Customer instead.present - descriptionstring
An arbitrary string attached to the object. Often useful for displaying to users.
- metadataobject
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
. - payment_
method stringID of the payment method (a PaymentMethod, Card, or compatible Source object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string.
- receipt_
email stringEmail address that the receipt for the resulting payment will be sent to. If
receipt_
is specified for a payment in live mode, a receipt will be sent regardless of your email settings.email - setup_
future_ enumusage Indicates 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_
and isn’t a digital wallet, Stripe creates and attaches a generated_card payment method representing the card to the Customer instead.present When processing card payments, Stripe uses
setup_
to help you comply with regional legislation and network rules, such as SCA.future_ usage If you’ve already set
setup_
and you’re performing a request using a publishable key, you can only update the value fromfuture_ usage on_
tosession off_
.session Possible enum valuesoff_
session Use
off_
if your customer may or may not be present in your checkout flow.session on_
session Use
on_
if you intend to only reuse the payment method when your customer is present in your checkout flow.session - shippingobject
Shipping information for this PaymentIntent.
- statement_
descriptor stringText 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_ stringsuffix Provides 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.
More parameters
- application_
fee_ integerConnect onlyamount - capture_
method enumsecret key only - payment_
method_ stringconfiguration - payment_
method_ objectdata - payment_
method_ objectoptions - payment_
method_ array of stringstypes - transfer_
data objectConnect only - transfer_
group stringConnect only
Returns
Returns a PaymentIntent object.
{ "id": "pi_3MtwBwLkdIwHu7ix28a3tqPa", "object": "payment_intent", "amount": 2000, "amount_capturable": 0, "amount_details": { "tip": {} }, "amount_received": 0, "application": null, "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH", "confirmation_method": "automatic", "created": 1680800504, "currency": "usd", "customer": null, "description": null, "invoice": null, "last_payment_error": null, "latest_charge": null, "livemode": false, "metadata": { "order_id": "6735" }, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "mandate_options": null, "network": null, "request_three_d_secure": "automatic" }, "link": { "persistent_token": null } }, "payment_method_types": [ "card", "link" ], "processing": null, "receipt_email": null, "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null}
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_
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.
Parameters
- client_
secret stringRequired if you use a publishable key.The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.
Returns
Returns a PaymentIntent if a valid identifier was provided.
{ "id": "pi_3MtwBwLkdIwHu7ix28a3tqPa", "object": "payment_intent", "amount": 2000, "amount_capturable": 0, "amount_details": { "tip": {} }, "amount_received": 0, "application": null, "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH", "confirmation_method": "automatic", "created": 1680800504, "currency": "usd", "customer": null, "description": null, "invoice": null, "last_payment_error": null, "latest_charge": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "mandate_options": null, "network": null, "request_three_d_secure": "automatic" }, "link": { "persistent_token": null } }, "payment_method_types": [ "card", "link" ], "processing": null, "receipt_email": null, "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null}
Returns a list of PaymentIntents.
Parameters
- customerstring
Only return PaymentIntents for the customer that this customer ID specifies.
More parameters
- createdobject
- ending_
before string - limitinteger
- starting_
after string
Returns
A dictionary with a data
property that contains an array of up to limit
PaymentIntents, starting after PaymentIntent starting_
. Each entry in the array is a separate PaymentIntent object. If no other PaymentIntents are available, the resulting array is empty.
{ "object": "list", "url": "/v1/payment_intents", "has_more": false, "data": [ { "id": "pi_3MtwBwLkdIwHu7ix28a3tqPa", "object": "payment_intent", "amount": 2000, "amount_capturable": 0, "amount_details": { "tip": {} }, "amount_received": 0, "application": null, "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH", "confirmation_method": "automatic", "created": 1680800504, "currency": "usd", "customer": null, "description": null, "invoice": null, "last_payment_error": null, "latest_charge": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "mandate_options": null, "network": null, "request_three_d_secure": "automatic" }, "link": { "persistent_token": null } }, "payment_method_types": [ "card", "link" ], "processing": null, "receipt_email": null, "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null } ]}