---
updatedAt: 2025-09-04T09:55:18.000Z
agentTools:
  projectIndex: https://docs.itispay.com/llms.txt
---

# 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
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).