Guides
Learn how to integrate with the Fanbase API
Contents
Getting Started
Fanbase API is available exclusively to artists on the Legendary plan. If you are on Legendary and ready to get started, everything you need is in this documentation.
Your Artist ID is available in your Openstage Manager Console under Artist Settings. No additional provisioning is required to access the staging environment. When you are ready to go live, switch to the live base URL.
For questions, contact your Artist Success Account Manager. Technical escalations are handled internally by our engineering team and routed through your dedicated Slack channel or outreach to your Artist Success Account Manager.
Support
For questions about the API, contact your Artist Success Account Manager. Technical questions are routed internally to our engineering team. If you are on Legendary, you will have access to a dedicated Slack channel where both your Account Manager and engineering team have visibility.
If you do not know who your Artist Success Account Manager is, email support@openstage.live.
For production issues, reach out through the same channels and flag urgency in your message. We do not have a separate critical support path at this time but will respond as a priority.
Onboarding
As part of your Fanbase API access, you will receive onboarding sessions with the Openstage team to help you scope your build, work through integration, and get to launch. Your Account Manager will coordinate scheduling.
Base URLs
-
Live:
https://api.openstage.live/fan2 -
Stage:
https://api-stage.openstage.live/fan2
(stage has a copy of the live data, and is overwritten every day)
ArtistId
All APIs require an artistId. Your artistId is available on the Artist Settings page of your Openstage Manager Console.
Access Tokens
Most APIs require an Access Token identifying the Fan.
New Fans
A new Access Token is obtained in a two-step process:
-
Call
fan/email/signup(no auth required). This will generate an email to the given email address. This email contains a Signup Token appended to the returnUrl you supply. -
Call
fan/signupusing the Signup Token acquired in step 1. This will return a Fan record containing an Access Token. This should be stored and used for subsequent requests.
Existing Fans
Existing Fans can obtain an Access Token in two ways:
- Use
fan/loginAPI -
Use
fan/email/magic-linkto receive an email containing a Magic Link token which can be exchanged for an Access Token by callingfan/login/magic-linkAPI.
FAQ
How do I get access to Fanbase API?
Fanbase API is available exclusively on the Legendary plan. Everything you need to get started is in this documentation. Your Artist ID is in your Openstage Manager Console under Artist Settings.
What is the difference between the staging and live environments?
Staging (https://api-stage.openstage.live/fan2) runs a
copy of live data and is overwritten daily. Use it for testing.
Switch to the live URL
(https://api.openstage.live/fan2) when you are ready
for production.
Are there rate limits?
There are no hard rate limits. Under heavy load, non-critical tasks such as tagging are queued and processed within minutes. For the vast majority of use cases this is not a concern.
What is the versioning policy?
We will introduce versioning when breaking changes are made. You will be notified in advance of any breaking changes. Non-breaking updates are made without version changes.
What if I find a bug in production?
Contact your Artist Success Account Manager and flag it as a production issue. Technical issues are triaged internally and addressed as a priority.
Do I need to do anything to move from staging to production?
No. Switch to the live base URL when you are ready. No additional provisioning is required.
Who do I contact for technical support?
Start with your Artist Success Account Manager via email or your dedicated Slack channel if you have one. Technical questions are routed to our engineering team internally.
Are there known limitations I should be aware of?
Push notifications are not currently supported via the API. XP and badges are in development. Any additional limitations will be documented here as they are identified.
Openstage Fan vs FanArtist
Fan login details (email and password, or magic link token) are shared between artists' platforms on Openstage. The email address field is unique and required, but your frontend can decide which set of the other fan detail fields are required for your fans to use your platform. Note that a fan having a valid login does not guarantee the existence of the other fan detail fields. We recommend implementing a "Missing details" view or popup to collect these after login.
The email and SMS consent fields are specific consents to your artists and are not shared between Openstage artists. If a fan with an existing account from another artist logs in to your account, they will not have given consent to your artist yet, so you must collect the appropriate consent from them, detailing the terms and conditions and privacy policy in the process.
User Creation Flow
-
First call the
/signupendpoint with the new fan's email address. - If a fan login account with this email address already exists on Openstage (for any artist), the API will respond with 500 and an appropriate message. You should prompt your fans to log in with their existing login details.
- Otherwise, the response is 200 and the API will send an email with a signup token to the given email address.
-
The fan clicks on the link in the email. This takes them to
/signup?token=..., at which point your frontend should display the required fan details form fields along with the password (and password repeat) field. Validate these details first, then:-
Call
/signupwith the signup token auth header, the artistId and the password in the body payload. -
Then call
/fanPATCH with the fan details to submit the form data. -
Then call
/loginto log the fan in with the auth from the/fanresponse.
-
Call
- At this point your fan's account is created and the fan is logged in, so you can move to the membership selection step if needed.
Payments and Card Details with Stripe
Set Up Payment Methods in Stripe Dashboard
- Log into the Stripe Dashboard.
- Go to Settings > Payments > Payment methods.
- Optional: Use Stripe's test mode to check your integration and customer flow without placing production orders. You can do this by toggling Test mode in your Stripe dashboard before enabling the payment method.
- On the list of payment methods, find the desired payment method and click Turn on.
- After successful testing, make sure to use your live account instead of sandbox mode.
Install Dependencies
Make sure you have the required dependencies installed:
npm install @stripe/stripe-js
Environment Setup
First, you need to set up the following environment variables in
your .env file:
VITE_STRIPE_PK=your_stripe_publishable_key
VITE_STRIPE_CONNECT_ID=your_stripe_connect_account_id
Both keys can be found in your Stripe Dashboard's main screen.
Creating a Stripe Instance
We call getStripeInstance when mounting our component
(StripePaymentForm.vue), which uses the
VITE_STRIPE_CONNECT_ID from the .env file.
This method calls Stripe's loadStripe function which
creates the instance with the given Connect ID.
After the instance has been created, we call
fanStore.subscribe(selectedTierId). If Openstage is
able to use existing (Stripe) payment details for this fan, the
endpoint returns "ok" to indicate success. If the fan needs to enter
payment details it returns a clientSecret.
With the returned clientSecret, we can create a Stripe
Element, and with that we can mount the payment form in our
component
using Stripe's mount function.
It is also possible to change the tier a user is subscribed to using the fanStore.subscribe(selectedTierId) method (with a different tier ID than their current one).
Submit Payment Form
-
We have to call Stripe Element's
submitfunction on our Stripe Element, only move forward if that doesn't return an error. -
After that, use Stripe's
confirmPayment, with the params:-
elements: previously created Stripe Element -
clientSecret: the clientSecret returned fromfanStore.subscribe() -
confirmParams:{
return_url: window.location.href + '?tierId=' + selectedTierId,
} redirect: 'if_required'
-
After a successful payment, our application communicates with Stripe
via a webhook. Until that doesn't finish, we need to call
fanStore.fanGet() to see whether the
subscriptionId has been set to the fan by our backend.
(Create a loop for that call until the endpoint returns the
subscriptionId.)
Testing the redirect flow should work the same, with the addition to
only call fanStore.fanGet() when the
return_url has redirect_status=succeeded.
Redirection logic example component:
StripeRedirectDialog.vue
Test Payment Methods
- Use Stripe's test mode and test card numbers
-
Test different payment scenarios:
- Successful payment
- Failed payment
- Card decline
- 3D Secure authentication
- Test the redirect flow
Production Deployment
- Before going live, switch to production Stripe keys
- Set up proper webhook endpoints
- Test the entire payment flow in production mode
Video Playback with MUX Player
We use Mux for video playback because it delivers content via adaptive bitrate streaming, ensuring smooth, high-quality experiences across devices and network conditions.
Unlike static video files, Mux dynamically adjusts video quality, supports global delivery at scale, and simplifies encoding, compatibility and access management.
To secure access, we use signed playback URLs, which restrict where and when videos can be viewed—preventing unauthorized sharing and enforcing access rules. This approach balances performance, scalability, and security while offering a seamless viewing experience.
Required Parameters
<mux-player> expects playback-id,
playback-token, and thumbnail-token for
successful playback. Grab these from
/post/playAsset for your given id. The
tokens have an expiration time of 2 hours, so we recommend fetching
them when they are needed.
Metadata Tracking
Additionally, for better metrics tracking, please also set the following attributes:
-
metadata-video-id
The id of the content the video belongs to (uuid string) -
metadata-video-title
The title of the content the video belongs to (string) -
metadata-viewer-user-id
The viewing user's Openstage identifier (uuid string) -
metadata-sub-property-id
The name of your project (string)
Domain Setup
Please contact Openstage to set up your domain for signed URL playback.
Documentation
Official documentation: https://www.mux.com/docs/guides/play-your-videos