Use actions with your own agent
Ask Gasket before a step your code is about to take.
If your agent runs in your own code, call POST /v1/actions before a consequential step and only proceed when the status is authorized. Then report the result.
text
const a = await fetch("https://usegasket.xyz/api/v1/actions", { method: "POST", headers, body: JSON.stringify({ agent_id, service: "stripe", operation: "refund.create", amount }) }).then((r) => r.json());
if (a.status !== "authorized") return;
// …do it, then:
await fetch(`https://usegasket.xyz/api/v1/actions/${a.id}/result`, { method: "POST", headers, body: JSON.stringify({ status: "succeeded" }) });