Create a Payout Agent
Create a payout agent with an empty reserved balance. Fund it with an allocation and issue it a credential before it can send payouts.
Create a payout agent with an empty reserved balance. Fund it with an allocation and issue it a credential before it can send payouts.
api_keyAuthorizationBasic <token>application/json- body
name*stringName of the payout agent. Leading and trailing whitespace is removed.
1 <= length <= 255max_payout_amount?|Maximum principal of a single payout, in cents. null or omitted means no per-payout limit.
0 < valuespending_caps?array<>Rolling spending caps. Each cap needs a different window_seconds. Defaults to no caps.
items <= 10recipient_restriction_enabled?booleanWhen true, the agent can only pay users on its approved recipient list.
falseCreated
application/json- response
A payout agent and its reserved balance, rules, and current spending cap usage.
id?stringuuidobject?stringapi_app_id?stringID of the app the payout agent belongs to.
uuidname?stringstatus?stringactive- the agent can send payoutspaused- new payouts are rejected withpayout-agent-paused
"active""paused"paused_at?|When the agent was paused. null while active.
date-timecreated?stringdate-timecurrency?stringavailable_balance?integerFunds, in cents, the agent can spend or the customer can reclaim.
committed_balance?integerPrincipal, in cents, of the agent's payouts that have not reached a terminal status. It returns to available_balance if a payout fails, is canceled, or is reversed.
rules?curl -X POST 'https://api.dots.dev/api/v2/payout-agents' \ -H 'Content-Type: application/json' \ -d '{ "name": "Support refunds agent", "max_payout_amount": 5000, "spending_caps": [ { "amount": 50000, "window_seconds": 86400 } ], "recipient_restriction_enabled": true}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "object": "payout_agent", "api_app_id": "ad6a2ad4-d593-4e3e-bfd5-50592ed119ca", "name": "string", "status": "active", "paused_at": "2019-08-24T14:15:22Z", "created": "2019-08-24T14:15:22Z", "currency": "usd", "available_balance": 0, "committed_balance": 0, "rules": { "max_payout_amount": 0, "recipient_restriction_enabled": true, "spending_caps": [ { "amount": 0, "window_seconds": 0, "used": 0, "remaining": 0 } ] }}