Skip to content
Terra WalletDevelopers

Early access. The Terra API and SDKs may change before launch, and the SDK packages are not published yet.

View as Markdown

API reference

Early access

Invoices

Line items, a due date and a hosted invoice page.

Authentication: Secret key or dashboard session.

Guide: Invoices

MethodPathSummary
POST/v1/invoicesCreate an invoice.
POST/v1/invoices/{id}/sendEmail 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#

NameTypeRequiredNotes
customer_emailstring (email)yes
line_itemsarray of {description, quantity, unit_amount}yesunit_amount is a decimal string.
currencystringyesA fiat ISO code.
due_datestring (date)yes
accepted_assetsarray of assetyes

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#

NameTypeRequiredNotes
idstringyesAn inv_ id.