Appearance
Invoices
Endpoints of the public API tagged Invoices, generated from the API's OpenAPI document. Base URL: your API origin, for example https://api.example.com. See API overview and API keys and scopes.
List invoices (newest first)
text
GET /api/v1/rest/invoices- Operation id:
listInvoices - Scope:
invoices:read
Parameters
| Name | In | Required | Type |
|---|---|---|---|
status | query | no | string |
contactId | query | no | string |
limit | query | no | integer |
Response (200): { success: true, data: { items, nextCursor } }
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
contactId | string | yes | |
number | string | yes | |
status | string | yes | |
currency | string | yes | |
total | number | yes | |
amountPaid | number | yes | |
amountDue | number | yes | |
dueAt | string | yes | |
payUrl | string | yes | |
sentAt | string | yes | |
paidAt | string | yes | |
createdAt | string | yes |
Create a draft invoice for a contact (amounts in minor units; nothing is sent until POST /rest/invoices/{invoiceId}/send)
text
POST /api/v1/rest/invoices- Operation id:
createInvoice - Scope:
invoices:write
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
contactId | string | yes | |
currency | string | yes | |
lines | array | yes | |
dueDate | string | no | |
memo | string | no |
Response (201): { success: true, data }
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
contactId | string | yes | |
number | string | yes | |
status | string | yes | |
currency | string | yes | |
total | number | yes | |
amountPaid | number | yes | |
amountDue | number | yes | |
dueAt | string | yes | |
payUrl | string | yes | |
sentAt | string | yes | |
paidAt | string | yes | |
createdAt | string | yes |
Get an invoice
text
GET /api/v1/rest/invoices/{invoiceId}- Operation id:
getInvoice - Scope:
invoices:read
Parameters
| Name | In | Required | Type |
|---|---|---|---|
invoiceId | path | yes | string |
Response (200): { success: true, data }
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
contactId | string | yes | |
number | string | yes | |
status | string | yes | |
currency | string | yes | |
total | number | yes | |
amountPaid | number | yes | |
amountDue | number | yes | |
dueAt | string | yes | |
payUrl | string | yes | |
sentAt | string | yes | |
paidAt | string | yes | |
createdAt | string | yes |
Email an invoice with its pay link (a draft is numbered first); needs the contact's email and payments set up
text
POST /api/v1/rest/invoices/{invoiceId}/send- Operation id:
sendInvoice - Scope:
invoices:write
Parameters
| Name | In | Required | Type |
|---|---|---|---|
invoiceId | path | yes | string |
Response (200): { success: true, data }
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
contactId | string | yes | |
number | string | yes | |
status | string | yes | |
currency | string | yes | |
total | number | yes | |
amountPaid | number | yes | |
amountDue | number | yes | |
dueAt | string | yes | |
payUrl | string | yes | |
sentAt | string | yes | |
paidAt | string | yes | |
createdAt | string | yes |
List subscriptions (newest first), by status or contact
text
GET /api/v1/rest/subscriptions- Operation id:
listSubscriptions - Scope:
subscriptions:read
Parameters
| Name | In | Required | Type |
|---|---|---|---|
status | query | no | string |
contactId | query | no | string |
limit | query | no | integer |
Response (200): { success: true, data: { items, nextCursor } }
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
contactId | string | yes | |
priceId | string | yes | |
status | string | yes | |
currency | string | yes | |
unitAmount | number | yes | |
quantity | number | yes | |
interval | string | yes | |
intervalCount | number | yes | |
cancelAtPeriodEnd | boolean | yes | |
currentPeriodEnd | string | yes | |
startedAt | string | yes | |
canceledAt | string | yes | |
endedAt | string | yes | |
createdAt | string | yes |
Get a subscription
text
GET /api/v1/rest/subscriptions/{subscriptionId}- Operation id:
getSubscription - Scope:
subscriptions:read
Parameters
| Name | In | Required | Type |
|---|---|---|---|
subscriptionId | path | yes | string |
Response (200): { success: true, data }
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
contactId | string | yes | |
priceId | string | yes | |
status | string | yes | |
currency | string | yes | |
unitAmount | number | yes | |
quantity | number | yes | |
interval | string | yes | |
intervalCount | number | yes | |
cancelAtPeriodEnd | boolean | yes | |
currentPeriodEnd | string | yes | |
startedAt | string | yes | |
canceledAt | string | yes | |
endedAt | string | yes | |
createdAt | string | yes |
Cancel a subscription at the end of the paid period (default) or now
text
POST /api/v1/rest/subscriptions/{subscriptionId}/cancel- Operation id:
cancelSubscription - Scope:
subscriptions:write
Parameters
| Name | In | Required | Type |
|---|---|---|---|
subscriptionId | path | yes | string |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
atPeriodEnd | boolean | no |
Response (200): { success: true, data }
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
contactId | string | yes | |
priceId | string | yes | |
status | string | yes | |
currency | string | yes | |
unitAmount | number | yes | |
quantity | number | yes | |
interval | string | yes | |
intervalCount | number | yes | |
cancelAtPeriodEnd | boolean | yes | |
currentPeriodEnd | string | yes | |
startedAt | string | yes | |
canceledAt | string | yes | |
endedAt | string | yes | |
createdAt | string | yes |