Invoices

List invoices

get

Get a paginated list of invoices with optional filtering

Authorizations
Query parameters
limitintegerOptional

Number of items to return

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

statusstring · enumOptional

Filter by invoice status

Possible values:
Responses
200

OK

application/json
get
GET /invoices HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "created_at": "text",
      "currency": "text",
      "customer_id": "text",
      "due_date": "text",
      "id": "text",
      "line_items": [
        {
          "amount": 1,
          "description": "text",
          "quantity": 1
        }
      ],
      "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

Authorizations
Body
currencystring · enumOptional

@enum USD

Example: USDPossible values:
customer_idstringOptional
due_datestringOptionalExample: 2025-01-01
Responses
201

Created

application/json
post
POST /invoices HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 125

{
  "currency": "USD",
  "customer_id": "text",
  "due_date": "2025-01-01",
  "line_items": [
    {
      "amount": 1,
      "description": "text",
      "quantity": 1
    }
  ]
}
{
  "created_at": "text",
  "currency": "text",
  "customer_id": "text",
  "due_date": "text",
  "id": "text",
  "line_items": [
    {
      "amount": 1,
      "description": "text",
      "quantity": 1
    }
  ],
  "status": "text",
  "sub_total": 1,
  "total": 1
}

Get an invoice

get

Get invoice details by ID

Authorizations
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

application/json
get
GET /invoices/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "created_at": "text",
  "currency": "text",
  "customer_id": "text",
  "due_date": "text",
  "id": "text",
  "line_items": [
    {
      "amount": 1,
      "description": "text",
      "quantity": 1
    }
  ],
  "status": "text",
  "sub_total": 1,
  "total": 1
}

Archive an invoice

delete

Archive an invoice

Authorizations
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

application/json
delete
DELETE /invoices/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "created_at": "text",
  "currency": "text",
  "customer_id": "text",
  "due_date": "text",
  "id": "text",
  "line_items": [
    {
      "amount": 1,
      "description": "text",
      "quantity": 1
    }
  ],
  "status": "text",
  "sub_total": 1,
  "total": 1
}
get

Get a payment link for the specified invoice

Authorizations
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

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

Get a signed PDF URL for the specified invoice

Authorizations
Path parameters
idstringRequired

Invoice ID

Responses
200

OK

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

Was this helpful?