curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/ap/payments' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"allocations": [
{
"amount": "49.00",
"bill_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"amount": "49.00",
"bank_account": "string",
"check_number": "string",
"memo": "string",
"payment_method": "card",
"reference_number": "string",
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"amount": "49.00",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "card",
"payment_number": "string",
"status": "pending",
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Ap create payment
Ap create payment
POST
/
api
/
v1
/
ap
/
payments
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/ap/payments' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"allocations": [
{
"amount": "49.00",
"bill_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"amount": "49.00",
"bank_account": "string",
"check_number": "string",
"memo": "string",
"payment_method": "card",
"reference_number": "string",
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"amount": "49.00",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "card",
"payment_number": "string",
"status": "pending",
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
Headers
string,null
Client-generated key; replaying it with an identical body returns the original response. Required by default on this endpoint.
Request body
CreateApPaymentRequest
ApPaymentAllocationRequest[]
string
required
Decimal amount as a string.
string,null
string,null
string,null
string
required
One of
check, ach, wire, credit_card, cash, other.string,null
string
required
Response
ApPaymentResponse
string
required
string
required
string
required
string
required
string
required
string
required
string
required
string
required
Status codes
| Code | Meaning |
|---|---|
201 | — |
400 | — |
422 | Idempotency-Key reused with a different body |
428 | Idempotency-Key header required on this endpoint (configurable) |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/ap/payments' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"allocations": [
{
"amount": "49.00",
"bill_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"amount": "49.00",
"bank_account": "string",
"check_number": "string",
"memo": "string",
"payment_method": "card",
"reference_number": "string",
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"amount": "49.00",
"created_at": "2026-08-31T14:22:05Z",
"currency": "USD",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method": "card",
"payment_number": "string",
"status": "pending",
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Last modified on September 21, 2026