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

# Get Payment Intent

> Read the payment state of one checkout: open, confirming, paid or expired. Authorized by the intent's claim token, so only the checkout that created it can read it.

```bash theme={null}
curl https://api.xenarch.dev/v1/links/JJjIwDyV4N1CG9g8AHMxfdJ9/intents/0x5c1e8a0b7d2f4e6a9c3b1d08 \
  -H "X-Claim-Token: q3V…"
```

```json 200 theme={null}
{
  "reference": "0x5c1e8a0b7d2f4e6a9c3b1d08",
  "status": "paid",
  "method": "wallet",
  "amount_micro": "25000000",
  "expires_at": "2026-11-23T12:30:00Z",
  "tx_hash": "0x…",
  "paid_at": "2026-11-23T12:04:10Z",
  "payment_status": "confirmed"
}
```

Poll this after the buyer's wallet sends the transfer from [Create Payment Intent](https://docs.xenarch.com/api-reference/links/create-intent.md). Xenarch books the transfer on the server, so `status` turns `paid` even if your page never learns the transaction hash.

On a reusable link, the link's own `latest_payment` (see [Get Link](https://docs.xenarch.com/api-reference/links/get.md)) can be another buyer's payment. This endpoint reports only this checkout's payment.

## Authentication

Send the `claim_token` from Create Payment Intent in the `X-Claim-Token` header. Never put it in the URL. A wrong or missing token returns `404`, the same as an unknown intent. Successful responses carry `Cache-Control: no-store`.

## Fields

| Field | Description |
| - | - |
| `status` | `open` (not paid yet, inside its window), `confirming` (a matching transfer is on chain, waiting for the network's confirmations), `paid` (a transfer is booked against this intent) or `expired` (past `expires_at` and unpaid) |
| `network`, `token` | The network and coin of this payment |
| `confirmations`, `required_confirmations` | While `confirming`: confirmations so far and confirmations needed |
| `amount_micro` | The amount the intent asked for, in micro units (6 decimals) |
| `received_micro` | What arrived, when it differs from `amount_micro`. An exchange that kept its fee out books `underpaid`. |
| `tx_hash` | The booked transaction, when `paid` |
| `paid_at` | When the payment was booked, when `paid` |
| `payment_status` | `confirmed`, `underpaid` or `overpaid`, when `paid` |

To fulfill orders, rely on a verified [webhook](https://docs.xenarch.com/payments/webhooks.md), not on this endpoint.

## Errors

| Status | Meaning |
| - | - |
| `404` | Unknown intent, an intent of another link, or a wrong claim token |
| `429` | Too many requests from this IP address |


## OpenAPI

````yaml GET /v1/links/{link_id}/intents/{reference}
openapi: 3.1.0
info:
  title: Xenarch API
  version: 0.1.0
servers:
  - url: https://api.xenarch.dev
security: []
paths:
  /v1/links/{link_id}/intents/{reference}:
    get:
      tags:
        - pay-links
      summary: Get Payment Intent
      description: >-
        The payment state of one checkout: open, confirming, paid or expired.
        Authorized by the intent's claim token in the X-Claim-Token header.
      operationId: >-
        get_link_payment_intent_status_v1_links__link_id__intents__reference__get
      parameters:
        - name: link_id
          in: path
          required: true
          schema:
            type: string
            title: Link Id
        - name: reference
          in: path
          required: true
          schema:
            type: string
            title: Reference
        - name: X-Claim-Token
          in: header
          required: true
          schema:
            type: string
            maxLength: 128
            title: X-Claim-Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayLinkIntentStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PayLinkIntentStatusResponse:
      type: object
      title: PayLinkIntentStatusResponse
      required:
        - reference
        - status
        - method
        - amount_micro
        - expires_at
      properties:
        reference:
          type: string
          title: Reference
        status:
          type: string
          enum:
            - open
            - confirming
            - paid
            - expired
          title: Status
          description: >-
            `open`, `confirming` (a matching transfer is on chain but not deep
            enough yet), `paid` or `expired`.
        method:
          type: string
          enum:
            - wallet
            - manual
          title: Method
        amount_micro:
          type: string
          title: Amount Micro
        expires_at:
          type: string
          format: date-time
          title: Expires At
        tx_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Tx Hash
        paid_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Paid At
        payment_status:
          anyOf:
            - type: string
              enum:
                - confirmed
                - underpaid
                - overpaid
            - type: 'null'
          title: Payment Status
        network:
          type: string
          title: Network
          default: base
          description: The network of this payment.
        token:
          type: string
          title: Token
          default: USDC
          description: The stablecoin of this payment.
        confirmations:
          anyOf:
            - type: integer
            - type: 'null'
          title: Confirmations
          description: 'While `status` is `confirming`: confirmations so far.'
        required_confirmations:
          anyOf:
            - type: integer
            - type: 'null'
          title: Required Confirmations
          description: 'While `status` is `confirming`: confirmations needed.'
        received_micro:
          anyOf:
            - type: string
            - type: 'null'
          title: Received Micro
          description: >-
            What arrived, in 6-decimal micro units, when it differs from
            `amount_micro`. A withdrawal that arrived short of the exchange's
            fee is booked `underpaid`.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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