Feature Request: Guarded Refund Authorization for AI Agents
Summary:
Add a merchant-controlled, one-time authorization mechanism for refund operations performed through Dodo Code Mode MCP / SDK by AI agents.
Problem:
Dodo's Code Mode MCP can allow an AI agent to invoke client.refunds.create against a live merchant account. Since refunds directly affect merchant funds, merchants need a way to restrict exactly what an AI agent is authorized to execute without requiring another Dodo approval dashboard.
Proposed Solution:
Allow merchants to create a portable, one-time authorization that explicitly binds a refund operation to:
- Merchant/account
- Payment ID
- Refund items and amounts
- Refund reason
- Expiry time
- One-time usage
The authorization would be validated locally by a merchant-controlled gateway before the refund request reaches Dodo.
Expected Behavior:
- Exact approved refund → Allowed
- Modified payment/item/amount/reason → Rejected
- Expired authorization → Rejected
- Reuse of an already-consumed authorization → Rejected
- Provider timeout / unknown outcome → Mark as outcome unknown and prevent blind retry
Merchant's Existing Prototype:
The merchant has provided a synthetic runnable fixture demonstrating these five scenarios and asked whether the proposed request projection matches the fields that should be protected for the client.refunds.create Code Mode MCP path.
Ref: https://github.com/emiliaprotocol/emilia-protocol/tree/4eadad0f3c66ed887893be03f70bb0cb2764cea7/examples/dodo-refund-gate-v1
Value:
Provides a safer way for merchants to let AI agents perform refunds while keeping the merchant in control of the exact refund action and avoiding exposure of the API key to the model.
0 Comments
Sign in to comment
No comments yet. Be the first to share your thoughts!
