Connect

Stripe Connect allows you to connect multiple sub-accounts to a single parent account.

Connect is designed to help you build marketplaces, and multi-vendor platforms, where payments can be handled from a single account, and passed smoothly down to your vendors' accounts, while collecting optional fee's from the handled payments.

Learn more about Stripe Connect on the official Stripe site.


Charge allows you to leverage the power of Stripe Connect within Craft with minimal effort. It can be used to build amazingly powerful marketplaces, and complex purchasing flows.

Upgrade to Pro Connect is a pro only feature. If you're using the free edition you'll need to upgrade to pro to use it

How it Works #

Charge allows you to connect accounts using it's Charge_Connect fieldtype.

You can add this field on any Craft element, and use that to connect that Craft element to a Stripe account. Then as part of your Charge payment templates, you simply reference the appropriate element's connect fieldtype as part of the charge payment options.

You can also collect fee's for each transaction, right from the same template options.

In the background, Charge validates and adjusts all the appropriate calls to Stripe, and tells stripe exactly where this payment request should be sent.

On the Stripe dashboard, things will look almost identical to before. All the same customer, payment, and subscription information will show up in your Stripe account, but with an additional destination and transfer reference.

All the actual payments first land on your parent account, before heading down to the sub-accounts. The end account owners only see the details of transactions they have access to, and there's no extra config needed from your account side.

Connect is ideal for marketplaces or other multi-vendor setups.

Test With Another Account Stripe will not allow you to connect an account to itself, so you'll need to have another stripe account ready to test with.


Quickstart #

In a rush? Here's the 4 steps in you'll need to follow:

  1. Visit the Connect settings in Charge, found in Charge > Settings > Connect. Enable connect for your charge install, and update the various fields. You'll need development and production client ids, from your stripe account dashboard, and you'll need to set the OAuth allowed callback urls in Stripe too.

  2. Add a new field, to your elements you'll be using as the parent accounts. These are most commonly User elements, or maybe an Entry element, but can be any craft element type you need. Add the Charge_Connect fieldtype to your elements in the standard Craft way.

  3. Finally you'll need to make a minor update on the front-end to make use of these connected accounts. Simply add the following to your charge options array. (We're assuming you have the appropriate element set at the entry variable, and the connect fieldtype is called connect) : accountId : entry.connect.id. You might also want to add an applicationFeeInCents or applicationFeeInPercent to that payment array.

  4. Connect and Test. Now you're configured, you'll still need to connect an account to test the whole setup. This account cannot be the the same account as your master platform account. With a different account ready, connect it from the fieldtype you added in step 2. Now, on the front-end, run a test transaction. If all is properly configured, the payment will be automatically passed to the connected account. If there's problems, you'll see details about the specific issue on the front-end, and in the Charge logs.

Check the full Connect reference has more details on the setup steps