Skip to main content
A Transaction is one payment as your customers and your team see it: what it was for, who paid, with which card, and how it ended. It combines the PaymentIntent, its latest Charge, and the checkout session, payment link, invoice, or subscription it came from. Transactions are read-only. To take, capture, or refund a payment, use those objects directly. For exact fields, filters, and response schemas, open the endpoint pages in this group.

Attributes

string
The transaction’s ID, the same as its PaymentIntent’s (pi_…).
string
The PaymentIntent behind the transaction.
string | null
The most recent charge attempt (ch_…). Null before the first attempt.
string | null
The checkout session that created the payment, if any (cs_…).
object
Where the payment came from. type is checkout, payment_link, invoice, subscription, or api, and label is a display name for it. The matching ID (payment_link, invoice, or subscription) is included when there is one.
integer
The payment amount, in minor units.
integer
The amount refunded so far, in minor units.
string
The payment’s outcome in one value. refunded or partially_refunded once a refund applies; failed, declined, or uncertain from the latest charge; otherwise the PaymentIntent’s status, such as succeeded, requires_capture, or canceled.
object | null
The customer’s ID, email, and name, when the payment has a customer.
object | null
The card used: brand, last 4 digits, expiration, funding, issuer, country, and billing details.
object
What was bought: the item count, a display label, and the product names.
string | null
Why the latest charge was declined. See decline codes.

Retrieved transactions

Retrieving one transaction adds the records behind it:

Endpoints

Both need a secret or restricted key with payments:read.