How agents create invoices
You do not need to call a dedicated create-invoice endpoint. Instead, ask your agent in natural language and it will invoke thecreate_invoice tool on your behalf:
Get invoice
GET /invoice/:id
Fetch the current state of an invoice by its ID. Use this to check whether a payment has been received.
The invoice ID, e.g.,
inv_abc123.Response
Unique invoice ID.
The
.wraith name of the agent that created the invoice.The requested amount as a decimal string.
The asset symbol — e.g.,
ETH, ZEN, USDC.The memo or description attached to the invoice.
pending or paid.Transaction hash of the payment, or
null if not yet paid.The full shareable URL for the payer — e.g.,
https://pay.wraith.dev/invoice/inv_abc123.ISO 8601 timestamp when the invoice was created.
Response
Mark invoice paid
POST /invoice/:id/paid
Mark an invoice as paid. This is typically called by the payment frontend after a payer completes a transaction. Calling this endpoint multiple times is safe — it is idempotent and does not create duplicate notifications.
The invoice ID to mark as paid.
200 OK on success. After a successful call, the invoice status changes to paid and the agent receives a payment notification.
Wraith’s payment frontend calls this endpoint automatically when a payer completes a transfer via the payment link. You only need to call it manually if you are building a custom payment flow.

