Skip to main content
GET
Error

Authorizations

Authorization
string
header
required

A secret key (sk_…) or restricted key (rk_…) sent as Authorization: Bearer <key>.

Scopes

payments:read

Path Parameters

id
string
required

The transaction id (pi_…).

Response

The transaction with full detail.

A transaction with its payment intent details, invoice, checkout session, line items, charges, and refunds. Every field of Transaction is also present.

id
string
required

The transaction id (pi_…). It is the same as payment_intent.

object
enum<string>
required

Always transaction.

Available options:
transaction
payment_intent
string
required

The payment intent id (pi_…).

merchant_reference
string | null
required

Your reference for the payment. Null when none was set.

client_reference_id
string | null
required

The client reference id from the checkout session. Null when none was set.

checkout_session
string | null
required

The checkout session id (cs_…) the payment came from. Null for payments made outside checkout.

latest_charge
string | null
required

The id (ch_…) of the most recent charge attempt. Null when no charge was attempted.

source
object
required

Where the payment came from.

livemode
boolean
required

True for live-mode transactions, false for test mode.

amount
integer<int64>
required

Amount in the smallest currency unit.

amount_refunded
integer<int64>
required

Total refunded so far, in the smallest currency unit.

currency
string
required

Three-letter ISO currency code, such as USD.

status
string
required

The overall outcome: refunded, partially_refunded, failed, declined, uncertain, or the payment intent status, such as succeeded, processing, requires_payment_method, or canceled.

payment_intent_status
string
required

The status of the payment intent.

charge_status
string | null
required

The status of the latest charge. Null when no charge was attempted.

checkout_status
string | null
required

The status of the checkout session. Null for payments made outside checkout.

payment_status
string | null
required

The payment status of the checkout session. Null for payments made outside checkout.

refund_count
integer
required

Number of refunds on this payment.

customer
object | null
required

The customer who made the payment. Null for guest payments.

payment_method
object | null
required

The payment method used. Null when none was attached.

payment_context
object | null
required

How and where this payment attempt was made. Null for older payments.

product_summary
object
required

A short description of what was purchased.

decline_code
string | null
required

The decline code when the payment was declined. Null otherwise.

decline_type
string | null
required

The decline type when the payment was declined. Null otherwise.

failure_message
string | null
required

A readable explanation when the payment failed. Null otherwise.

created_at
integer<int64>
required

Unix timestamp in seconds when the transaction was created.

updated_at
integer<int64>
required

Unix timestamp in seconds when the transaction last changed.

payment_intent_details
object
required

The payment intent behind a transaction.

checkout
object | null
required

The checkout session behind the payment. Null for payments made outside checkout.

line_items
object[]
required

What was purchased. Empty when the payment has no checkout session.

charges
object[]
required

Every charge attempt for this payment.

refunds
object[]
required

Every refund issued against this payment.

invoice
object

The invoice this payment was for. Omitted when the payment is not for an invoice.