Invoices
Number of items to return
100Specifies the cursor after which to start returning results. For the first page, this should be left empty. For subsequent pages, use the value of the end_cursor field from the previous response.
Specifies the cursor before which to return results. Use this to paginate backwards. For example, to load the previous page, provide the value of the start_cursor field from the last response.
Filter by creation date start (RFC3339 format)
Filter by creation date end (RFC3339 format)
Filter by due date start (RFC3339 format)
Filter by due date end (RFC3339 format)
Filter by customer ID
Filter by invoice number
Filter by invoice status
OK
gaFpxBACEaXBVABEYbHG+X9LyLnHtruegaFpxBACEaXBVABEYbHG+X9LyLnHBad Request
GET /invoices HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"data": [
{
"created_at": "text",
"currency": "text",
"customer_id": "text",
"due_date": "text",
"id": "text",
"invoice_number": "text",
"last_notification_at": "text",
"line_items": [
{
"amount": 1,
"description": "text",
"quantity": 1
}
],
"memo": "text",
"status": "text",
"sub_total": 1,
"total": 1
}
],
"end_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH",
"has_next_page": true,
"has_previous_page": false,
"start_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
}Due date in YYYY-MM-DD format. If omitted, defaults to the current date from invoice creation.
2025-01-01When true, this invoice is excluded from Autopay at creation time. Use this when your integration pays the invoice synchronously via API and you want to guarantee Autopay never charges the same invoice. Defaults to false.
Created
Bad Request
Unprocessable Entity
POST /invoices HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 137
{
"customer_id": "text",
"due_date": "2025-01-01",
"exclude_from_autopay": false,
"line_items": [
{
"amount": 1,
"description": "text",
"quantity": 1
}
]
}{
"created_at": "text",
"currency": "text",
"customer_id": "text",
"due_date": "text",
"id": "text",
"invoice_number": "text",
"last_notification_at": "text",
"line_items": [
{
"amount": 1,
"description": "text",
"quantity": 1
}
],
"memo": "text",
"status": "text",
"sub_total": 1,
"total": 1
}Invoice ID
OK
Not Found
GET /invoices/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"created_at": "text",
"currency": "text",
"customer_id": "text",
"due_date": "text",
"id": "text",
"invoice_number": "text",
"last_notification_at": "text",
"line_items": [
{
"amount": 1,
"description": "text",
"quantity": 1
}
],
"memo": "text",
"status": "text",
"sub_total": 1,
"total": 1
}Invoice ID
OK
Bad Request
Not Found
Internal Server Error
DELETE /invoices/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"created_at": "text",
"currency": "text",
"customer_id": "text",
"due_date": "text",
"id": "text",
"invoice_number": "text",
"last_notification_at": "text",
"line_items": [
{
"amount": 1,
"description": "text",
"quantity": 1
}
],
"memo": "text",
"status": "text",
"sub_total": 1,
"total": 1
}Invoice ID
OK
Bad Request
Not Found
GET /invoices/{id}/payment-link HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"url": "text"
}Invoice ID
Invoice PDF upload request. Provide exactly one of content (base64-encoded bytes) or url (public HTTPS link to the PDF, downloaded once at upload time and stored). Either way we keep our own copy and never read the link again, so send the request again to publish an updated document.
The PDF document as standard base64 (RFC 4648). Must decode to a valid PDF (the file must start with the PDF header) of at most 10 MB. Mutually exclusive with url.
JVBERi0xLjcKJeLjz9MK...A public, absolute HTTPS link to the PDF. Fetched exactly once, at upload time; we store our own copy and never read the link again — if the document behind it changes, re-send this request to publish the new version. HTTP links, redirects to non-HTTPS locations, and links resolving to private addresses are rejected. The response must be a PDF of at most 10 MB. Mutually exclusive with content.
https://billing.example.com/invoices/INV-1042.pdfpath is the stored location of the PDF, for both variants. It is an opaque identifier — retrieve the document via GET /invoices/{id}/pdf-link
Path is the stored location of the PDF, for both the content and url variants. It is an opaque identifier, not a downloadable link — to retrieve the document, call GET /invoices/{id}/pdf-link for a signed URL.
invoices/pdf/9c2f1e9a-INV-1042.pdfInvalid request: both or neither of content/url provided; content is not valid base64 or does not decode to a PDF; url is not HTTPS, redirects to a non-HTTPS location, is unreachable (non-2xx), resolves to a blocked address, exceeds the redirect limit, times out, or does not return a PDF
Invoice not found
The PDF exceeds the 10 MB limit (applies to both the decoded content bytes and the url response body)
The invoice is not synced from an accounting integration
POST /invoices/{id}/pdf HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"content": "JVBERi0xLjcKJeLjz9MK...",
"url": "https://billing.example.com/invoices/INV-1042.pdf"
}{
"path": "invoices/pdf/9c2f1e9a-INV-1042.pdf"
}Invoice ID
OK
Bad Request
Not Found
GET /invoices/{id}/pdf-link HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"url": "text"
}Invoice ID
OK
Bad Request
Not Found
Internal Server Error
POST /invoices/{id}/restore HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"created_at": "text",
"currency": "text",
"customer_id": "text",
"due_date": "text",
"id": "text",
"invoice_number": "text",
"last_notification_at": "text",
"line_items": [
{
"amount": 1,
"description": "text",
"quantity": 1
}
],
"memo": "text",
"status": "text",
"sub_total": 1,
"total": 1
}Last updated
Was this helpful?
