freeze.isFrozen. Writes that change refund-request status (deny, refuse) and writes that lift a freeze (unfreeze) live on createArbiterClient or on the full createX402r() client.
Use createMerchantClient for queries below; for executing a refund, see Capture vs refund decision flow. The merchant client’s payment.voidPayment() flips the request to Approved through the VOID_POST_ACTION_HOOK.
Refund request queries
refund.has
Check whether a refund request exists for a payment.
Returns
Promise<boolean>.
refund.getStatus
Retrieve the current status of a refund request.
Returns
Promise<RefundRequestStatus>, Pending | Approved | Denied | Cancelled | Refused.
refund.get
Retrieve the complete refund request data.
Returns
Promise<RefundRequestData>:
refund.getByKey
Look up a refund request directly by its payment info hash.
Returns
Promise<RefundRequestData>.
Paginated refund request listing
refund.getReceiverRequests
Retrieve paginated refund request keys for this merchant (the receiver).
Returns
Promise<{ keys: readonly Hex[]; total: bigint }>. To hydrate each entry, call refund.getByKey(hash) per key.
getOperatorRequests (paginated across all payments under an operator) lives on createArbiterClient, not on the merchant client.Refund request actions
Approving or denying a request through the operator hook is what the merchant does. Terminaldeny and refuse calls on the RefundRequest contract belong to the arbiter role; from a merchant, execute the refund through payment.voidPayment() (which flips the request to Approved) or signal a refusal off-chain and let the arbiter terminalize it.
payment.voidPayment
To approve and execute a refund, callpayment.voidPayment(). The operator’s VOID_POST_ACTION_HOOK (RefundRequest) flips the request status to Approved.
Returns
Promise<Hash>.
Freeze management
freeze.isFrozen
Check whether a freeze currently holds a payment. The escrow blocks capture on a frozen payment until the arbiter unfreezes it.
Returns
Promise<boolean>.
The merchant client exposes
freeze.isFrozen only. Lifting a freeze (unfreeze) is an arbiter-role action; use createArbiterClient or createX402r().Complete refund workflow
A full workflow that detects a refund request, reviews it, makes a decision, and executes the refund when approved.Refund request lifecycle
Method reference
Next steps
Merchant SDK
Capture funds, charge, and query escrow state.
RefundRequest
RefundRequest contract details and state machine.
