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

# Get an Onchain Payment Intent

Retrieve an onchain payment intent that belongs to your authenticated K4K3RU account. Use this method to inspect the payment destination, amount, expiration time, and current status after creating an intent.

## Endpoint

| Property       | Value                             |
| -------------- | --------------------------------- |
| URL            | `https://api.k4k3ru.com/`         |
| HTTP method    | `POST`                            |
| RPC method     | `PaymentOnchain.GetIntent`        |
| Authentication | API credential signature required |

## Request

### Request Body

This method uses the common [JSON-RPC request envelope](/k4k3ru-docs/api/json-rpc.md#request-envelope). Set `method` to `PaymentOnchain.GetIntent` and include the required `auth` object described in [API Request Authentication](/k4k3ru-docs/api/authentication.md).

### Params Fields

| Field      | Type   | Required | Description                                                                        |
| ---------- | ------ | -------- | ---------------------------------------------------------------------------------- |
| `intentId` | string | Yes      | Unique identifier of an onchain payment intent owned by the authenticated account. |

### Example Request

```json
{
  "id": "1",
  "method": "PaymentOnchain.GetIntent",
  "params": {
    "intentId": "2001"
  },
  "auth": {
    "apiKey": "<API_KEY>",
    "timestamp": 1786521600,
    "nonce": "<NONCE>",
    "signature": "<SIGNATURE>"
  }
}
```

Generate `timestamp`, `nonce`, and `signature` for every request. For the params shown above, sign this canonical payload using the same timestamp and nonce placed in `auth`:

```
PaymentOnchain.GetIntent
1786521600
<NONCE>
{"intentId":"2001"}
```

The timestamp shown above is illustrative. Use the current Unix timestamp in seconds when signing a real request.

## Response

### Response Body

Successful requests use the common [JSON-RPC success response envelope](/k4k3ru-docs/api/json-rpc.md#success-response-envelope). Failed requests use the common [JSON-RPC error response envelope](/k4k3ru-docs/api/json-rpc.md#error-response-envelope).

K4K3RU returns an intent only when its account matches the authenticated API credential. An unknown intent and an intent owned by another account produce the same `not_found` error.

### Result Fields

| Field              | Type   | Description                                        |
| ------------------ | ------ | -------------------------------------------------- |
| `intentId`         | string | Unique payment intent identifier.                  |
| `accountId`        | string | Identifier of the account that owns the intent.    |
| `status`           | string | Current payment intent status.                     |
| `chain`            | string | Blockchain used for the payment.                   |
| `network`          | string | Blockchain network used for the payment.           |
| `symbol`           | string | Token symbol used for the payment.                 |
| `recipientAddress` | string | Address to which the payment must be sent.         |
| `amount`           | string | Required payment amount.                           |
| `expiresAt`        | string | Payment intent expiration time in RFC 3339 format. |

### Errors

| Code             | When it occurs                                                                          |
| ---------------- | --------------------------------------------------------------------------------------- |
| `not_found`      | The intent does not exist or does not belong to the authenticated account.              |
| `unauthorized`   | Required authentication fields are missing or signature verification fails.             |
| `expired`        | The request timestamp is older than the accepted 60-second window.                      |
| `internal_error` | The intent cannot be retrieved because of an unexpected processing or upstream failure. |

### Example Success Response

```json
{
  "id": "1",
  "result": {
    "intentId": "2001",
    "accountId": "3001",
    "status": "pending",
    "chain": "base",
    "network": "sepolia",
    "symbol": "USDC",
    "recipientAddress": "0x0000000000000000000000000000000000000001",
    "amount": "1",
    "expiresAt": "2026-08-12T12:00:00Z"
  }
}
```

Identifiers, addresses, timestamps, and status values shown above are examples. Use the values returned by the API.

### Example Error Response

```json
{
  "id": "1",
  "error": {
    "code": "not_found"
  }
}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://k4k3ru.gitbook.io/k4k3ru-docs/api/payment/get-onchain-intent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
