Create Payout User
API Payout - Endpoints
Create Payout User
Create or update a payout user and allocate balance
POST
Create Payout User
Overview
Creates a new payout user or adds funds to an existing payout user. The amount is automatically debited from your business payout balance and allocated to the user.Payouts must be enabled for your business in the dashboard settings before using this endpoint.
Authentication
This endpoint requires API key authentication. See Payout API Authentication for details.Request Body
The email address of the payout userFormat: Valid email address
Max length: 255 characters
The amount to allocate to the payout user in cents (e.g., 10000 = $100.00)Minimum: 1 cent
Maximum: 100,000,000 cents (equivalent to $1,000,000.00)
Response
Unique hash generated for the payout user. This hash can be used to retrieve payout information later.
Example Request
Example Response
Error Responses
400 — Validation Error
400 — Validation Error
Returned when request body fields are missing or invalid. The response contains an object where each key is a field name and the value is an array of error messages.Common causes:
emailis missing or not a valid email formatamountis missing, not an integer, less than 1, or exceeds the maximum
400 — Insufficient Balance
400 — Insufficient Balance
Returned when your business payout balance is too low to cover the requested amount.How to resolve: Check your payout balance using the Get Balance endpoint before creating payout users, or add funds via the dashboard.
401 — Unauthorized
401 — Unauthorized
403 — Payouts Disabled
403 — Payouts Disabled
Returned when payouts are not enabled for your business.How to resolve: Enable payouts in your dashboard settings.
500 — Server Error
500 — Server Error
Returned when an unexpected error occurs on the server. No funds are debited if this error occurs.How to resolve: Retry the request. If the error persists, contact support.
How It Works
Transaction Safety
This endpoint uses transactional operations to ensure data consistency:- Business Balance Debit: The amount is debited from your business payout balance. If insufficient funds exist, the operation fails immediately.
- User Creation/Update: The payout user is created (if new) or updated (if existing) with the amount added to their balance.
- Transaction History: A history record is created to track the transaction.
User Creation vs Update
- New User: If the email doesn’t exist for your business, a new payout user is created with the specified amount.
- Existing User: If the email already exists, the amount is added to their existing balance.
Hash Generation
Each payout user receives a unique hash. This hash:- Can be used to retrieve payout information
- Is generated server-side
- Can be used for hash-based authentication (see Authentication)
Validation Rules
Email Validation
Email Validation
- Must be a valid email format
- Maximum 255 characters
- Case-insensitive (duplicate emails are treated as the same user)
Amount Validation
Amount Validation
- Must be a positive integer
- Minimum: 1 cent
- Maximum: 100,000,000 cents ($1,000,000.00)
- Amount is specified in cents (smallest currency unit)
Business Balance
Business Balance
- Your business must have sufficient payout balance to cover the amount
- The balance check and debit happen in a single transaction
- If balance is insufficient, the operation fails without creating the user
Payout Status
Payout Status
- Payouts must be enabled for your business in dashboard settings
- If disabled, the endpoint returns a 403 error
- Check payout status before attempting to create users
Use Cases
Reward Distribution
Distribute rewards or commissions to users based on their email address
Refund Processing
Process refunds by adding funds to user payout accounts
Affiliate Payments
Pay affiliates by creating payout users and allocating their earnings
Balance Management
Manage user balances by adding funds incrementally over time
Best Practices
Concurrent Requests: Concurrent requests for the same user are safe. However, ensure your business balance can cover all concurrent allocations.
Next Steps
Payout Authentication
Learn about hash-based authentication for payout users
Dashboard
Monitor your payout balance and users in the dashboard
Enable Payouts
Enable payouts in your business settings
API Playground
Test API calls directly from your browser