Create an archived invoice
Create an invoice with archived status for historical record keeping.
Endpoint
POST /archived
Request Body Parameters
Parameter | Type | Required | Description | Example Value | Notes |
---|---|---|---|---|---|
order_id | string | Yes | Unique identifier for your order | "order-12345" | Must be unique for each order |
fiat_amount | number (double) | No | Amount in fiat currency | 100.50 | Minimum 0; provide this or crypto_amount, not both |
fiat_currency | string | No | Fiat currency code | "EUR" | Only EUR supported at the moment |
crypto_amount | number (double) | No | Amount in cryptocurrency | 0.005 | Minimum 0; provide this or fiat_amount |
currency | string | Yes | Cryptocurrency code | "BTC" | Must be a supported currency (check /currencies) |
allowed_error_percent | integer | No | Allowed payment error percentage | 5 | 0-100; defaults to system value if omitted |
order_name | string | No | Descriptive name for the order | "Premium Subscription" | For reference |
callback_url | string | No | URL for status update webhooks | "https://your-site.com/callback" | Must be a valid URI |
created_at | string | No | Optional custom creation timestamp | 2006-01-02 | Must 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).
Updated 1 day ago