Revana Docs

Stripe Integration

Revana Stripe webhook integration for a NestJS route

We assume at this point that your route file has the following configured already:

  • a JavaScript runtime that gives you access to the raw request body
  • a configured stripe instance
  • a valid STRIPE_WEBHOOK_SECRET

Install the package

Before wiring the webhook route into your application, install the Revana JavaScript package using the package manager your project already uses.

npm install @revana/js
pnpm add @revana/js
yarn add @revana/js
bun add @revana/js

Revana Setup

In your environment variables create a new variable called REVANA_API_KEY and make sure you pass the correct space api key which you would like the daa to feed into, this is explained over in the revana dashboard under the user dropdown the api managment

simply add the following code to your project where you have your stripe webhook endpoint

import { Revana } from "@revana/js";

const revana = new Revana({
  apiKey: process.env.REVANA_API_KEY,
});

On this page