Advanced Features - Level Up Your Payments!

Welcome to Advanced Features! This is where ZendFi gets really powerful. From splitting payments among multiple recipients to subscriptions and escrow - we've got enterprise-grade features ready for you. Let's explore! ✨

Payment Splits (Available Now!)

Payment Splits let you automatically distribute a single payment among multiple recipients - perfect for marketplaces, affiliate programs, revenue sharing, and multi-vendor platforms!

How It Works

  1. Customer makes a single payment
  2. ZendFi receives the full amount
  3. After confirmation, funds are automatically split
  4. Each recipient gets their share sent to their wallet
  5. All splits tracked with unique transaction signatures

Perfect For:

  • Marketplaces: Split between seller, platform fee, and payment processor
  • Affiliates: Share revenue with referral partners
  • Creators: Split royalties with collaborators
  • Agencies: Distribute payments among team members
  • Platforms: Revenue sharing (e.g., Spotify-style splits)

Endpoint

POST /api/v1/payments

Authentication

Authorization: Bearer YOUR_API_KEY

Request Parameters

Basic Payment Fields

ParameterTypeRequiredDescription
amountnumberYesTotal payment amount in USD
currencystringYesCurrency code (USD only)
tokenstringNoToken to receive (USDC, SOL, USDT)
descriptionstringNoPayment description
metadataobjectNoCustom data (max 16KB JSON)

Split Fields

ParameterTypeRequiredDescription
split_recipientsarrayNoArray of split recipient objects
split_recipients[].recipient_walletstringYesSolana wallet address (base58)
split_recipients[].recipient_namestringNoRecipient name for reference
split_recipients[].percentagenumberYes*Percentage of payment (0-100)
split_recipients[].fixed_amount_usdnumberYes*Fixed USD amount
split_recipients[].split_ordernumberNoOrder of execution (default: 0)

*Note: Use either percentage OR fixed_amount_usd, not both.

Response Fields

FieldTypeDescription
idUUIDPayment ID
amountnumberPayment amount in USD
currencystringCurrency code
statusstringPayment status
qr_codestringSolana Pay URI
payment_urlstringPayment URL
expires_atdatetimeExpiration timestamp (15 minutes)
split_idsarrayArray of split IDs (if splits configured)

Payment Split Examples

Example 1: Marketplace with Platform Fee (Percentage)

Perfect for platforms like Etsy, Gumroad, or any marketplace!

Request:
curl -X POST https://api.zendfi.tech/api/v1/payments \
  -H "Authorization: Bearer zfi_test_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100.00,
    "currency": "USD",
    "token": "USDC",
    "description": "Handmade Pottery - Order #12345",
    "metadata": {
      "order_id": "12345",
      "product": "Ceramic Vase",
      "seller": "ArtisanPottery"
    },
    "split_recipients": [
      {
        "recipient_wallet": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
        "recipient_name": "Seller - ArtisanPottery",
        "percentage": 85.0,
        "split_order": 1
      },
      {
        "recipient_wallet": "8yKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsV",
        "recipient_name": "Platform Fee",
        "percentage": 10.0,
        "split_order": 2
      },
      {
        "recipient_wallet": "9zKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsW",
        "recipient_name": "Payment Processor",
        "percentage": 5.0,
        "split_order": 3
      }
    ]
  }'
Response:
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "amount": 100.00,
  "currency": "USD",
  "status": "Pending",
  "qr_code": "solana:ABC123...?amount=100&spl-token=USDC",
  "payment_url": "https://zendfi.tech/pay/550e8400-e29b-41d4-a716-446655440000",
  "expires_at": "2025-10-27T10:45:00Z",
  "split_ids": [
    "660e8400-e29b-41d4-a716-446655440001",
    "770e8400-e29b-41d4-a716-446655440002",
    "880e8400-e29b-41d4-a716-446655440003"
  ]
}

What Happens:

  1. Customer pays $100 USDC
  2. After confirmation:
    • Seller gets $85 (85%)
    • Platform gets $10 (10%)
    • Payment processor gets $5 (5%)
  3. All splits executed automatically
  4. Each recipient gets a separate transaction

Example 2: Affiliate Program (Fixed + Percentage)

Great for referral programs and affiliate marketing!

Request:
curl -X POST https://api.zendfi.tech/api/v1/payments \
  -H "Authorization: Bearer zfi_test_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 299.99,
    "currency": "USD",
    "token": "USDC",
    "description": "Premium Course - Web3 Development",
    "metadata": {
      "course_id": "web3-101",
      "affiliate_code": "JOHN2024"
    },
    "split_recipients": [
      {
        "recipient_wallet": "AxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsX",
        "recipient_name": "Course Creator",
        "percentage": 70.0,
        "split_order": 1
      },
      {
        "recipient_wallet": "BxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsY",
        "recipient_name": "Affiliate - John",
        "fixed_amount_usd": 50.00,
        "split_order": 2
      },
      {
        "recipient_wallet": "CxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsZ",
        "recipient_name": "Platform",
        "percentage": 13.33,
        "split_order": 3
      }
    ]
  }'
Response:
{
  "id": "990e8400-e29b-41d4-a716-446655440004",
  "amount": 299.99,
  "currency": "USD",
  "status": "Pending",
  "qr_code": "solana:DEF456...?amount=299.99&spl-token=USDC",
  "payment_url": "https://zendfi.tech/pay/990e8400-e29b-41d4-a716-446655440004",
  "expires_at": "2025-10-27T11:00:00Z",
  "split_ids": [
    "aa0e8400-e29b-41d4-a716-446655440005",
    "bb0e8400-e29b-41d4-a716-446655440006",
    "cc0e8400-e29b-41d4-a716-446655440007"
  ]
}

What Happens:

  1. Customer pays $299.99 USDC
  2. After confirmation:
    • Course Creator gets $209.99 (70%)
    • Affiliate gets $50.00 (fixed amount)
    • Platform gets $40.00 (13.33%)
  3. All splits executed in order
  4. Fixed amounts processed first, then percentages

Subscriptions

Recurring payments made simple! Perfect for SaaS products, memberships, and subscription-based services.

Coming Features

  • Flexible Billing Cycles: Daily, weekly, monthly, yearly, or custom intervals
  • Trial Periods: Free trials with automatic conversion to paid
  • Prorated Billing: Automatic proration for plan upgrades/downgrades
  • Usage-Based: Metered billing for pay-as-you-go models
  • Smart Retry Logic: Automatic payment retry with exponential backoff
  • Dunning Management: Automated notifications for failed payments

Use Cases

  • SaaS Platforms: Monthly/annual software subscriptions
  • Content Creators: Patreon-style membership tiers
  • Streaming Services: Video/music streaming subscriptions
  • Online Communities: Paid Discord/forum access
  • Education: Course access and learning platforms

Installment Plans

Buy now, pay later functionality. Split large purchases into manageable payments over time.

Coming Features

  • Flexible Schedules: 2, 3, 4, 6, or 12 monthly installments
  • Custom Down Payments: Require initial payment percentage
  • Auto-Debit: Automatic payment collection on schedule
  • Payment Reminders: Notifications before each installment
  • Early Payoff: Allow customers to pay off early
  • Late Fee Options: Optional penalties for missed payments

Use Cases

  • E-commerce: High-ticket product purchases
  • Education: Course payments over time
  • Services: Consulting or agency retainers
  • Event Tickets: Conference or festival passes
  • Electronics: Computer and device financing

Escrow Payments

Hold funds securely until conditions are met. Perfect for freelance work, real estate, and high-value transactions requiring buyer/seller protection.

Coming Features

  • Milestone-Based Release: Release funds as work is completed
  • Time-Locked Escrow: Automatic release after specified time
  • Dispute Resolution: Built-in mediation for disagreements
  • Partial Releases: Release funds in increments
  • Multi-Signature: Require multiple parties to approve release
  • Refund Protection: Automatic refunds if conditions not met

How Escrow Works

  1. Buyer Deposits: Buyer sends payment to escrow
  2. Funds Held: ZendFi securely holds funds on-chain
  3. Seller Delivers: Seller completes work or ships product
  4. Buyer Confirms: Buyer verifies and approves release
  5. Funds Released: Seller receives payment automatically

Use Cases

  • Freelance Platforms: Protect both client and freelancer
  • Marketplaces: Secure high-value transactions
  • Real Estate: Property deposits and transactions
  • B2B Services: Milestone-based project payments
  • Digital Goods: License transfers and software sales
  • P2P Trading: Peer-to-peer commerce protection

Invoices

Professional crypto invoicing for B2B payments. Send beautiful invoices, track payments, and manage your receivables all in one place.

Coming Features

  • Customizable Templates: Brand your invoices with logo and colors
  • Line Items: Detailed breakdown of products/services
  • Tax & Discounts: Automatic calculations for taxes and promo codes
  • Payment Terms: Net-30, Net-60, or custom due dates
  • Auto Reminders: Scheduled payment reminder emails
  • Partial Payments: Accept deposits and installments
  • Multi-Currency: Invoice in USD, EUR, or any fiat currency
  • PDF Export: Download and email invoices as PDFs

Use Cases

  • Agencies: Bill clients for services rendered
  • Consultants: Professional invoicing for billable hours
  • B2B Sales: Enterprise software and service billing
  • Contractors: Construction and project invoicing
  • Wholesalers: Bulk orders and trade accounts
  • Service Providers: Recurring billing for ongoing services

Ready to Get Started?

Payment Splits are available now! The other features are coming soon. Want early access or have questions? Get in touch!