Ask for a refund
Asks AgentaOS to refund a sale in full. Works in test and live; the key you sign with decides the mode. The request moves no money: AgentaOS reviews it within 2 business days, usually the same day, and either refunds the whole amount, VAT included, or declines it with a note. While the request is open the sale is held out of your payouts. There is no webhook for the outcome: the sale’s mor_status becomes refunded. A refund does not cancel a subscription. There is no request body. Calling it again while a request is open returns that same request, not an error; a declined request can be asked again. A sale still held can be refunded. Returns 400 with the message This sale cannot be refunded: <reason>, where the reason is already_refunded, disputed, status_not_refundable or not_mor_capture; 403 when your user is not a member of the business; and 404 (Sale not found) when the sale is not yours in this mode.
mor_status on List transactions becomes refunded once the refund is executed. A refund does not cancel a subscription: cancel it separately, and it ends at period end.Authorizations
Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.
Path Parameters
The sale's transaction id: from the transactions list, or a checkout.session.completed event's id without the evt_ prefix.
Response
The request as recorded, or the request already open for this sale.
The sale the request is about.
requested while AgentaOS reviews it, executed once the buyer was refunded, declined with a note.
requested, executed, declined AgentaOS's reason on a decline, shown to you. Null otherwise.