Skip to main content
Payment splits let you distribute a single payment across multiple wallets. This is essential for marketplaces, platforms with revenue sharing, and any application where funds need to go to more than one party.

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 a split_recipients array when creating a payment:

Split Types

Each recipient gets a percentage of the total payment. All percentages must sum to 100.

Split Recipient Configuration

Each recipient in the split_recipients array accepts: If you provide a single split recipient and omit both percentage and fixed_amount_usd, ZendFi defaults that recipient to 100%.

Retrieve Splits

Get all splits for a payment

Response:

Split Statuses

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 the handlers 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.

Multi-Vendor Cart

For shopping carts with items from multiple sellers:

Testing Splits

Use the CLI to verify split behavior:
In test mode, splits go to Devnet wallets. Use a Solana explorer like Solscan (set to Devnet) to verify each split transaction.