logoAccess

Create invoice

POST
/api/v1/invoices/

Create a manual invoice for a customer.

Authorization

apiKeyHeader
headerx-api-key<token>

API key for authentication. Generate from the dashboard or via POST /v1/api-keys.

Header Parameters

x-api-key*string

API key for authentication

Length1 <= length

Request Body

  1. body
customer_id*string

ID of the customer this invoice is billed to

amount*number

Total invoice amount in minor units (santim). 1 ETB = 100 santim

Range1 <= value
currency?string

ISO 4217 currency code

Default"ETB"
line_items*unknown
due_date*string

Invoice due date in ISO 8601 format. Must be a future date.

metadata*|null
subscription_id?string

Optional subscription this invoice belongs to. Leave it out for a one-off invoice.

Response Body

Response for status 200

application/json
  1. response
id*string
amount*number
currency*string
status*string
issued_at*string
due_date*string
metadata*|null
created_at*string
updated_at*string
curl -X POST 'https://api.tryaccess.xyz/api/v1/invoices/' \  -H 'x-api-key: string' \  -H 'Content-Type: application/json' \  -d '{  "customer_id": "cus_01J9Z8K2P3Q4R5S6T7U8V9W0X1",  "amount": 9900,  "line_items": null,  "due_date": "2025-12-31T00:00:00.000Z",  "metadata": {}}'
{  "id": "string",  "amount": 0,  "currency": "string",  "status": "string",  "issued_at": "string",  "due_date": "string",  "metadata": {},  "created_at": "string",  "updated_at": "string"}

How is this guide?