Skip to main content

Introduction

Motto offers an integration with Stripe, which makes it easy to monetize your content through subscriptions or one-time purchases. To enable this integration, you need to create and configure Stripe API keys in your Motto project.

Where to find your Stripe API keys

Motto needs two types of keys for a successful integration with Stripe:
  • Publishable key: Used for client-side operations, such as tokenizing payment information
  • Secret key (or restricted key): Used for server-side operations, such as creating charges and managing subscriptions

Finding your API keys

  1. Log in to your Stripe Dashboard
  2. Navigate to the “Developers” section in the left-hand menu (near the bottom)
  3. Click on “API keys”
  4. Copy your “Publishable key”. It should start with pk_live_ for live mode or pk_test_ for test mode.
  5. For the “Secret key”, choose one of the options below:
If you want to manage fine-grained permissions, you can create a “Restricted key” instead:
  1. Click on “Create restricted key”
  2. Select “Providing this key to another website”
  3. Enter a name for this key and https://mottostreaming.com as the URL
  4. Tick the box “Customise permissions for this key”
  5. Leave the default permissions, and adjust by adding write permissions on the following APIs (if not already done):
    • Checkout Sessions
    • Invoices
    • Subscriptions
    • Webhook Endpoints
    • Prices
    • Payment Intents
    • Payment Methods
    • Charges
    • Customers
  6. Click “Create key” and copy the generated restricted key. It should start with rk_live_ for live mode or rk_test_ for test mode.
  7. Copy the generated restricted key.
Stripe may require you to go through a verification process before you can create API keys, especially for live mode. Follow the instructions provided by Stripe to complete this process.
We recommend testing your integration first before going live. To do this, you’ll need to obtain keys from Stripe’s test environment by enabling “Test mode” in the Stripe Dashboard (click on your organization name top-left -> Switch to sandbox -> Test mode). Follow the same steps as above to get your test keys.

Configuring Stripe in Motto

To configure Stripe in the Motto Studio, navigate to OTT -> Integrations -> Stripe. When clicking on “Connect”, you will see the following form appear: If possible, provide the credentials for both the production and the test environments. If you’re still in the experimental phase, at least provide the test credentials, so that you can test the integration without needing a real creditcard. Make sure to toggle on “enable” on the integration after you save the Stripe credentials.

Caveats

It is good to keep the following in mind, as you integrate Stripe with Motto.

Test payments

If you want to test payments on your OTT platform without using a real creditcard, and you’ve provided the Stripe test credentials as described above, you must also change your user account to a “Tester” role. Do this by navigating to Users -> Search for your user -> Edit user.
After you change the role of a user account, the change will only apply once you sign out and back in again on the OTT platform.

Webhooks in Stripe

When you use the Stripe integration form in the Motto Studio, the Motto backend will call the Stripe API to configure various webhooks. This ensures that Motto is notified of any relevant activity within your Stripe account (like a new payment or subscription being created).
You must not alter or remove these webhooks from your Stripe account, otherwise the Stripe integration will fail.