> For the complete documentation index, see [llms.txt](https://docs.allscale.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.allscale.io/allscale-checkout/api-reference/api-doc-checkout-intent-routes-get-checkout-intent.md).

# API Doc - Checkout Intent Routes - Get Checkout Intent

**AllScale Open API**\
**Version:** v5\
**Last updated:** 2026-05-06\
**Base Path:** `/v1/checkout_intents`

***

### Overview

The Checkout Intent Query API allows merchants to retrieve the **full details** of a checkout intent.

This API is used to:

* Fetch complete checkout intent information by `checkout_intent_id`
* Display order, user, and payment details
* Inspect on-chain transaction metadata after payment
* Debug or reconcile payment lifecycle issues

***

### Important Notes

* All enum values are represented as **integers** in API requests and responses
* Monetary values involving stable coins are returned as **strings** to preserve precision
* This endpoint returns a **structured object** in `payload`
* Permission checks are enforced at the **store/business** level

***

### Authentication

All requests must include the following headers:

| Header      | Description               |
| ----------- | ------------------------- |
| X-API-Key   | API key                   |
| X-Timestamp | Unix timestamp (seconds)  |
| X-Nonce     | Unique request identifier |
| X-Signature | HMAC signature            |

#### Notes

* `X-Nonce` must be unique per request
* `X-Timestamp` must be within the allowed time window
* Signature must be generated using **raw request body bytes**
* Requests are protected against replay attacks

***

### GET /v1/checkout\_intents/{checkout\_intent\_id}

#### Description

Retrieve the full checkout intent object, including payment configuration, order metadata, and on-chain transaction details (if available).

***

#### Request

```
GET /v1/checkout_intents/{checkout_intent_id}
```

**Path Parameters**

| Parameter            | Type   | Required | Description                              |
| -------------------- | ------ | -------: | ---------------------------------------- |
| checkout\_intent\_id | string |        ✅ | AllScale checkout intent ObjectId string |

**Headers**

```
X-API-Key: <your_api_key>
X-Timestamp: <unix_timestamp>
X-Nonce: <uuid>
X-Signature: v1=<signature>
```

> Note: This is a GET request, so there is no request body.

***

### Successful Response

```json
{
  "code": 0,
  "payload": {
    "all_scale_checkout_intent_id": "65c9d4e5a9f4e0d2b6a1e123",
    "currency": 1,
    "currency_symbol": "USD",
    "amount_cents": 2500,
    "chain_id": 1,
    "amount_coins": "2.500000",
    "coin_symbol": "USDT",
    "coin_contract": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "currency_rate": "1.000000",
    "status": 20,
    "order_id": "order_8899",
    "order_description": "Premium subscription",
    "user_id": "user_001",
    "user_name": "Alice",
    "tx_hash": "0xabc123...",
    "tx_from": "0xSenderAddress",
    "tx_to": "0xReceiverAddress",
    "payment_method_type": 1,
    "actual_paid_amount": "2.500000",
    "net_income_amount": "2.400000",
    "service_fee_amount": "0.100000",
    "accepted_stable_coins": 1
  },
  "error": null,
  "request_id": "req_xxxxx"
}
```

***

### Response Fields

#### Top-Level Fields

| Field       | Type           | Description            |
| ----------- | -------------- | ---------------------- |
| code        | int            | 0 indicates success    |
| payload     | object         | Checkout intent object |
| error       | object \| null | Error object           |
| request\_id | string         | Request identifier     |

***

#### Payload — Checkout Intent Object

| Field                            | Type           | Description                                                                                                                                                                                                           |
| -------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| all\_scale\_checkout\_intent\_id | string         | Checkout intent ID                                                                                                                                                                                                    |
| currency                         | int \| null    | Fiat currency enum value. `null` when the intent was priced natively in a stable coin.                                                                                                                                |
| currency\_symbol                 | string \| null | Fiat currency symbol (e.g. USD). `null` when the intent was priced natively in a stable coin.                                                                                                                         |
| amount\_cents                    | int \| null    | Amount in fiat cents. `null` when the intent was priced natively in a stable coin — the authoritative amount is `amount_coins`.                                                                                       |
| chain\_id                        | int \| null    | EIP-155 chain ID                                                                                                                                                                                                      |
| amount\_coins                    | string         | Amount in stable coin                                                                                                                                                                                                 |
| coin\_symbol                     | string         | Stable coin symbol (USDT / USDC)                                                                                                                                                                                      |
| coin\_contract                   | string \| null | Stable coin contract address                                                                                                                                                                                          |
| currency\_rate                   | string \| null | Fiat → stable coin conversion rate. `null` when the intent was priced natively in a stable coin (no FX occurred).                                                                                                     |
| status                           | int            | Checkout intent status enum value                                                                                                                                                                                     |
| order\_id                        | string \| null | Merchant order ID                                                                                                                                                                                                     |
| order\_description               | string \| null | Merchant order description                                                                                                                                                                                            |
| user\_id                         | string \| null | Merchant user ID                                                                                                                                                                                                      |
| user\_name                       | string \| null | Merchant user name                                                                                                                                                                                                    |
| error\_message                   | string \| null | Error message (if failed)                                                                                                                                                                                             |
| tx\_hash                         | string \| null | On-chain transaction hash from the customer's wallet to the ephemeral wallet                                                                                                                                          |
| tx\_hash\_2                      | string \| null | On-chain transaction hash of the second transfer, from the ephemeral wallet to the merchant's wallet                                                                                                                  |
| tx\_from                         | string \| null | Customer's wallet address                                                                                                                                                                                             |
| tx\_to                           | string         | Merchant's AllScale wallet address                                                                                                                                                                                    |
| actual\_paid\_amount             | string \| null | Actual stablecoin amount paid by the user                                                                                                                                                                             |
| service\_fee\_amount             | string \| null | AllScale service fee deducted from the payment amount                                                                                                                                                                 |
| net\_income\_amount              | string \| null | Net stablecoin amount credited to the merchant. Calculated as `actual_paid_amount - service_fee_amount`.                                                                                                              |
| payment\_method\_type            | integer        | Payment method type used for this transaction. Value must correspond to the `PaymentMethodType` enum: `0=UNKNOWN`, `1=WALLET_SCAN`, `2=WALLET_CONNECT`, `3=ALL_SCALE_PAY`.                                            |
| accepted\_stable\_coins          | int \| null    | StableCoinFlag bitmask of stablecoins the payer may settle in for this intent (`1` = USDT, `2` = USDC, `3` = either; bit `n` = StableCoin enum value `n+1`). `null` on intents created before the multi-coin rollout. |

***

### Possible Errors

| Code  | Meaning                                                |
| ----- | ------------------------------------------------------ |
| 10001 | Validation error                                       |
| 20001 | Missing authentication headers                         |
| 20002 | Invalid signature                                      |
| 30001 | Forbidden (no permission to view this checkout intent) |
| 40001 | Rate limit exceeded                                    |
| 50001 | Checkout intent not found                              |
| 90000 | Internal server error, pls contact us                  |
| 99999 | Unknown error, pls contact us                          |

***

### Notes

* This endpoint enforces **store/business ownership** checks
* Enum fields (such as `currency` and `status`) are returned as **integers only**
* Decimal values are returned as **strings** to avoid precision loss
* Always log `request_id` when debugging production issues
* If you only need the status value, prefer\
  `GET /v1/checkout_intents/{checkout_intent_id}/status` for lower payload size

***

### Related APIs

* `POST /v1/checkout_intents`
* `GET /v1/checkout_intents/{checkout_intent_id}/status`

***

## Appendix — Checkout Intent Status Enum

| **Value** | **Name**               | **Meaning**                                            | **Terminal** |
| --------- | ---------------------- | ------------------------------------------------------ | ------------ |
| -1        | FAILED                 | Checkout failed due to internal or processing error    | ✅            |
| -2        | REJECTED               | Rejected by KYT (Know Your Transaction) checks         | ✅            |
| -3        | UNDERPAID              | Paid amount is less than required                      | ✅            |
| -4        | CANCELED               | User manually canceled the checkout                    | ✅            |
| -5        | TIMEOUT                | Checkout expired due to inactivity or time limit       | ✅            |
| 1         | CREATED                | Checkout intent created, not yet viewed by user        | ❌            |
| 2         | VIEWED                 | Hosted checkout page has been opened by the user       | ❌            |
| 3         | TEMP\_WALLET\_RECEIVED | Temporary deposit wallet assigned (KYT flow only)      | ❌            |
| 4         | MANUAL\_OPERATION      | Stuck in TEMP\_WALLET\_RECEIVED; pending manual review | ❌            |
| 5         | SEND\_BACK             | Refund in progress back to payer (KYT or underpaid)    | ❌            |
| 10        | ON\_CHAIN              | On-chain transaction detected, awaiting confirmation   | ❌            |
| 20        | CONFIRMED              | Payment confirmed successfully on-chain                | ✅            |

***

End of document.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.allscale.io/allscale-checkout/api-reference/api-doc-checkout-intent-routes-get-checkout-intent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
