Skip to content

API

On this page

Confirm

Lock the selected token and network for a fiat-priced invoice from a custom checkout, then display the returned payment details safely.

POST/v1/invoices/:invoice_id/confirm-payment

API key: Payment

Confirm the stablecoin and network a customer chose for a fiat-denominated invoice that is still in awaiting_client. Paymos locks the exchange rate, assigns a deposit address, and moves the invoice to awaiting_payment.

Use this when you render your own white-label checkout and collect the token choice on your server. Paymos-hosted checkout — the payment_url page, the iframe embed, and the Widget SDK — confirms the customer's selection through its own browser-side path, so you never call this endpoint for those.

Request body

Parameter Type Required Description
currency string Yes The stablecoin the customer chose to pay with (e.g. USDT, USDC). Must be enabled on the invoice's project
network string Yes The network the customer chose to pay on (e.g. TRC20, BASE) — must be a network where that token is enabled
{
  "currency": "USDT",
  "network": "TRC20"
}

Response (200 OK)

Returns the full invoice with its payment section now populated — the chosen currency / network, the assigned deposit address, the locked exchange_rate, and the expected crypto amount. Because this call is authenticated with your merchant key, the response also carries the merchant-only fee and net fields. The body has the same shape as Retrieve an invoice.

Errors

See Error Codes for the full catalogue. The type URI in every error response deep-links to the matching row. Confirming an invoice that isn't yours returns 404. An expired or cancelled invoice returns 410; every other status past awaiting_client returns 409 — including the terminal paid, paid_over, and underpaid.