PayNow

Invoices

Get invoices

GEThttps://api.paynow.gg/v1/stores/{storeId}/invoices

Retrieves all invoices for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to retrieve invoices for.
Query parameters
typeenumOptional
customer_idFlakeIdOptional
order_idFlakeIdOptional
referencestringOptional
billing_emailstringOptional
limitintegerOptional
The maximum number of items to return in a single request.
afterFlakeIdOptional
Returns items after the specified ID. Used for forward pagination through results.
beforeFlakeIdOptional
Returns items before the specified ID. Used for backward pagination through results.
ascbooleanOptional
Determines the sort order of returned items. When true, items are returned in ascending order. When false, items are returned in descending order.
Response
200OKInvoiceDto[]
Show fields
created_atstringRequired
Date and time when the invoice was created
currencystringRequired
Three-letter currency code of the invoice
customer_idFlakeIdRequired
discount_amountintegerRequired
Total discount in smallest currency unit (e.g., cents)
giftcard_usage_amountintegerRequired
Amount paid using gift cards in smallest currency unit
idFlakeIdRequired
issued_atstringRequired
Date and time when the invoice was issued
numberintegerRequired
Sequential number of the invoice within its store
order_idFlakeIdRequired
referencestringRequired
Human readable reference of the invoice
statusenumRequired
Possible enum values
  • invalid
  • pending
  • generated
  • failed
store_idFlakeIdRequired
subtotal_amountintegerRequired
Total before tax in smallest currency unit
tax_amountintegerRequired
Total tax in smallest currency unit
total_amountintegerRequired
Total of the invoice in smallest currency unit
typeenumRequired
Possible enum values
  • invalid
  • invoice
  • credit_note
file_keystringOptional
Optional storage key of the generated invoice document
file_sizeintegerOptional
Optional size of the generated invoice document in bytes
parent_invoice_idFlakeIdOptional
refund_idFlakeIdOptional

Failed requests return a PayNowError body. See the error response guide.

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/invoices" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "created_at": "2024-01-01T00:00:00Z",
    "currency": "string",
    "customer_id": "411486491630370816",
    "discount_amount": 0,
    "giftcard_usage_amount": 0,
    "id": "411486491630370816",
    "issued_at": "2024-01-01T00:00:00Z",
    "number": 0,
    "order_id": "411486491630370816",
    "reference": "string",
    "status": "invalid",
    "store_id": "411486491630370816",
    "subtotal_amount": 0,
    "tax_amount": 0,
    "total_amount": 0,
    "type": "invalid",
    "refund_id": "411486491630370816",
    "parent_invoice_id": "411486491630370816",
    "file_key": "string",
    "file_size": 0
  }
]

Download invoice

GEThttps://api.paynow.gg/v1/stores/{storeId}/invoices/{invoiceId}/download

Retrieves a temporary download URL for the invoice PDF.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store the invoice belongs to.
invoiceIdFlakeIdRequired
The ID of the invoice to download.
Response
200OKInvoiceDownloadUrlResponseDto
Show fields
download_urlstringRequired
Temporary URL the invoice document can be downloaded from

Failed requests return a PayNowError body. See the error response guide.

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/invoices/{invoiceId}/download" \
  -H "Authorization: APIKey TOKEN"
Response200
{
  "download_url": "string"
}