Skip to main content
Base URL: https://agents.gwop.io

Authentication

Most endpoints require a merchant API key as a Bearer token:
Authorization: Bearer sk_m_...
The Get invoice endpoint is public and requires no authentication.

Endpoints

MethodPathAuthDescription
POST/v1/invoicessk_m_*Create an invoice
GET/v1/invoicessk_m_*List your invoices
GET/v1/invoices/{id}PublicRetrieve an invoice
POST/v1/invoices/{id}/cancelsk_m_*Cancel an open invoice

Invoice status lifecycle

StatusTerminalMeaning
OPENNoAwaiting payment
PAYINGNoPayment in progress — do not create a new invoice
PAIDYesSettlement confirmed on-chain
EXPIREDYesTTL reached before payment
CANCELEDYesCanceled by merchant

Error shape

All errors follow this format:
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable message",
    "details": {},
    "requestId": "req_abc123"
  }
}
Every response includes an x-request-id header for debugging.