Stripe Integration

Automatically generate download tokens when customers complete payments through Stripe.

Overview

The Stripe integration listens for successful payment webhooks and automatically creates download tokens for digital products. This works great for custom checkout flows, subscription services, or direct payment links.

Prerequisites

You'll need a Stripe account with webhooks enabled and products configured with metadata linking to Continuata products.

Step 1: Configure Product Metadata

In your Stripe dashboard, add metadata to your products to link them to Continuata:

Stripe Product Metadata

continuata_product_id: epic-drums-v1
continuata_org_id: audio-company
product_type: digital

Required Metadata

The continuata_product_id field must exactly match your product ID in Continuata for automatic delivery to work.

Step 2: Set Up Webhook Endpoint

Configure Stripe to send payment notifications to Continuata:

  1. In your Stripe Dashboard, go to Developers → Webhooks
  2. Click "Add endpoint"
  3. Enter the webhook URL: https://continuata.io/webhooks/stripe
  4. Select events to listen for:
    • checkout.session.completed
    • payment_intent.succeeded
    • invoice.payment_succeeded (for subscriptions)
  5. Save the endpoint and copy the webhook secret

Step 3: Configure Continuata

Add your Stripe webhook secret to Continuata for security:

  1. Go to your Continuata dashboard
  2. Navigate to Settings → Integrations
  3. Find "Stripe Webhook Secret"
  4. Paste the webhook secret from your Stripe dashboard
  5. Save settings

Checkout Flow Examples

Stripe Checkout

const session = await stripe.checkout.sessions.create({
  payment_method_types: ['card'],
  line_items: [
    {
      price_data: {
        currency: 'usd',
        product: 'prod_epic_drums', // Stripe product ID
        unit_amount: 4999, // $49.99
      },
      quantity: 1,
    },
  ],
  mode: 'payment',
  success_url: 'https://yoursite.com/success',
  cancel_url: 'https://yoursite.com/cancel',
  customer_email: 'customer@example.com',
  metadata: {
    customer_name: 'John Doe'
  }
});

Payment Intent

const paymentIntent = await stripe.paymentIntents.create({
  amount: 4999,
  currency: 'usd',
  metadata: {
    continuata_product_id: 'epic-drums-v1',
    customer_name: 'John Doe',
    customer_email: 'john@example.com'
  }
});

Email Delivery

Configure how customers receive their download links:

Continuata Email Service

  • • Professional branded templates
  • • High deliverability rates
  • • Automatic retry logic
  • • No additional setup required

Custom Email Integration

  • • Use your own email service
  • • Custom branding and templates
  • • Combined with order confirmations
  • • Requires webhook handling

Testing

Test your Stripe integration safely:

  1. Use Stripe's test mode with test payment methods
  2. Create a test checkout session with your configured product
  3. Complete the test payment
  4. Verify download token was created in Continuata dashboard
  5. Test the download link functionality
  6. Check webhook logs in both Stripe and Continuata dashboards

Ready for Production?

Once testing is complete, switch to Stripe live mode and update your webhook URL. See webhook documentation for troubleshooting.