{{amount}}, {{currency}}, and {{invoice_id}}.
There is no built-in inbound IPN URL on manual gateways today. When your own payment provider confirms a transfer, your server must call the Developer API to complete the invoice. This is the API equivalent of the dashboard’s Process Invoice action.
This pattern works for storefront and payment-link invoices, not only for
POST /dev/v1/payments. Use POST /dev/v1/invoices/{uniqid}/complete.End-to-end flow
- Buyer starts manual checkout → invoice moves to
PENDING_PAYMENT/ awaiting merchant confirmation. - Shoppex can notify you with
order:manual_payment_pending(configure under Settings → Webhooks). - Your external gateway sends its own webhook when money arrives.
- Your adapter calls
POST /dev/v1/invoices/{uniqid}/completewith your Shoppex API key. - Shoppex runs the normal completion pipeline (delivery, emails,
order:paid).
Prerequisites
Complete an invoice (minimal)
200 with a stable completion result:
GET /dev/v1/invoices/{uniqid} afterwards if you need the current full invoice representation.
Common errors:
The
Idempotency-Key header is required so that a retry after a network drop does not apply the same side effect twice. If you do not pass a key, the Shoppex SDK creates the same key every time for the same request.
Listen for order:manual_payment_pending
Register a shop webhook (Settings → Webhooks) for order:manual_payment_pending. When a buyer submits manual payment instructions, Shoppex POSTs a signed payload to your URL.
Extract the invoice UUID from data.uniqid and store it with your gateway’s pending-payment record if needed.
Verify signatures with X-Shoppex-Signature-V2. See Webhooks.
Cloudflare Worker adapter (copy-paste)
This worker receives a generic JSON webhook from your payment provider, optionally checks a shared secret, then completes the Shoppex invoice. Worker secrets (Wrangler):SHOPPEX_API_KEY— yourshx_*key withinvoices.writePROVIDER_WEBHOOK_SECRET— shared secret your gateway sends (header or HMAC). Omit checks only in local dev
worker.ts
{{invoice_id}} in your manual gateway redirect URL or instructions so the provider echoes it back.
Redirect manual gateway example
Redirect URL in dashboard:reference comes back on the provider webhook, map it to invoice_id in the worker above.
Security checklist
- Verify provider signatures or shared secrets before calling Shoppex.
- Optionally re-fetch the invoice with
GET /dev/v1/invoices/{uniqid}and comparetotal/currencyto the provider amount before completing. - Keep
shx_*keys server-side only. - Use
Idempotency-Keyon every completion call. - Return
200to your provider only after Shoppex accepts the completion (or the invoice is already completed).
Manual confirmation in the dashboard
If you do not automate completion, open the invoice in the dashboard when status is Awaiting Manual Confirmation, then Confirm Payment → Process Invoice. The Dev APIcomplete call runs the same backend pipeline.
Related docs
Payments guide
Hosted checkout and Developer API overview
Webhooks
Verify
order:manual_payment_pending and order:paidDeveloper API
Full API reference including
POST /dev/v1/invoices/{uniqid}/completePayment gateways
Connect Stripe, PayPal, Cash App, and manual methods