Stripe Server Notifications
Sending Stripe server notifications to RevenueCat
RevenueCat does not require server notifications from Stripe, however doing so can speed up webhook and integration delivery times and reduce lag time for Charts.
Send Stripe token to RevenueCat
Stripe Server Notifications only work if the receipt exists in RevenueCat when the event is dispatched from Stripe. If the receipt doesn't exist, the event will fail. This includes test events from Stripe.
You'll need to follow our Stripe Web Payments guide and send your purchase tokens to RevenueCat before proceeding with this guide.
- Navigate to your app settings in the RevenueCat dashboard by selecting your app from Project Settings > Apps.
- Expand the Webhook Configuration section and copy the endpoint provided under Stripe Webhook Endpoint.
- Log in to Stripe and go to the Webhooks dashboard.
- Click Add endpoint, paste the URL in the Endpoint URL field and select the following events:
It's important to only select these events.
If you choose other events besides what's listed above, our API will respond with an error, and Stripe will eventually disable the webhook.
- Click Add endpoint. You might be asked to enter your password.
- Copy the Signing Secret value and go back to your app settings in the RevenueCat Dashboard (select your app under Project Settings > Apps).
- Paste it in the Stripe Webhook Secret input field and save. The input field should now look like this:
Stripe Webhook 400 Errors
Sometimes you may experience 400 errors when connecting to Stripe. Generally these happen when there is something wrong with your configuration or your Stripe account is not properly connected to RevenueCat.
Two common configuration errors are with events and the webhook secret.
One webhook endpoint should contain all of the events, not one endpoint per event, and the only events supported are those listed above in step 4. The Stripe Webhook Secret should be properly set in your RevenueCat project settings in the Stripe Webhook Secret field. If this field is missing or not identical to the secret generated in Stripe, 400 errors will occur.
When debugging connection issues with Stripe, it may be necessary to reconnect Stripe and RevenueCat. Make sure to use the email that owns RevenueCat project. To reconnect, follow these steps:
- Disconnect from Stripe in the RevenueCat dashboard
- Uninstall the app from your Stripe account in the Stripe Dashboard
- In the RevenueCat dashboard, click 'Connect to Stripe'
- Install the RevenueCat app in the Stripe dashboard
- Ensure the 'test mode' switch is off in Stripe
- Click 'Sign in with RevenueCat' in Stripe in the RevenueCat app's settings
When reconnecting to Stripe, the webhook secret can change so make sure it is the same in both Stripe and RevenueCat.
Updated about 1 month ago