> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionicfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Transaction object

> One payment with its source, customer, card, and outcome, ready to show in a list or a receipt.

```json The Transaction object theme={null}
{
  "id": "pi_01JEXAMPLE2K8V4N9C6M1Q7R",
  "object": "transaction",
  "payment_intent": "pi_01JEXAMPLE2K8V4N9C6M1Q7R",
  "checkout_session": "cs_01JEXAMPLE2K8V4N9C6M1Q7R",
  "latest_charge": "ch_01JEXAMPLE2K8V4N9C6M1Q7R",
  "merchant_reference": null,
  "client_reference_id": "order_1001",
  "source": { "type": "checkout", "label": "Checkout", "checkout_mode": "payment", "checkout_ui_mode": "hosted" },
  "livemode": false,
  "amount": 15000,
  "amount_refunded": 0,
  "currency": "USD",
  "status": "succeeded",
  "payment_intent_status": "succeeded",
  "charge_status": "succeeded",
  "checkout_status": "complete",
  "payment_status": "paid",
  "refund_count": 0,
  "customer": { "id": "cus_01JEXAMPLE2K8V4N9C6M1Q7R", "email": "buyer@example.com", "first_name": null, "last_name": null, "name": "Jordan Lee" },
  "payment_method": {
    "id": "pm_01JEXAMPLE2K8V4N9C6M1Q7R", "type": "card", "usage": "single_use", "status": "active",
    "brand": "visa", "last4": "4242", "exp_month": 12, "exp_year": 2030, "fingerprint": null,
    "funding": "credit", "issuer": null, "country": "US", "iin": "424242",
    "billing_name": "Jordan Lee", "billing_email": "buyer@example.com", "billing_phone": null,
    "billing_address": { "line1": null, "line2": null, "city": null, "state": null, "postal_code": "94103", "country": "US" }
  },
  "payment_context": null,
  "product_summary": { "item_count": 1, "label": "Pro onboarding", "names": ["Pro onboarding"] },
  "decline_code": null,
  "decline_type": null,
  "failure_message": null,
  "created_at": 1762650000,
  "updated_at": 1762650042
}
```

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](https://docs.ionicfi.com/api-reference/payment-intents.md), its latest
[Charge](https://docs.ionicfi.com/api-reference/charges.md), 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

**id** `string`

The transaction's ID, the same as its PaymentIntent's (`pi_…`).

**payment\_intent** `string`

The PaymentIntent behind the transaction.

**latest\_charge** `string | null`

The most recent charge attempt (`ch_…`). Null before the first attempt.

**checkout\_session** `string | null`

The checkout session that created the payment, if any (`cs_…`).

**source** `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.

**amount** `integer`

The payment amount, in minor units.

**amount\_refunded** `integer`

The amount refunded so far, in minor units.

**status** `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`.

**customer** `object | null`

The customer's ID, email, and name, when the payment has a customer.

**payment\_method** `object | null`

The card used: brand, last 4 digits, expiration, funding, issuer,
country, and billing details.

**product\_summary** `object`

What was bought: the item count, a display `label`, and the product names.

**decline\_code** `string | null`

Why the latest charge was declined. See [decline codes](https://docs.ionicfi.com/api-reference/decline-codes.md).

## Retrieved transactions

Retrieving one transaction adds the records behind it:

| Field | Contains |
| - | - |
| `payment_intent_details` | The PaymentIntent's status, amount, capture method, payment method, customer, and metadata |
| `charges` | Every charge attempt, with its outcome, card details, and payment timeline |
| `refunds` | Every refund, with its status, amount, and reason |
| `line_items` | Each item bought, with its price, product, and quantity |
| `checkout` | The checkout session, with its status, mode, and URLs, or null |
| `invoice` | The invoice the payment paid, when there is one |

## Endpoints

| Endpoint | Description |
| - | - |
| [`GET /v1/transactions`](https://docs.ionicfi.com/api-reference/transactions/list-transactions) | List transactions, newest first, with filters for status, customer, card, amount, and date. |
| [`GET /v1/transactions/{id}`](https://docs.ionicfi.com/api-reference/transactions/retrieve-a-transaction) | Retrieve a transaction with its charges, refunds, and line items. |

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.