> For the complete documentation index, see [llms.txt](https://docs.fonbnk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fonbnk.com/server-to-server/api-endpoints/confirm-order.md).

# Confirm order

## <mark style="color:$warning;">\[POST]</mark> /api/v2/order/confirm

Tells us the user has paid. The order leaves `deposit_awaiting` for `deposit_validating`, and we start checking for the funds.

{% hint style="warning" %}
**Only an order in `deposit_awaiting` can be confirmed.** Any other status — including an order you have already confirmed — returns `400` "Order is not in a state that allows confirmation". Confirming twice is an error, not a no-op, so make your retry logic check the status first.

This endpoint also requires the end-user-creation capability on your account; without it every call returns `403`. See [Integration guide](/server-to-server/integration-guide.md).
{% endhint %}

Call it after the user has actually transferred. Confirming an order that was never paid just means it fails validation later.

If `order.deposit.transferInstructions.fieldsToConfirmOrder` is not empty, send those fields here. The common case is a crypto deposit, where you must supply the `blockchainTransactionHash` of the user's transfer.

Request body type:

{% code overflow="wrap" expandable="true" %}

```typescript
type RequestBody = {
  orderId: string;
  fieldsToConfirmOrder?: Record<string, string>;
}
```

{% endcode %}

Request body example (nothing extra required):

```json
{
  "orderId": "68728fa56ff494df5f39faf5"
}
```

Request body example (crypto deposit):

```json
{
  "orderId": "68728fa56ff494df5f39faf5",
  "fieldsToConfirmOrder": {
    "blockchainTransactionHash": "0xe168c39bf7165c0eaa88e4df1e21e987666e44f11f2bea6f9be1c145f382dade"
  }
}
```

### Response

Returns the updated order — the same `Order` object as [Get order](/server-to-server/api-endpoints/get-order.md). From here the order moves on its own; watch it with the [webhook](/server-to-server/webhooks.md) or by polling [Get order](/server-to-server/api-endpoints/get-order.md).

{% hint style="info" %}
Crypto deposits and withdrawals on your own merchant balance are confirmed only via their dedicated endpoints under [Merchant balance](/server-to-server/api-endpoints/merchant-balance.md). This endpoint rejects them with `400`.
{% endhint %}


---

# 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://docs.fonbnk.com/server-to-server/api-endpoints/confirm-order.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.
