---
title: "Reads a cart's payment back after the buyer's page confirmed it, answering the order once it is paid."
---

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

Path: Sherpo customer API › checkout

`POST /v1/stores/{store}/checkouts/{checkout}/confirm`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `checkout:write`

## Path parameters

- `store` (`confirmCheckout.path.store`; string, required) — A hostname of the store.
- `checkout` (`confirmCheckout.path.checkout`; string, required)
  - minLength 1

## Request body

_Optional._

## Example request

```json
{}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/customer/v1/stores/<store>/checkouts/<checkout>/confirm' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/customer/v1/stores/<store>/checkouts/<checkout>/confirm';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/customer/v1/stores/<store>/checkouts/<checkout>/confirm"

payload = {}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Reads a cart's payment back after the buyer's page confirmed it, answering the order once it is paid.

#### Example

```json
{
  "status": "paid",
  "order": {
    "id": "string",
    "number": 0
  }
}
```

Any of:

- `object`
- `object`
- `object`
- `object`

### default

A problem; see https://api.sherpo.io/customer/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`confirmCheckout.response.default.type`; string, required)
  - format `uri`
- `title` (`confirmCheckout.response.default.title`; string, required)
- `status` (`confirmCheckout.response.default.status`; integer, required)
- `detail` (`confirmCheckout.response.default.detail`; string, required)
- `code` (`confirmCheckout.response.default.code`; string, optional)
- `context` (`confirmCheckout.response.default.context`; object, optional)
- `reached_core` (`confirmCheckout.response.default.reached_core`; boolean, optional)
- `core_answer` (`confirmCheckout.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/customer-api/reference/confirm-checkout/index.md
