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

# Create a checkout

> Creates a checkout intent. It does not create a reservation yet. When the stay requires an immediate payment, the response returns a PaynoPain tokenizer token; when the total due now is zero, call complete.

`POST /checkouts`

Creates a checkout intent. It does not create a reservation yet. When the stay requires an immediate payment, the response returns a PaynoPain tokenizer token; when the total due now is zero, call complete.

## Authentication

Send the scoped API key as `Authorization: Bearer bqp_pk_...`. All requests use the base URL `https://api.buqipi.com/connect/v1`.

## Parameters

| Name | In | Type | Required | Description |
| - | - | - | - | - |
| `Idempotency-Key` | header | string | no | Client-generated key for safe retries. Reusing it with a different body returns a conflict. |

## Body fields

| Field | Type | Required | Description |
| - | - | - | - |
| `category_id` | string | yes | |
| `check_in` | string (date) | yes | |
| `check_out` | string (date) | yes | |
| `adults` | integer | yes | |
| `children` | array of integer | no | |
| `rate_id` | string | no | |
| `plan_id` | string | no | |
| `quantity` | integer default: 1 | no | |
| `extras` | array of string | no | |
| `coupon` | string | no | |
| `locale` | string default: "es" | no | |
| `external_ref` | string | yes | Partner checkout reference; unique per API client. |
| `guest` | object | yes | |
| `guest.first_name` | string | yes | |
| `guest.last_name` | string | no | |
| `guest.email` | string (email) | no | |
| `guest.phone` | string | no | |
| `guest.country` | string | no | |
| `guest.address` | string | no | |
| `guest.city` | string | no | |
| `guest.state` | string | no | |
| `guest.postal_code` | string | no | |
| `notes` | string | no | |
| `return_url` | string (uri) | yes | HTTPS URL where the partner receives the guest after 3DS. Buqipi appends checkout\_id and status=ok\|ko. In production, PARTNER\_RETURN\_URL\_HOSTS can restrict allowed hosts. |

## Example request

```json theme={null}
{
  "category_id": "LCPB01",
  "check_in": "2026-12-22",
  "check_out": "2026-12-24",
  "adults": 1,
  "external_ref": "web-2026-000184",
  "guest": {
    "first_name": "Laura",
    "last_name": "Méndez",
    "email": "laura@example.com"
  },
  "return_url": "https://partner.example.com/booking/return"
}
```

## Responses

| Status | Description |
| - | - |
| `201` | Checkout created. |
| `400` | The request is syntactically valid but cannot be processed. |
| `401` | Missing, invalid, expired or revoked API key. |
| `403` | The key is valid but lacks the required scope or property/category access. |
| `409` | The requested state change conflicts with the current booking, payment or inventory state. |
| `422` | One or more request fields are invalid. |
| `429` | The key or IP exceeded its quota. |
| `500` | An unexpected server error. Details are not exposed to the client. |

## Example response (201)

```json theme={null}
{
  "data": {
    "id": "BKPRYB3N9BG9R",
    "external_ref": "web-2026-000184",
    "status": "requires_tokenization",
    "amount": 143.1,
    "currency": "EUR",
    "requires_payment": true,
    "return_url": "https://partner.example.com/booking/return",
    "expires_at": "2026-11-07T17:10:19+01:00",
    "tokenizer": {
      "provider": "paynopain",
      "script_url": "https://pci-proxy-api.paynopain.com/sandbox/client.js",
      "token": "eyJ...",
      "external_id": "BKPRYB3N9BG9R"
    }
  },
  "meta": {
    "api": "buqipi-connect",
    "version": "v1",
    "request_id": "46cee2e2-d32c-48c8-ae76-e9c33ba5022d",
    "generated_at": "2026-11-07T16:40:19+01:00"
  }
}
```

## Response fields (201)

| Field | Type | Required | Description |
| - | - | - | - |
| `data` | object | yes | |
| `data.id` | string | yes | |
| `data.external_ref` | string | yes | |
| `data.status` | string enum: requires\_tokenization, requires\_confirmation, processing, requires\_action, completed, failed, expired | yes | |
| `data.amount` | number | yes | |
| `data.currency` | string | yes | |
| `data.requires_payment` | boolean | yes | |
| `data.return_url` | string (uri) | yes | |
| `data.expires_at` | string (date-time) | yes | |
| `data.tokenizer` | object | no | |
| `data.action` | object | no | |
| `data.failure_message` | string | no | |
| `data.booking` | object | no | |
| `meta` | object | yes | Response trace and pagination metadata. |
| `meta.api` | string enum: buqipi-connect | yes | |
| `meta.version` | string enum: v1 | yes | |
| `meta.request_id` | string (uuid) | yes | |
| `meta.generated_at` | string (date-time) | yes | |
| `meta.pagination` | object | no | |

## Specification

[View the full OpenAPI specification](https://api.pastes.dev/8OG3RS6RJx).


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