cURL
Intents (Advanced)
BuildOIFRefundTransaction
POST
cURL
Overview
TheBuildOIFRefundTransaction endpoint returns the direct on-chain transaction needed to refund an expired or unfilled OIF (Open Intents Framework) order through its input settler. After the order’s orderExpiresAt deadline passes without a solver fill, any wallet can broadcast this transaction to return funds to the user.
Use Cases
- Refund an OIF order whose solver did not fill before expiry
- Self-serve recovery from a stranded OIF deposit
Request Parameters
Required Fields
- intentId (string): The intent whose OIF order should be refunded.
Response
- intentId (string)
- orderId (string, optional): The on-chain OIF order ID, when known.
- to (string): Transaction
toaddress — the input settler contract. - data (string): Transaction calldata.
- value (string): Transaction value (bigint).
- chainId (number): Chain to broadcast on.
- orderExpiresAt (string, optional): The expiry timestamp; the refund cannot be submitted until after this time.
- ready (boolean):
truewhen the order is in a state where the refund can be submitted now. - status (string): Current order state.
Example
OIF refunds are only available for intents that used the
OIF route provider. See Route Providers — OIF for routing details.Next Steps
GetIntent
Inspect the intent’s state and OIF order details
AbortIntent
Notify Trails after broadcasting the refund