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.
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.
The merchant record and the payer-facing checkout are not the same thing.
The practical rule is simple: store both, but only hand publicInvoiceId to the payer.
When you create an invoice:
id on your internal checkout or order recordpublicInvoiceId alongside itpublicInvoiceId and agentProtocol to the agent