Installation
If you haven't already bought the TastyIgniter Multi Vendor Stripe Connect extension, you can purchase it from the TastyIgniter Marketplace.
After purchasing the extension, add satis.tastyigniter.com
as a repository in your composer.json
file to allow Composer to find the package. This is done automatically when you install the extension via the TastyIgniter Admin.
"repositories": {
"tastyigniter": {
"type": "composer",
"url": "https://satis.tastyigniter.com"
}
},
Next, create a auth.json
file under the same directory as your composer.json
file to provide your TastyIgniter Marketplace credentials. This file should contain your email address and carte key in the following format:
{
"http-basic": {
"satis.tastyigniter.com": {
"username": "your-tastyigniter-account-email-address",
"password": "your-tastyigniter-site-carte-key"
}
}
}
- username: Your TastyIgniter account email address.
- password: Your TastyIgniter site carte key, which you can find in your TastyIgniter account under Sites.
After setting up the auth.json
file, you'll be able to install the extension via composer using the following command:
composer require igniterlabs/ti-ext-stripeconnect -W
Run the database migrations to create the required tables:
php artisan igniter:up
Getting started
The Multi Vendor Stripe Connect extension works with the default Stripe payment gateway. To get started, follow these steps:
- Signup for a Stripe account: Visit the Stripe website and create an account if you don't already have one.
- From your TastyIgniter Admin, navigate to the Manage > Settings > Multi Vendor Stripe Connect Settings admin page.
- The following fields are available on the Multi Vendor Stripe Connect Settings page:
-
Settlement Merchant: Choose the business of record for the payment. You can select from:
- Admin: Payments are processed under the admin's Stripe account.
- Location: Payments are processed under the location's connected Stripe account.
- Statement Descriptor: Enter the statement descriptor for the location's connected account that will appear on the customers bank statement.
-
Payout Schedule: Choose the payout schedule for the location's connected accounts. You can select from:
- Manual: Payouts are made manually by the connected admin from their Stripe dashboard.
- Every Day: Payouts are made daily automatically to the location's connected account.
- Every Week: Payouts are made weekly automatically to the location's connected account.
- Every Month: Payouts are made monthly automatically to the location's connected account.
- Stripe Webhook Secret: (Optional) Enter the Stripe webhook secret key. This is used to verify the authenticity of the webhook events sent by Stripe.
-
Commission Rules: Define the commission rules for collecting fees from location's. You can set a fixed amount or a percentage of the order total as the commission. You can select from the following conditions:
- All: Applies the commission to all orders.
- Below: Applies the commission to orders below a certain amount.
- Above: Applies the commission to orders above a certain amount.
-
Settlement Merchant: Choose the business of record for the payment. You can select from:
- Click the Save button to save your settings.
- You will need to configure the Stripe Connect webhook and the Stripe payment gateway to complete the setup. See the sections below for instructions on how to do this.
Configuring the Stripe payment gateway
To configure the Stripe payment gateway for use with the Multi Vendor Stripe Connect extension, follow these steps:
- Navigate to the Manage > Settings > Payment Gateways admin page in your TastyIgniter Admin.
- Click on the Edit Icon next to the Stripe payment gateway.
- In the Stripe payment gateway settings, enter your Secret Key and Publishable Key. You can find these keys in your Stripe account under the Developers > API keys section.
- Click the Save button to save your settings.
- Now your Stripe payment gateway is configured to work with the Multi Vendor Stripe Connect extension.
Configuring the Stripe Connect webhook
To ensure that Stripe can communicate with your TastyIgniter site, you need to configure the Stripe Connect webhook. This webhook is used by Stripe to send updates about connected accounts back to your TastyIgniter site.
- Navigate to the Manage > Settings > Multi Vendor Stripe Connect Settings admin page in your TastyIgniter Admin.
- Copy the Webhook URL provided on the Multi Vendor Stripe Connect Settings page.
- Log in to your Stripe account and navigate to the Developers > Webhooks section.
- In the Webhooks section, click the Add endpoint button.
- In the Add endpoint dialog, paste the copied Webhook URL into the Endpoint URL field.
- Select Events on Connection account option under the Listen to field.
- Choose the events you want to receive updates for. Typically, you would select
account.updated
event under the Account section to ensure you receive comprehensive updates about connected accounts. - Click the Add endpoint button to save the webhook configuration.
- Your webhook URL is now set up, and Stripe will send updates to your TastyIgniter site whenever the selected events occur.
This extension requires the webhooks for the default Stripe payment gateway to be configured as well. If you haven't already set up the Stripe payment gateway, please refer to the Stripe Payment Gateway documentation for instructions on how to do so.
Connecting Location Stripe account
Locations can connect their Stripe accounts by following these steps:
- Navigate to the Manage > Locations admin page in the TastyIgniter Admin.
- Click on the Settings Icon next to the location they want to connect.
- From the Location Settings page, select the Stripe Connect tab.
- Click the Create a Stripe Connect account button to create a new Stripe connected account or connect an existing one.
- Follow the prompts to authorize the Stripe connected account. This will redirect them to Stripe's authorization page.
- Once the authorization is complete, the location's Stripe connected account will be created, and they can start receiving payments for their orders.
Note: Staff members must have the IgniterLabs.StripeConnect.Manage Permission to manage their Stripe Connect account enabled in their user role.
Accessing the connected Stripe account dashboard
To view the connected Stripe account for a location, follow these steps:
- Navigate to the Manage > Locations admin page in the TastyIgniter Admin.
- Click on the Settings Icon next to the location you want to view.
- From the Location Settings page, select the Stripe Connect tab.
- Click the View stripe connect account button to access the connected Stripe account dashboard.
Unlinking a Stripe connected account
To unlink a Stripe connected account from a location, follow these steps:
- Navigate to the Manage > Locations admin page in the TastyIgniter Admin.
- Click on the Settings Icon next to the location you want to unlink.
- From the Location Settings page, select the Stripe Connect tab.
- Click the Unlink Stripe Connect account button to unlink the connected account.
- Confirm the action in the confirmation dialog. This will remove the Stripe connected account from the location.
Making a test payment
To test the Stripe Connect integration, you can make a test payment by following these steps:
- From your TastyIgniter storefront, add a product to your cart and proceed to checkout.
- Choose the Stripe payment method.
- Enter the test card details provided by Stripe. You can use the following test card number:
- Card Number: 4242 4242 4242 4242
- Enter any future expiration date and any CVC code.
- Complete the checkout process.
- After completing the checkout, you should see the order confirmation page, and the payment will be processed through Stripe Connect.
Viewing the collected commission
To view the collected commission from locations, follow these steps:
- From your TastyIgniter Admin, navigate to the Orders page.
- Click on the Edit Icon next to the order you want to view.
- In the order details page, scroll down to the Order total section.
- Here, you will see the Commission section, which displays the total commission collected for that order.
- The commission amount is calculated based on the commission rules defined in the Multi Vendor Stripe Connect Settings.
- You can also see the amount transferred to the location's connected Stripe account under the Transferred to Location section.