Invoices
Invoices are drafted, sent to customers, and paid via a checkout link. An invoice goes through a defined lifecycle: draft → sent → paid | cancelled.
Object
json
{
"id": "uuid",
"number": "INV-0042",
"status": "draft",
"customer_id": "uuid",
"customer_name": "Acme Corp",
"customer_email": "billing@acme.com",
"line_items": [
{ "description": "Consulting — March", "quantity": 1, "unit_price": 200000000, "total": 200000000 }
],
"subtotal": 200000000,
"tax_rate": 0,
"tax_amount": 0,
"total": 200000000,
"currency": "USDC",
"due_date": "2026-04-15",
"created_at": "2026-03-16T10:00:00Z"
}Status values: draft | sent | paid | cancelled
Create Invoice
http
POST /v1/invoicesBody
| Field | Type | Required | Description |
|---|---|---|---|
customer_id | uuid | Attach existing customer | |
customer_name | string | Inline customer name | |
customer_email | string | ||
customer_country | string | ||
currency | string | Default: USDC | |
line_items | array | ✓ | See below |
due_date | string | ISO 8601 date YYYY-MM-DD | |
tax_rate | number | Applied to subtotal, e.g. 0.1 for 10% |
Line item fields:
| Field | Type | Required |
|---|---|---|
description | string | ✓ |
quantity | integer | ✓ |
unit_price | integer | ✓ |
Example
bash
curl -X POST https://api-test.dpt.xyz/v1/invoices \
-H "Authorization: Bearer dptb_..." \
-H "Content-Type: application/json" \
-d '{
"customer_email": "billing@acme.com",
"customer_name": "Acme Corp",
"currency": "USDC",
"due_date": "2026-04-15",
"line_items": [
{ "description": "Consulting — March", "quantity": 1, "unit_price": 200000000 }
]
}'List Invoices
http
GET /v1/invoicesGet Invoice
http
GET /v1/invoices/{id}Activate Invoice (Send to Customer)
Transitions from draft to sent and generates a hosted checkout link.
http
POST /v1/invoices/{id}/activateBody (optional)
| Field | Type | Description |
|---|---|---|
method | string | crypto (default) or fiat |
send_email | bool | Send email to customer. Default: true |
Response 200
json
{
"invoice": { /* Invoice object */ },
"checkout": { /* Checkout object with hosted_url */ }
}Cancel Invoice
http
DELETE /v1/invoices/{id}Only draft or sent invoices can be cancelled. Returns 204 No Content.
