Create an invoice
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/invoices"
payload := strings.NewReader("{ \"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\" ] }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("FeitPay-Environment", "test") req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.feitpay.com/v1/invoices';const options = { method: 'POST', headers: { 'FeitPay-Environment': 'test', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"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"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).
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.
Unique key per logical create operation (max 255 chars). Replays return the original response; reuse with a different body returns idempotency_error.
Request Bodyrequired
Section titled “Request Bodyrequired”object
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).
object
Decimal string. Never a float.
object
object
[crypto, pix] or [pix] (BRL only, where PIX is enabled) lets the customer pay with PIX. Default: crypto.
Responses
Section titled “Responses”Created with a payment intent and checkout URL.
object
Decimal string. Never a float.
Decimal string. Never a float.
object
object
Decimal string. Never a float.
Decimal string. Never a float.
object
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.
object
object
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.
Human-readable explanation in English.
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.
object
object
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.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Validation failed.
object
object
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.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
object
object
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.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}