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

# Stage

> A step in the buy transaction lifecycle

Each [Transaction](https://dev.moonpay.com/api-reference/platform/objects-and-types/transaction.md) includes a
`stages` array that breaks the buy pipeline into ordered steps. Poll
[`GET /platform/v1/transactions/{id}`](https://dev.moonpay.com/api-reference/platform/endpoints/transactions/get)
or
[`client.getTransaction()`](https://dev.moonpay.com/platform/sdk-reference/web/get-transaction) to see how
each stage is progressing. When a stage's `status` is `failed`, read
`failureReason` for a machine-readable code you can branch on in your app.

> [!NOTE]
>
> `stages` reflects buy pipeline progress. The top-level transaction `status`
> (`pending`, `completed`, or `failed`) is what you should treat as terminal
> when polling. A transaction can be `failed` while earlier stages still show
> `success`.

## Properties

| Property | Type | Required | Description |
| - | - | - | - |
| `kind` | string | Yes | Which pipeline step this object represents. See [Stage kinds](#stage-kinds). |
| `name` | string | No | Human-readable label for the stage (suitable for display). |
| `status` | string | Yes | Progress for this stage. See [Stage status](#stage-status). |
| `failureReason` | string \| null | No | Present when `status` is `failed`. Snake\_case tracker code — not a customer-facing sentence. See [Stage failure reasons](#stage-failure-reasons). |

## Stage kinds

| Value | Description |
| - | - |
| `ordering` | Quote and order creation. |
| `waiting_payment` | Waiting for the customer to send a bank transfer (for example, SEPA). |
| `waiting_authentication` | Waiting for payment authentication (for example, 3D Secure). |
| `verification` | Identity or payment-method verification (KYC, card checks). |
| `processing` | Payment capture and internal processing after authorization. |
| `delivery` | Crypto delivery to the customer's wallet. |
| `crypto_hold` | Funds held before release (when applicable to the payment method or route). |

Not every transaction includes every kind. The array only contains stages that
apply to that payment method and route.

## Stage status

| Value | Description |
| - | - |
| `not_started` | The stage has not started yet. |
| `in_progress` | The stage is in progress. |
| `success` | The stage completed successfully. |
| `failed` | The stage failed. Read `failureReason` if set. |

## Stage failure reasons

When `status` is `failed`, `failureReason` is a **snake\_case** code (for
example, `payment_authorization_declined`). Use it for programmatic handling —
not for display copy. Show your own message or MoonPay's frame `failureReason`
string when the customer initiated payment through Apple Pay or Google Pay.

> [!WARNING]
>
> Do not confuse `stages[].failureReason` with other failure fields MoonPay
> exposes elsewhere (frame `failureCode`, Widget HTTP `moonPayErrorCode`, or the
> legacy Widget transaction `failureReason` sentence).

* **Frame `failureCode`** (camelCase) on Buy Button `complete` events — see
  the [Buy Button failure codes](https://dev.moonpay.com/platform/frames/buy-button.md#failure-codes).
* **HTTP `moonPayErrorCode`** on Widget API errors — see
  [Widget errors](https://dev.moonpay.com/api-reference/widget/errors.md).
* **Top-level transaction `failureReason`** on the legacy Widget transaction
  object (human-readable sentence), not returned on Platform
  `GET /transactions/{id}`.

A catalog of buy-stage `failureReason` values, the stage that surfaces each
code, and retry guidance is documented on
[Stage failure reasons](https://dev.moonpay.com/api-reference/platform/objects-and-types/stage-failure-reasons.md).

## Bank transfers and `waiting_payment`

For SEPA bank transfers, the transaction stays `pending` until the customer's
deposit arrives. Check the `waiting_payment` stage: when its `status` is
`success`, MoonPay has received the transfer. See
[Get a transaction](https://dev.moonpay.com/platform/sdk-reference/web/get-transaction.md) for polling
guidance.

## Example

Failed card authorization on the `processing` stage:

```json theme={null}
{
  "kind": "processing",
  "name": "Processing",
  "status": "failed",
  "failureReason": "payment_authorization_declined"
}
```

Full transaction excerpt with stages:

```json theme={null}
{
  "id": "tr_abc123",
  "status": "failed",
  "stages": [
    {
      "kind": "ordering",
      "name": "Ordering",
      "status": "success",
      "failureReason": null
    },
    {
      "kind": "verification",
      "name": "Verification",
      "status": "success",
      "failureReason": null
    },
    {
      "kind": "processing",
      "name": "Processing",
      "status": "failed",
      "failureReason": "payment_authorization_declined"
    },
    {
      "kind": "delivery",
      "name": "Delivery",
      "status": "not_started",
      "failureReason": null
    }
  ]
}
```
