How do I get Stripe Keys?

Why do I need Stripe API Keys?

In addition to letting you take payments via credit/debit card, this platform acts as a "Marketplace", meaning you are allowed to add coaches who can take directly take payment for classes through your management system and you take a fee from them. This simplifies payments for the coaches, means you can take money automatically (or not at all) from a class they teach, and lowers your tax liability as the payment goes to them and they pay the "Marketplace" fee to you. As the system is set up like this, we can't automatically create a Stripe account and get API keys on your behalf due to security.

Stripe allows you to -

  • Take credit / debit card payments
  • Set up recurring payments
  • Allow coaches to sell product (classes or PT sessions) and for you to collect a fee (including 100% and 0%)
  • Full 3D secure/SCA/PCI compliance at no extra cost
  • Reasonable processing fees (stripe.com/pricing)

How do I get Stripe API Keys to activate payments?

1. Create Stripe Account

Signup at https://dashboard.stripe.com/register. If you already have an account, simply login.

Create account

After signing up, you will likely have to fill in a few other details about your business but Stripe will guide you through this.

2. Get Publishable / Secret Keys

1. Once you've completed the signup process and you're taken to the Dashboard, Click the Developers button.

Dashboard

2. On the next page, click the API Keys button. 

Developers

3. Finally, you can copy and paste the Publishable and Secret keys in to ManageFit.

Keys

3. Set up Regular Webhooks

A webhook is a way Stripe lets us know what's happening with payments. If a payment is declined on a scheduled payment, we need to know about it. A webhook tells us this.

If you don't require this functionality, you don't need to set this up. You can enter any random characters in to this field to bypass this section. We do not recommend doing this.

1. Firstly, you'll need to know the URL you're going to send webhooks to. This will be displayed in the "Stripe needs setting up" widget. This will look something like https://YOURBUSINESSNAME.manage-fit.com/api/stripe/webhooks

Widget

2. In Stripe -> Dashboard -> Developers (as above), click the Webhooks Button then "Add endpoint".
Fill the "Endpoint URL" with the URL you found in the previous point.
Add a Description if necessary.
Leave "Listen to events on Connected accounts" unchecked (THIS SHOULD BE CHECKED IF YOU'RE SETTING UP CONNECT WEBHOOKS AS PER THE NEXT MAIN SECTION).

Add Endpoint

3. Select Events we need to listen to. You can either choose to "Select all" or specify the exact events we need as listed here -

Account - account.application.deauthorized - This happens when a connected account stops allowing you to take payments on their behalf. This is only required when you are planning to have coaches use your system. If we receive this information, we remove any memberships associated with this coach and remove them from accessing your system.
Charge - charge.captured - This happens when a payment or scheduled payment succeeds. We use this in case a payment fails and an automatic retry succeeds. We reactivate any user who this applies to.
Charge - charge.expired - If a pending payment has repeatedly failed and Stripe has been unable to process it, we notify the User. Under normal circumstances, they get 3 warnings before their account is deactivated.
Charge - charge.failed - Same as charge.expired only for immediate payments, not scheduled payments.
Customer - customer.deleted - After a series of payment failures, the custom is deleted. We use this information to deactivate the customer on your system so they no longer have access.
Customer - customer.subscription.deleted - If a membership is cancelled either through Stripe or at the bank then this lets us know to deactivate their membership.
Customer - customer.subscription.updated - A membership may expire. This lets us know when that happens so we can remove the user's membership.
Invoice - invoice.payment_action_required - Due to SCA, if a scheduled payment requires additional authorisation we need to ask the user to come back to the site and give the permission to take the money. When we receive this, we send the user a notification that they have a payment pending and need to authorise it.
Invoice - invoice.payment_succeeded - Same as charge.captured
Invoice - invoice.payment_failed - Same as charge.failed but for specific invoices.
Invoice - invoice.upcoming - Lets us know that a scheduled payment is coming up. We use this to notify the customer of a scheduled payment as per SCA rules.
Plan - plan.deleted - When you delete the Membership Payment Scheme on your system, it deletes it on Stripe as well. We listen to this so we know when it's safe to remove this membership from individual Users
Product - product.deleted - Same as plan.deleted only for the whole Membership.

Add Events

Once done, "Add endpoint" and you're finished!

4. Set up Connect Webhooks

A Connect webhook is how we get the same data as Regular Webhooks but on behalf of your coaches. As they're using their own Stripe system behind the scenes, we still need to know if their payments have failed.

If you don't require this functionality or are never going to have extra coaches, you don't need to set this up. You can enter any random characters in to this field to bypass this section.

Do exactly the same as above only making sure that "Listen to events on Connected accounts" is selected.

Connect