For the complete documentation index, see llms.txt. This page is also available as Markdown.

Invoices

List invoices

get

Get a paginated list of invoices with optional filtering

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Query parameters
limitintegerOptional

Number of items to return

Default: 100
afterstringOptional

Specifies 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.

beforestringOptional

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.

created_at_startstringOptional

Filter by creation date start (RFC3339 format)

created_at_endstringOptional

Filter by creation date end (RFC3339 format)

due_date_startstringOptional

Filter by due date start (RFC3339 format)

due_date_endstringOptional

Filter by due date end (RFC3339 format)

customer_idstringOptional

Filter by customer ID

invoice_numberstringOptional

Filter by invoice number

statusstring · enumOptional

Filter by invoice status

Possible values:
Responses
200

OK

application/json
end_cursorstringOptionalExample: gaFpxBACEaXBVABEYbHG+X9LyLnH
has_next_pagebooleanOptionalExample: true
has_previous_pagebooleanOptional
start_cursorstringOptionalExample: gaFpxBACEaXBVABEYbHG+X9LyLnH
get/invoices
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"
}

Create an invoice

post

Create a new invoice with line items

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Body
customer_idstringOptional
due_datestringOptional

Due date in YYYY-MM-DD format. If omitted, defaults to the current date from invoice creation.

Example: 2025-01-01
exclude_from_autopaybooleanOptional

When 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.

Responses
201

Created

application/json
created_atstringOptional
currencystringOptional
customer_idstringOptional
due_datestringOptional
idstringOptional
invoice_numberstringOptional
last_notification_atstringOptional
memostringOptional
statusstringOptional
sub_totalnumberOptional
totalnumberOptional
post/invoices
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
}

Get an invoice

get

Get invoice details by ID

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

application/json
created_atstringOptional
currencystringOptional
customer_idstringOptional
due_datestringOptional
idstringOptional
invoice_numberstringOptional
last_notification_atstringOptional
memostringOptional
statusstringOptional
sub_totalnumberOptional
totalnumberOptional
get/invoices/{id}
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
}

Archive an invoice

delete

Archive an invoice

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

application/json
created_atstringOptional
currencystringOptional
customer_idstringOptional
due_datestringOptional
idstringOptional
invoice_numberstringOptional
last_notification_atstringOptional
memostringOptional
statusstringOptional
sub_totalnumberOptional
totalnumberOptional
delete/invoices/{id}
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
}
get

Get a payment link for the specified invoice

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

application/json
urlstringOptional
get/invoices/{id}/payment-link
GET /invoices/{id}/payment-link HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "url": "text"
}

Upload invoice PDF

post

Upload the original invoice PDF (max 10 MB). Provide exactly one of content (base64-encoded bytes) or url (a public HTTPS link we download once, at upload time). Both variants behave identically once accepted: we store our own copy of the bytes and never read the link again, so the document keeps serving even if your host later goes away, and an unreachable link fails this request outright rather than degrading for a customer later. Updates are push-only: we never re-read the link or poll for changes, so a PDF updated in your system is not reflected here until you send this request again — with fresh content, or with the url (the same url is fine; we re-download it at that moment). Each upload replaces the previous PDF; last write wins. Only invoices synced from an accounting integration accept a PDF: an invoice created through POST /invoices has no original document from your system, and returns 422 unsupported_invoice.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Invoice ID

Body

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.

contentstringOptional

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.

Example: JVBERi0xLjcKJeLjz9MK...
urlstringOptional

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.

Example: https://billing.example.com/invoices/INV-1042.pdf
Responses
200

path is the stored location of the PDF, for both variants. It is an opaque identifier — retrieve the document via GET /invoices/{id}/pdf-link

application/json
pathstringOptional

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.

Example: invoices/pdf/9c2f1e9a-INV-1042.pdf
post/invoices/{id}/pdf
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"
}
get

Get a signed PDF URL for the specified invoice

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

application/json
urlstringOptional
get/invoices/{id}/pdf-link
GET /invoices/{id}/pdf-link HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "url": "text"
}

Restore an invoice

post

Restore an invoice

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

application/json
created_atstringOptional
currencystringOptional
customer_idstringOptional
due_datestringOptional
idstringOptional
invoice_numberstringOptional
last_notification_atstringOptional
memostringOptional
statusstringOptional
sub_totalnumberOptional
totalnumberOptional
post/invoices/{id}/restore
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?