---
title: "Create a payment"
method: POST
path: "/payments/"
tags: ["Payment"]
---

# Create a payment

`POST /payments/`

Create a single payment in Áskell. Requires a secret key. A payment is executed asynchronously which means that you will have to rely on checking the status of the payment after creating it, or rely on webhooks. You can check the status of the payment using the uuid supplied when the payment is initially created.

Initially, the payment will have the state 'pending'. If the payment is successful, the state will be 'settled'. If the payment fails, the state will be 'failed'.
 If you decide to retry the payment, the payment might have the state 'retrying'.

To summarize, the four states are:

* pending
* settled
* failed
* retrying

## Request body

- PaymentCreate
  - `customer_reference` string, required
  - `amount` string, required
  - `currency` string, required
  - `description` string
  - `reference` string
  - `payment_options` object
    - `payment_processor` 'claim'
    - `claimtemplate` integer
    - `claimrule` integer
    - `payment_date` string, date-time
    - `payor_id` string

## Response `201`

Successful operation

- PaymentInitial
  - `uuid` string, uuid
  - `amount` string
  - `currency` string
  - `description` string
  - `reference` string
  - `state` 'failed' | 'settled' | 'pending' | 'retrying'
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `transactions` Transaction[]
    - `uuid` string, uuid
    - `data` object — Arbitrary data on transaction from payment processor
    - `state` 'failed' | 'settled' | 'inital' | 'pending' | 'canceled' | 'refunded'
    - `amount` string
    - `currency` string

## Other responses

- `400` — Invalid status value

---

[API](https://skmtc.dev/askell/apis/a-skell-api.md) · [All operations](https://skmtc.dev/askell/apis/a-skell-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/askell/a-skell-api/revisions/9234f937fa26/schema)
