Skip to main content

You’ll need:

An active Stripe account with live/test subscriptions
Get your Vibess.ai Organization ID and Secret Key in your account’s settings page.
Ability to add JavaScript to your web app
Developer access for HMAC implementation

➡️ Copy your Stripe API Key in your Vibes account

Go to https://dashboard.stripe.com/apikeys and click ‘Create restricted key’Screenshot2025 05 19at4 19 15PM Pn
→ Select the first option: ‘Providing this key to another website’Screenshot 2025-05-19 at 8.05.17 PM.png→ Now add a name and our website to identify your new key:→ Click on ‘create restricted key’ and copy your new API key. You’ll paste it in your Vibes accountScreenshot2025 05 19at4 22 47PM Pn
Click on ‘Integrate with Stripe’ and paste your API keyScreenshot2025 05 19at8 21 39PM Pn

1️⃣ Import our JavaScript script

Add this script to your web application:

2️⃣ Create an HMAC signature

Choose your preferred language to implement authentication:
Remember to fill in your variables.Organization ID and Secret Key in your account’s settings page.

3️⃣ Start a cancellation flow

Use the generated HMAC token to initialize the cancellation flow:
Important: Ensure all parameters match those used to generate the HMAC token

Implementation Example

Alternative Integration: Email-Based Session

If you don’t have access to the Stripe Customer ID, you can integrate using the user’s email. This method allows session-based identification and supports actions like subscription management or cancellation by matching the user’s email address.
ATTENTION: This is not recommended unless you are sure that:
  1. Your user accounts have unique emails in Stripe
  2. Your users only have a single active subscription at a time
If these conditions are not met, you could get unexpected behavior.
Example:

Testing

  • Use test mode in Stripe to verify the integration
  • Confirm HMAC token generation with test credentials
  • Verify cancellation flow triggers correctly