Xara Business API
API reference

Invoices

Request an invoice for products, subscriptions, services, or ticket tiers.

POST /Payment/requestInvoice creates an invoice for a customer and returns the details your integration needs to continue the payment flow.

This endpoint does not use a Bearer token. The business is identified by the business_id in the request body.

Request body

FieldTypeRequiredDescription
phonestringYesThe paying customer's phone number.
business_idstringYesThe Xara business receiving the payment.
itemsstringYesJSON string of [{ product_id, quantity }]. Each product must belong to the business.
customer_namestringNoCustomer name. Derived from the phone number when omitted.
notestringNoFree-text note stored on the invoice.
delivery_destination_idIDNoA delivery destination belonging to the business. Its fee is added as a line item.

Each entry inside items contains the catalog item's product_id and its quantity. Xara calculates pricing from the business catalog.

items is a JSON-encoded string, not a nested JSON array. In JavaScript, build the array normally and pass it through JSON.stringify(items) before sending the request.

Handle the response

The success response contains invoice information in data. Keep the returned invoice reference with your own order or checkout ID. The same reference appears in payment webhooks, so use it to match the payment to your order.

Do not mark an order as paid only because invoice creation succeeded. Wait for an invoice.paid webhook, verify its signature, and make sure you do not process the same delivery twice.

The request panel is read-only. It shows the request and response format but does not send anything to the API.
Copyright © 2026