Skip to main content

Public Invoice

Retrieve invoice details for customer viewing.

note

This is a public endpoint — no authentication headers are required.

GEThttps://api.zenpayz.com/merchant/api/v1/invoices/:invoiceId/public
Bearer · API key

Request

Path Parameters

ParameterTypeDescription
invoiceId
REQUIRED
stringThe invoice ID (e.g. inv_a1b2c3d4e5f6g7h8)

Response

Success (200 OK)

{
"success": true,
"data": {
"invoiceId": "inv_a1b2c3d4e5f6g7h8",
"invoiceNumber": "INV-2024-0001",
"merchantName": "Acme Corp",
"merchantLogo": "https://example.com/logo.png",
"customerName": "John Doe",
"customerEmail": "john@example.com",
"currency": "USD",
"status": "SENT",
"issueDate": "2024-01-15T00:00:00.000Z",
"dueDate": "2024-02-15T00:00:00.000Z",
"subtotal": 250.00,
"taxRate": 10,
"taxAmount": 25.00,
"discountAmount": 0,
"totalAmount": 275.00,
"amountPaid": 0,
"amountDue": 275.00,
"notes": "Thank you for your business",
"terms": "Net 30",
"lineItems": [
{
"description": "Pro Plan - Monthly",
"quantity": 5,
"unitPrice": 50.00,
"amount": 250.00
}
]
},
"message": "Invoice retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-15T10:30:00.000Z",
"processing_time_ms": 25,
"api_version": "v1",
"endpoint": "GET /invoices/:invoiceId/public",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
INVOICE_NOT_FOUND404Invoice does not exist

Examples

curl -X GET https://api.zenpayz.com/merchant/api/v1/invoices/inv_a1b2c3d4e5f6g7h8/public