Skip to main content
Fetch a full invoice record to check payment status, review settlement history, or inspect associated usage events. The response includes all related objects — service, payment plan, user, subscription, settlements, and usage events — so you have a complete picture of the invoice lifecycle in a single call.
GET https://api.retempo.xyz/api/v1/invoices/:invoiceId

Path Parameters

invoiceId
string
required
The unique identifier of the invoice to retrieve.

Response

A successful request returns HTTP 200 OK with the full invoice object and all related records.
invoice
object
The requested invoice with all related records.

200 — Invoice retrieved

{
  "invoice": {
    "id": "clz1invoice999",
    "serviceId": "clz1abc2def3ghi4",
    "paymentPlanId": "clz1plan567",
    "userId": "clz1user111",
    "subscriptionId": null,
    "status": "OPEN",
    "amount": "49.000000",
    "currency": "USDC",
    "dueAt": "2025-07-01T00:00:00.000Z",
    "paidAt": null,
    "createdAt": "2025-06-01T10:15:00.000Z",
    "service": {
      "id": "clz1abc2def3ghi4",
      "name": "DataStream Pro",
      "status": "ACTIVE"
    },
    "paymentPlan": {
      "id": "clz1plan567",
      "name": "Pro Monthly",
      "amount": "49.000000",
      "currency": "USDC"
    },
    "user": {
      "id": "clz1user111",
      "email": "subscriber@example.com"
    },
    "subscription": null,
    "settlements": [],
    "usageEvents": []
  }
}

Example Request

curl https://api.retempo.xyz/api/v1/invoices/clz1invoice999

Error Codes

StatusMessageCondition
404 Not FoundInvoice was not found.No invoice exists for the provided ID.
Check the paidAt field — it is populated only after a settlement against this invoice is confirmed. Until then it is null regardless of the invoice status.