Create an archived invoice

Create an invoice with archived status for historical record keeping.

Endpoint

POST /archived

Request Body Parameters

ParameterTypeRequiredDescriptionExample ValueNotes
order_idstringYesUnique identifier for your order"order-12345"Must be unique for each order
fiat_amountnumber (double)NoAmount in fiat currency100.50Minimum 0; provide this or crypto_amount, not both
fiat_currencystringNoFiat currency code"EUR"Only EUR supported at the moment
crypto_amountnumber (double)NoAmount in cryptocurrency0.005Minimum 0; provide this or fiat_amount
currencystringYesCryptocurrency code"BTC"Must be a supported currency (check /currencies)
allowed_error_percentintegerNoAllowed payment error percentage50-100; defaults to system value if omitted
order_namestringNoDescriptive name for the order"Premium Subscription"For reference
callback_urlstringNoURL for status update webhooks"https://your-site.com/callback"Must be a valid URI
created_atstringNoOptional custom creation timestamp2006-01-02Must not be in the future

cURL Example

curl -X POST https://api.itispay.com/api/v1/archived \
-H "Api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "order_id": "order-12345",
  "fiat_amount": 100.50,
  "fiat_currency": "EUR",
  "currency": "BTC",
  "allowed_error_percent": 5,
  "order_name": "Premium Subscription",
  "callback_url": "https://your-site.com/callback",
  "created_at": "2006-01-02T15:04:05Z07:00"
}'

Response

  • Successfull response: 201 Archived invoice created successfully: Returns the full invoice details (see Invoice Structure below).
  • Errors: 400 (invalid body), 401 (unauthorized), 422 (validation, e.g., missing required fields).