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_
secretstringRequired 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.
curl https://api.stripe.com/v1/payment_intents/{{PAYMENT_INTENT_ID}} \ -u "sk_test_VePHdqK...NInc7u56JBrQsk_test_VePHdqKTYQjKNInc7u56JBrQ:"{ "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, "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.
- customer_
accountstring Only return PaymentIntents for the account representing the customer that this ID specifies.
More parameters
- createdobject
- ending_
beforestring - limitinteger
- starting_
afterstring
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, "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 } ]}Lists all LineItems of a given PaymentIntent.
Parameters
No parameters.
More parameters
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
A dictionary with a data property that contains an array of up to limit line items of the given PaymentIntent, starting after line item starting_. Each entry in the array is a separate line item object. If no other line items are available, the resulting array is empty.
curl https://api.stripe.com/v1/payment_intents/{{PAYMENT_INTENT_ID}}/amount_details_line_items \ -u "sk_test_VePHdqK...NInc7u56JBrQsk_test_VePHdqKTYQjKNInc7u56JBrQ:"{ "object": "list", "url": "/v1/payment_intents/pi_3MtwBwLkdIwHu7ix28a3tqPa/amount_details_line_items", "has_more": false, "data": [ { "id": "uli_T1KmwLEvkprqQb", "object": "payment_intent_amount_details_line_item", "discount_amount": 50, "payment_method_options": null, "product_code": "SKU001", "product_name": "Product 001", "quantity": 1, "tax": { "total_tax_amount": 20 }, "unit_cost": 2000, "unit_of_measure": "each" } ]}