Invoices
Register Customer by Invoice Token
POST
Register Customer by Invoice Token
Documentation Index
Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
Use this file to discover all available pages before exploring further.
Register Customer by Invoice Token
Creates a customer record and grants portal access using abasketSession GUID token paired with an invoice ID. This endpoint is called at the end of a guest checkout flow — after payment has been completed — to convert the guest into a registered customer. The combination of the invoice ID and the basket session token is used to verify the purchase, create (or link) the customer account, and return a new token that can be used for subsequent token-gated operations on that invoice.
Authentication
No bearer token is required. Authentication is performed via thetoken query parameter, which must be the basketSession GUID associated with the completed guest checkout session.
Path Parameters
The unique identifier of the invoice generated during guest checkout. This is used alongside the basket session token to locate and validate the
purchase.
Query Parameters
The
basketSession GUID token associated with the guest checkout session. This token is typically passed through the checkout completion URL and
ties the anonymous session to the invoice, enabling customer record creation and portal access to be granted.Response
A new invoice-scoped token returned after successful customer registration. This token can be used for subsequent token-gated requests on this
invoice, such as downloading the invoice PDF via
pdfByToken.Example Response
Usage in Portal
This endpoint is called on the guest checkout completion page immediately after a successful payment. It uses thebasketSession GUID (available from the checkout URL or session state) together with the invoice ID to:
- Verify the completed guest purchase.
- Create a new customer record (or link to an existing one).
- Grant the customer portal access.
- Return a fresh token for follow-up token-gated operations (e.g. PDF download).
- File:
src/views/public/checkout/complete/index.tsx
Typical integration pattern
Related Endpoints
GET /api/public/billing/invoices/{invoiceId}/pdfByToken– Download invoice PDF using a guest tokenGET /api/public/billing/invoices/{invoiceId}– Get full invoice details (authenticated)
Error Responses
The provided
basketSession token is invalid, has already been used, or has expired.No invoice exists with the specified ID, or the token does not match the invoice.
Register Customer by Invoice Token