Skip to content

Create an invoice

POST
/v1/invoices
curl --request POST \
--url https://api.feitpay.com/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'FeitPay-Environment: test' \
--data '{ "store_id": "example", "currency": "EUR", "items": [ { "description": "example", "quantity": 1, "unit_amount": "59.90" } ], "customer": { "name": "example", "email": "hello@example.com", "reference": "example" }, "memo": "example", "due_at": "2026-04-15T12:00:00Z", "expires_in_seconds": 604800, "allowed_networks": [ "example" ], "metadata": { "additionalProperty": "example" }, "allowed_methods": [ "crypto" ] }'

A live invoice’s total must be at least the live minimum for its currency (minimum_amount on GET /v1/price-currencies): smaller totals get 422 amount_below_minimum on items, and a currency without a current exchange rate gets 403 currency_unavailable. An organization creates at most 120 invoices per hour in each mode (429 rate_limited; deployments may configure another limit). Honors Idempotency-Key (replays return the original response for 24 h).

FeitPay-Organization
string

Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).

FeitPay-Environment
string
default: test
Allowed values: test live

test (default) or live for dashboard sessions. API keys determine the environment. Until the platform is in production, configuration (stores, webhook endpoints, payment links) is live and money movement answers payments_not_enabled.

Idempotency-Key
string
<= 255 characters

Unique key per logical create operation (max 255 chars). Replays return the original response; reuse with a different body returns idempotency_error.

Media typeapplication/json
object
store_id
required
string
currency
required

ISO 4217 code of a price currency. GET /v1/price-currencies lists them with their decimals and, for live payments, the current minimum; amounts use the currency’s minor units (no decimals for JPY, three for KWD).

string
Allowed values: EUR BRL USD GBP AED ARS AUD BDT BHD BMD CAD CHF CLP CNY CZK DKK GEL HKD HUF IDR ILS INR JPY KRW KWD LKR MXN MYR NGN NOK NZD PHP PKR PLN SAR SEK SGD THB TRY TWD UAH VND ZAR
items
required
Array<object>
>= 1 items <= 50 items
object
description
required
string
>= 1 characters <= 200 characters
quantity
required
integer
>= 1 <= 1000000
unit_amount
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
customer
object
name
string
<= 200 characters
email
string format: email
reference
string
<= 200 characters
memo
string
<= 2000 characters
due_at
string format: date-time
expires_in_seconds
integer
default: 604800 >= 300 <= 2592000
allowed_networks
Array<string>
metadata
object
<= 20 properties
key
additional properties
string
<= 500 characters
allowed_methods

[crypto, pix] or [pix] (BRL only, where PIX is enabled) lets the customer pay with PIX. Default: crypto.

Array<string>
Allowed values: crypto pix

Created with a payment intent and checkout URL.

Media typeapplication/json
object
id
required
string
object
required
string
Allowed value: invoice
livemode
required
boolean
number
required
string
store_id
required
string
status
required
string
Allowed values: open paid partially_paid expired void review
currency
required
string
subtotal
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
total
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
customer
required
object
name
required
string | null
email
required
string | null
reference
required
string | null
items
required
Array<object>
object
description
required
string
quantity
required
integer
unit_amount
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
amount
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
memo
required
string | null
due_at
required
string | null format: date-time
payment_intent_id
required
string | null
payment_status
required
One of:
string
Allowed values: created awaiting_payment detected confirming confirmed underpaid overpaid expired late_payment reorged manual_review resolved failed canceled
checkout_url
required
string | null
metadata
required
object
<= 20 properties
key
additional properties
string
<= 500 characters
created_at
required
string format: date-time
voided_at
required
string | null format: date-time

Example

{
"object": "invoice",
"status": "open",
"subtotal": "59.90",
"total": "59.90",
"items": [
{
"unit_amount": "59.90",
"amount": "59.90"
}
],
"payment_status": "created"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Authenticated but not permitted. Any route may also answer request_blocked when abuse protection has blocked the client IP for a while.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Validation failed.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Too many requests. See Retry-After.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}
Retry-After
integer