> ## 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.

# Ap create payment

> Ap create payment

### Request body

`CreateApPaymentRequest`

<ParamField body="allocations" type="ApPaymentAllocationRequest[]" />

<ParamField body="amount" type="string" required>
  Decimal amount as a string.
</ParamField>

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

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

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

<ParamField body="payment_method" type="string" required>
  One of `check`, `ach`, `wire`, `credit_card`, `cash`, `other`.
</ParamField>

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

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

### Responses

<ResponseField name="201" type="ApPaymentResponse" />

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

<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/ap/payments' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "allocations": [
      {
        "amount": "string",
        "bill_id": "string"
      }
    ],
    "amount": "string",
    "bank_account": null,
    "check_number": null,
    "memo": null,
    "payment_method": "string",
    "reference_number": null,
    "supplier_id": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "amount": "string",
    "created_at": "string",
    "currency": "string",
    "id": "string",
    "payment_method": "string",
    "payment_number": "string",
    "status": "string",
    "supplier_id": "string"
  }
  ```
</ResponseExample>
