Integration guide
This guide covers how to manage value receipts programmatically and embed them in your application. For a conceptual overview of what value receipts are and how they work, see the overview.
Prerequisites
- A Paid API key and the Paid SDK installed in the service that manages receipts.
- Signals flowing and delivered value configured.
- At least one customer with signal data in the date range you want to summarize.
- For private or embedded receipts, embed authentication configured.
Creating and managing value receipts
Create a value receipt
Each call creates a receipt for the customer and date range you give it, from the delivered value available at that moment. Calling it twice with the same customer and dates gives you two receipts — that is how you report a period again with newer data.
POST /value-receipts/sync is deprecated. It returns the receipt a customer
already has for a date range instead of creating one. Use the create endpoint
below.
You only need a customer and a time period. No orders or products are required.
Choosing the date range
The range has to have ended — a receipt reports a period the customer can check, so an end date in the future is rejected. If your clock runs a few minutes ahead of ours, an end date just past the current time is read as the moment your request arrives rather than refused, so “through the end of today” works without you having to subtract a safety margin.
A range with nothing delivered in it still produces a receipt, reporting zero. Send the range you want the customer to see.
Python
Node.js
Go
You can optionally scope a value receipt to a product or an order (but not both). This narrows the receipt to delivered value from that specific product or order rather than all activity for the customer.
Scoped to a product:
Python
Node.js
Go
Scoped to an order:
Python
Node.js
Go
List value receipts
List value receipts with pagination and optional filters.
Python
Node.js
Go
Available filters: customerId, externalCustomerId, orderId, productId, archived.
Get by ID
Fetch a single value receipt including its publish state.
Python
Node.js
Go
Refresh
Re-populate a draft value receipt with the latest signal and delivered value data. This is useful when new signals are still coming in and you want the receipt to reflect the most recent numbers. Sealed receipts cannot be refreshed.
Python
Node.js
Go
Seal
Seal a value receipt to make it immutable. This transitions it from draft to posted status. Once sealed, a receipt cannot be refreshed or re-populated. It becomes a permanent snapshot.
Python
Node.js
Go
Publish and unpublish
Publishing makes a value receipt accessible to anyone with the link. Unpublishing reverts it to private (JWT-gated) access.
Python
Node.js
Go
Archive and unarchive
Archiving soft-deletes a value receipt. It is hidden from list results by default but can be restored.