# How to Create Split Payments in Bubble

- Tool: Bubble
- Difficulty: Beginner
- Time required: 20-25 min
- Compatibility: All Bubble plans (Stripe Connect required)
- Last updated: March 2026

## TL;DR

Split payments in Bubble use Stripe Connect to automatically divide a single customer payment between your platform and one or more recipients. You create Stripe Connected Accounts for each recipient, process the payment with transfer instructions, and Stripe handles the fund distribution. This is essential for marketplaces, service platforms, and any app where multiple parties share revenue from a single transaction.

## Overview: Split Payments in Bubble

This tutorial shows how to split a single payment between your platform and one or more recipients using Stripe Connect in Bubble.

## Before you start

- A Bubble app with a payment flow
- A Stripe account with Connect enabled
- API Connector plugin installed
- Understanding of REST API calls and backend workflows

## Step-by-step guide

### 1. Enable Stripe Connect on your Stripe account

Log into your Stripe Dashboard. Go to Settings → Connect settings. Enable Connect. Choose your platform type (marketplace). Set the default commission/application fee. In your Stripe Dashboard under Developers → API keys, ensure you have your platform's Secret Key. This key is used for all Stripe Connect API calls from Bubble.

**Expected result:** Stripe Connect is enabled on your platform account with settings configured.

### 2. Create Connected Accounts for recipients

For each recipient (vendor, service provider, creator), create a Stripe Connected Account via the API Connector. POST to https://api.stripe.com/v1/accounts with type=express. After creation, generate an onboarding link by calling /v1/account_links with the account ID. Redirect the recipient to this link to complete identity verification. Store the Stripe account ID on their Bubble user or vendor record.

**Expected result:** Recipients have Connected Accounts with completed identity verification.

### 3. Process a payment with application fee (platform commission)

When a customer checks out, create a PaymentIntent with the application_fee_amount parameter. This automatically splits the payment: the application fee goes to your platform, the remainder goes to the connected account. Use the API Connector to POST to https://api.stripe.com/v1/payment_intents with amount, currency, application_fee_amount, and transfer_data[destination] set to the recipient's Connected Account ID.

```
{
  "amount": 10000,
  "currency": "usd",
  "application_fee_amount": 1500,
  "transfer_data[destination]": "acct_recipient123",
  "payment_method": "pm_card_visa",
  "confirm": true
}
```

> Pro tip: application_fee_amount is in cents. For a $100 payment with 15% commission: amount=10000, application_fee_amount=1500.

**Expected result:** The payment is processed with the fee going to your platform and the remainder to the recipient.

### 4. Split payments between multiple recipients

For orders involving multiple vendors, use separate transfers instead of the application_fee approach. Process the full payment to your platform first, then create individual transfers to each recipient's Connected Account. POST to https://api.stripe.com/v1/transfers with amount, destination (connected account ID), and transfer_group (to link related transfers). Calculate each recipient's share minus your platform commission.

**Expected result:** A single customer payment is split between multiple recipients with the platform retaining its commission.

### 5. Handle refunds for split payments

When refunding a split payment, you need to reverse both the customer charge and the transfers. Use Stripe's refund API on the original PaymentIntent. Stripe automatically reverses the transfer to the connected account. For partial refunds, specify the amount and Stripe prorates the reversal. Update your Payment and Order records to reflect the refund status. For marketplace disputes, track which party is responsible.

**Expected result:** Refunds properly reverse both the customer charge and the recipient transfers.

## Complete code example

File: `Workflow summary`

```text
SPLIT PAYMENTS — WORKFLOW SUMMARY
====================================

STRIPE CONNECT SETUP:
  Enable Connect in Stripe Dashboard
  Create Connected Accounts for recipients
  Store account IDs in Bubble database

SINGLE RECIPIENT (application fee):
  PaymentIntent:
    amount: total in cents
    application_fee_amount: commission in cents
    transfer_data[destination]: recipient account ID
  Result: fee → platform, remainder → recipient

MULTIPLE RECIPIENTS (transfers):
  Step 1: Charge full amount to platform
  Step 2: Transfer to each recipient:
    POST /v1/transfers
    amount: recipient's share
    destination: account ID
    transfer_group: order ID

COMMISSION CALCULATION:
  Platform fee = total * commission_rate / 100
  Recipient payout = total - platform fee
  All amounts in cents

REFUNDS:
  POST /v1/refunds on original PaymentIntent
  Stripe auto-reverses connected transfers
  Update Payment + Order records
```

## Common mistakes

- **Specifying application_fee_amount as a percentage instead of cents** — Stripe expects a fixed amount in cents, not a percentage — passing 15 means 15 cents, not 15% Fix: Calculate the fee amount: total_amount * commission_rate / 100, then pass the result in cents
- **Transferring to accounts that have not completed onboarding** — Stripe holds funds for unverified accounts, potentially freezing payouts indefinitely Fix: Check the connected account's charges_enabled status before processing transfers
- **Not linking transfers with a transfer_group for multi-vendor orders** — Without a transfer_group, you cannot correlate which transfers belong to which order for refunds and reporting Fix: Always set transfer_group to the order ID when creating transfers for multi-recipient payments

## Best practices

- Verify connected accounts are fully onboarded before processing transfers
- Use transfer_group to link related transfers for clean reporting and refund handling
- Calculate fees in cents and double-check amounts before processing
- Store Stripe transaction IDs on all payment and transfer records
- Test thoroughly with Stripe's test mode before going live
- Set up webhooks for transfer.paid and transfer.failed events
- Implement a payout dashboard where recipients can see their earnings

## Frequently asked questions

### What types of Stripe Connected Accounts should I use?

Express accounts are recommended — Stripe handles onboarding, identity verification, and payout management. Standard accounts give recipients more control but require more integration work.

### Can I split a payment between more than two recipients?

Yes. Use the transfer approach: charge the full amount to your platform, then create individual transfers to each recipient's Connected Account.

### When do recipients receive their payouts?

Stripe pays out to Connected Accounts on a rolling basis (typically 2 business days after the transfer). Recipients configure their payout schedule in their Stripe Express dashboard.

### Can I change the commission rate per vendor?

Yes. Store the commission_rate on each Vendor record. Calculate the application_fee_amount dynamically based on each vendor's rate during checkout.

### Can RapidDev help implement payment splitting for my platform?

Yes. RapidDev specializes in Stripe Connect integration with split payments, commission management, and payout dashboards for marketplace platforms in Bubble.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/create-a-split-payment-feature-in-bubble
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/create-a-split-payment-feature-in-bubble
