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

# Transactions

> Understand the API resource that represents a payment attempt.

A transaction records an attempt to move an amount with a payment method. It contains the amount, the method, the customer, and the current state.

## Payment and transaction

Use **payment** to talk about the complete experience offered to the buyer. Use **transaction** to talk about the resource returned by the API.

A checkout session can guide the buyer through that experience. The transaction records the result of the chosen method.

## Lifecycle

| State             | What it means                                         |
| ----------------- | ----------------------------------------------------- |
| `waiting_payment` | The buyer still needs to complete an action           |
| `processing`      | Bob received the payment and is awaiting confirmation |
| `paid`            | The payment was confirmed                             |
| `expired`         | The payment window ended                              |
| `cancelled`       | The transaction was cancelled                         |
| `refunded`        | The amount was refunded                               |

The available states may vary by method. Implement only the states published in the reference for the flow you use.

## How to track

Use the status query to update the interface. On the backend, process webhook events as the source of truth.

## Next steps

<CardGroup cols={2}>
  <Card title="Check status" icon="magnifying-glass" href="/en/pages/pix/check-status">
    Query a transaction by its identifier.
  </Card>

  <Card title="List transactions" icon="list" href="/en/pages/pix/list">
    Retrieve the project's transactions.
  </Card>

  <Card title="Configure webhooks" icon="bell" href="/en/pages/webhooks">
    Receive state changes automatically.
  </Card>

  <Card title="Avoid duplication" icon="rotate" href="/en/pages/idempotency">
    Retry creation operations safely.
  </Card>
</CardGroup>
