How Splits Work
When a payment with splits is confirmed, ZendFi automatically distributes the funds to each recipient’s wallet according to the split configuration.Create a Payment with Splits
Include asplit_recipients array when creating a payment:
Split Types
- Percentage
- Fixed Amount
Each recipient gets a percentage of the total payment. All percentages must sum to 100.
Split Recipient Configuration
Each recipient in thesplit_recipients array accepts:
| Field | Type | Description |
|---|---|---|
recipient_wallet | string | Solana wallet address to receive funds |
recipient_name | string | (Optional) Human-readable label for this recipient |
percentage | number | (Optional) Percentage of the payment (0-100) |
fixed_amount_usd | number | (Optional) Fixed amount in USD |
split_order | number | (Optional) Order in which splits are executed |
Retrieve Splits
Get all splits for a payment
Split Statuses
| Status | Description |
|---|---|
pending | Split is queued, waiting for payment confirmation |
processing | Funds are being transferred to the recipient |
completed | Funds have been delivered to the recipient’s wallet |
failed | Split transfer failed (will be retried) |
Marketplace Example
A complete marketplace flow where sellers list products and the platform takes a commission:Webhook Events for Splits
When splits are processed, you receive webhook events. Use thehandlers map:
Validation Rules
- Percentage splits must sum to exactly 100%.
- Fixed amount splits must not exceed the payment amount.
- You can mix percentage and fixed amount splits, but the fixed amounts are deducted first, and the percentage splits are applied to the remainder.
- Each payment can have up to 10 split recipients.
- All wallet addresses must be valid Solana addresses.
- Splits cannot be modified after payment creation.