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

# `POST /api/v1/payments`

> `POST /api/v1/payments`

### Request body

`CreatePaymentRequest`

<ParamField body="amount" type="string" required />

<ParamField body="currency" type="string,null" />

<ParamField body="customer_id" type="string,null (uuid)" />

<ParamField body="description" type="string,null" />

<ParamField body="external_id" type="string,null" />

<ParamField body="order_id" type="string (uuid)" required />

<ParamField body="payment_method" type="string,null" />

### Responses

<ResponseField name="201" type="PaymentResponse">
  Payment created
</ResponseField>

<ResponseField name="400" type="ErrorBody">
  Invalid request
</ResponseField>

<ResponseField name="422" type="ErrorBody">
  Idempotency-Key reused with a different body
</ResponseField>

<ResponseField name="428" type="ErrorBody">
  Idempotency-Key header required on this endpoint (configurable)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/payments' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "amount": "string",
    "currency": null,
    "customer_id": null,
    "description": null,
    "external_id": null,
    "order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "payment_method": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "amount": "string",
    "amount_refunded": "string",
    "created_at": "2026-07-24T12:00:00Z",
    "currency": "string",
    "customer_id": null,
    "external_id": null,
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "order_id": null,
    "payment_method": "string",
    "payment_number": "string",
    "processor": null,
    "status": "string",
    "updated_at": "2026-07-24T12:00:00Z"
  }
  ```
</ResponseExample>
