Create a settlement rule
Propose a standing split of the customer’s incoming payments into its stablecoin Embedded Wallet, paid from that wallet, as POST /settlement-rules creates one for the platform. Preview it first with POST /agents/me/settlement-rules/preview.
The wallet: every selector in match sets creditedAccountId to the customer’s stablecoin Embedded Wallet that holds this agent’s key, so the rule fires only on money landing in a wallet the agent can spend. currency is the wallet’s.
Destinations: a share pays a person by phone number or email (CONTACT), one of the customer’s own external accounts (EXTERNAL_ACCOUNT), or an Embedded Wallet on the platform (GRID_CUSTOMER). Any other destination is refused with DESTINATION_NOT_ALLOWED.
Approval: the rule is created ACTIVE when limits.maxAmountPerExecution is set and within the policy’s per-transaction limit for the wallet, limits.maxAmountPerDay is set and within its daily limit, no EXTERNAL_ACCOUNT share can exceed the platform’s limit for bank payouts without approval, and the policy sends from the wallet without approval at maxAmountPerExecution. Otherwise it is created PENDING_APPROVAL with a CREATE_SETTLEMENT_RULE agent action, named by agentActionId, and the AGENT_ACTION.PENDING_APPROVAL webhook fires. A pending rule holds its priority and fires on nothing. Approving the action makes the rule ACTIVE; rejecting it, or letting it expire after seven days, deletes it.
Priority: an omitted priority goes after the customer’s last rule that is not DELETED, the platform’s rules included.
Requires the MANAGE_SETTLEMENT_RULES permission.
Authorizations
Bearer token authentication for agent-scoped endpoints. The token is the accessToken returned when redeeming a device code via POST /agents/device-codes/redeem. Agent credentials are user-scoped: all requests are automatically bound to the agent's associated customer and subject to the agent's policy.
Headers
Body
A settlement rule as an agent proposes it, for the agent's customer.
Response
The rule this Idempotency-Key already created