API reference
Early accessInvoices
Line items, a due date and a hosted invoice page.
Authentication: Secret key or dashboard session.
Guide: Invoices
| Method | Path | Summary |
|---|---|---|
| POST | /v1/invoices | Create an invoice. |
| POST | /v1/invoices/{id}/send | Email the invoice to the customer. |
POST/v1/invoices#
Create an invoice.
- Operation id:
createInvoice - Authentication: Secret key or dashboard session
Idempotency-Key: required- Source: the v1 contract. This operation is not in the OpenAPI document yet.
Request body#
| Name | Type | Required | Notes |
|---|---|---|---|
customer_email | string (email) | yes | |
line_items | array of {description, quantity, unit_amount} | yes | unit_amount is a decimal string. |
currency | string | yes | A fiat ISO code. |
due_date | string (date) | yes | |
accepted_assets | array of asset | yes |
Response#
The invoice (inv_...). Its page is https://pay.terrawallet.us/i/inv_...
POST/v1/invoices/{id}/send#
Email the invoice to the customer.
- Operation id:
sendInvoice - Authentication: Secret key or dashboard session
- Source: the v1 contract. This operation is not in the OpenAPI document yet.
Path parameters#
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | An inv_ id. |