This guide covers the Shoppex invoice model used by both hosted checkout flows and the Developer API.
An invoice can go through more than one payment attempt before it reaches its final state. For example, a customer can try PayPal, abandon it, and come back with a credit card. It is still the same invoice.
Invoice statuses
Creating an invoice
Via dashboard
1
Navigate to invoices
Go to Invoices → Create Invoice
2
Select products
Select products and quantities
3
Enter customer email
Enter customer email (optional)
4
Choose payment methods
Choose allowed payment methods
5
Create the invoice
Click Create
Via API
Use the POST /payments endpoint of the Developer API to create an invoice programmatically:Completing or processing an invoice
The dashboard calls the manual merchant action Process Invoice. The public Developer API calls the same operation complete invoice:PENDING or PENDING_PAYMENT. An already completed or otherwise non-completable invoice returns 422 VALIDATION_ERROR. Every request must include an Idempotency-Key header.
See Manual payment auto-completion for request examples, idempotency, webhook verification, and common errors.
Invoice expiration
By default, Shoppex-hosted invoice payment windows expire after 24 hours. You can customize the default expiration in Settings → Invoices.The current Dev API payment example on this page does not accept an
expires_at request field.
Configure a different default expiration in the dashboard instead.Partial payments
Partial payments can occur with cryptocurrency when the customer sends slightly less than required. You have three options:- Accept as paid — Mark the invoice as paid manually from the dashboard. Use this when the shortfall is negligible and you want to fulfill the order immediately.
- Request the remaining amount — The customer pays the difference. The invoice stays in
PARTIALstatus until the remaining amount arrives, then it transitions toCOMPLETED. - Refund — Cancel and refund the partial payment. The invoice moves to
VOIDED, and you can create a new one if needed.
Webhooks
Get notified when invoice status changes:Integration rule
If you sync invoices into your own system, use the Shoppex invoice status as the final source of truth. The first payment attempt can fail and the second can succeed. The invoice ends asCOMPLETED regardless of how many tries it took.
Payments
Learn about payment gateways, configuration, and processing.
Webhooks
Set up real-time notifications for invoice status changes.