Two Invoice IDs
Why Gwop invoices have both a merchant ID and a public invoice ID
Every Gwop invoice has two identifiers because two different parties need to use it for two different jobs.
The two IDs
Your backend uses id for merchant-side concerns like internal references, reconciliation, and canceling an invoice. The payer-facing side uses publicInvoiceId to fetch the public invoice view, discover payment methods, and track settlement.
Why this split exists
The merchant record and the payer-facing checkout are not the same thing.
- the merchant record belongs in your internal model
- the public invoice ID is safe to hand to an agent
- separating them lets your backend keep private state and permissions separate from the public payment flow
The practical rule is simple: store both, but only hand publicInvoiceId to the payer.
What to do in your app
When you create an invoice:
- store
idon your internal checkout or order record - store
publicInvoiceIdalongside it - return
publicInvoiceIdandagentProtocolto the agent - use both IDs later when correlating public invoice status and webhook events back to your local state