Prepare, sign, submit
The API compiles the exact EIP-712GasActionAuthorization payload, including maxChargeWei, the most network gas the action may be charged. signPreparedGasExecution recomputes the transfer from the prepared fields, refuses a charge above the ceiling you pass, has your agent sign, and returns the submission body. Your agent never needs ETH.
Idempotency-Key header, and the SDK validates that it is a 32-byte hex value before making the request, throwing GolTransportError otherwise.
Retries never move value twice
StoreactionId and the agent signature before you submit, and reuse exactly those values on a retry. This is the rule that makes a timeout safe.
Never mint a new
actionId to work around a timeout. That is how a retry becomes a duplicate payment.
States
Treat any state you do not recognize as non-terminal.
waitForGasExecution stops at a terminal state by default.
GasExecutionResponse is exported from the browser-safe root entry point, so a server module can import it as a type without touching anything credentialed.
What the result contains
getGasExecution returns separate views rather than one blended number, which is the point: network cost, what the owner owes, what the owner actually paid, and GOL’s own cost never collapse into a single figure.
receipt, settlement, and claimReceipt are null until the corresponding transaction is observed, so read them with optional chaining rather than assuming presence. finalizedBlockNumber shows how far the background observation has progressed; the hosted Base Sepolia setup settles at the lower safe head and continues observing through finalized, so a populated receipt is not by itself a finality claim.
A refusal or a revert is a contract outcome, not an API error: the request succeeded and the contract declined the action because it fell outside the owner’s rules, usually a cap. No USDC moved. With refusal consent the owner still pays that transaction’s gas inline. An API-level refusal with capability_unavailable is different: the action was never sent, for example because the policy is paused, revoked, expired, or disputed.
List actions
listGasExecutions pages through a project’s history and accepts a state filter. Each summary carries the three cost figures already reduced, so a table needs one call.
Open a dispute
If a charge looks wrong, open a dispute. New submissions under that execution’s gas policy pause until GOL resolves it, and a confirmed overcharge is refunded from GOL’s funds.Poll or subscribe
Polling is authoritative. Webhooks tell you when to look, not what is true. Treat a webhook as a hint to fetch, deduplicate by event ID because delivery is at least once and may be out of order, and reconcile againstgetGasExecution.
Relay it yourself
For a policy the owner approved with a developer-operated relayer, submission returns the execution inexternal_pending with transaction. developerRelayerTransaction checks that the calldata is the agent’s signed action under this execution’s mandate, action, and gas policy, and returns the EIP-1559 envelope. Your relayer chooses its nonce and a priority fee no higher than maxFeePerGas, signs from the approved submitter, and submits the raw bytes.
Reconcile from your own records
The figures are separately observable, so your application can check its own accounting without trusting a summary. The receipt’s network cost and the inline charge are different fields, which is exactly the pair to compare.quote the action was accepted under, you can also check that a charge stayed inside what the owner and the agent agreed to, rather than only inside the network’s own total.