Skip to main content
POST /clearing/pay After a cycle is committed, a net debtor pays its net debit to the ClearingHouse before the payment deadline. This endpoint submits that payment and pays the gas. The funds come from the debtor’s own signed authorization, which binds the ClearingHouse as receiver, the committed amount, and the cycle. The facilitator resolves the amount and the Merkle proof from core, so the caller decides only whether the debit is paid. The debtor is the authorization’s from. Send exactly one of authorization (EIP-3009) or permit2Authorization, as for POST /deposit. A net debit in native ETH cannot be sponsored; pay it with a transaction of your own. POST /clearing/pay/verify takes the same body, runs every check without broadcasting, and answers with the /verify response shape.

Request body

string
CAIP-2 network ID. When omitted, the facilitator uses the first network it serves whose core knows the cycle. Send it.
string
required
The cycle’s text ID: cycle_id_text from GET /core/participants/{participant}/positions.
string
eip3009|permit2
Optional. It must agree with the authorization you send.
object
EIP-3009 authorization: from, validAfter, validBefore, nonce, v, r, s.
object
Permit2 authorization: from, nonce, deadline, signature.
object
Only with permit2Authorization: value, deadline, v, r, s.

Responses

Every request the facilitator can parse returns 200. Read success.
boolean
required
string
Transaction hash. Present on success, and on a failure that happened after broadcast.
string
string
The address that paid.
string
The cycle’s on-chain ID, 32 bytes as hex.
string
The committed net debit, in base units.
string
A machine-readable reason code. Present on failure.
string
boolean
Whether repeating the same request later may succeed. Present on failure.

Reason codes

Status codes