Integration Guide

This guide will walk you through setting up a webhook integration between Stripe and HookFlo, enabling you to receive alerts for payment, subscription, and other financial events.

Stripe webhooks are secured using a signing secret that verifies the authenticity of each webhook event. HookFlo uses this signature to validate that incoming requests are genuinely from Stripe.

Prerequisites

  • A HookFlo account with an active project
  • A Stripe account with admin access
  • Basic understanding of Stripe’s payment processing system

Integration Overview

The integration process follows these key steps:

  1. Set up a webhook in HookFlo
  2. Configure notification channels (email/Slack)
  3. Connect Stripe to HookFlo
  4. Configure Stripe to send webhooks
  5. Test the integration

Setting Up Your HookFlo Webhook

After logging into HookFlo, follow these steps to create and configure your Stripe webhook:

1

Create a Webhook

2

Setup Notification Channel

3

Connect your Webhook with application

Configuring Stripe

Now that your HookFlo webhook is set up, you need to configure Stripe to send events to it:

1

Create a Webhook Endpoint in Stripe

2

Get Webhook Signing Secret from Stripe

3

Configure Webhook Verification in HookFlo

Testing Your Integration

To ensure your integration is working properly:

1

Test the Webhook in Stripe

2

Verify in HookFlo

Supported Events

Stripe offers a comprehensive set of webhook events. Here are some of the most commonly used categories:

Payment Events

  • payment_intent.succeeded: When a payment is successfully processed
  • payment_intent.payment_failed: When a payment attempt fails
  • charge.succeeded: When a charge is successful
  • charge.failed: When a charge fails
  • charge.refunded: When a charge is refunded

Customer Events

  • customer.created: When a new customer is created
  • customer.updated: When customer details are updated
  • customer.deleted: When a customer is deleted

Subscription Events

  • customer.subscription.created: When a subscription is created
  • customer.subscription.updated: When a subscription is updated
  • customer.subscription.deleted: When a subscription is canceled
  • invoice.payment_succeeded: When a subscription payment succeeds
  • invoice.payment_failed: When a subscription payment fails

Product & Price Events

  • product.created: When a product is created
  • price.created: When a price is created
  • product.updated: When a product is updated

For a complete list of events, refer to the Stripe API documentation.

Webhook Payload Structure

Here’s an example of what the webhook payload looks like for a payment_intent.succeeded event:

{
  "id": "evt_1NwXaIJFJbz6iDgO7bCoVSfK",
  "object": "event",
  "api_version": "2022-11-15",
  "created": 1633027930,
  "data": {
    "object": {
      "id": "pi_3NwXaHJFJbz6iDgO0gnbIVoc",
      "object": "payment_intent",
      "amount": 2000,
      "amount_received": 2000,
      "currency": "usd",
      "customer": "cus_LTf0miiJ4j18Ny",
      "payment_method": "pm_1NwXaHJFJbz6iDgObthB6dgO",
      "payment_method_types": ["card"],
      "status": "succeeded"
    }
  },
  "livemode": false,
  "type": "payment_intent.succeeded"
}

Advanced Configuration

Troubleshooting

Example: Monitoring Successful Payments

Here’s a complete example of setting up HookFlo to alert your team when payments succeed:

1

Create the Webhook in HookFlo

Follow the steps above to create a Stripe webhook in HookFlo and configure your notification channels.

2

Configure Stripe to Send Payment Events

  1. In your Stripe dashboard, go to Developers > Webhooks
  2. Create a new webhook using your HookFlo webhook URL
  3. Select the payment_intent.succeeded event type
  4. Copy your webhook signing secret
  5. Add the signing secret to your HookFlo Stripe configuration
3

Test With a Sample Payment

  1. Use Stripe’s test mode to create a test payment
  2. Check your configured notification channels for alerts
  3. Verify the event appears in your HookFlo notification logs

Security Considerations

When setting up webhook integrations between Stripe and HookFlo, keep these security best practices in mind:

  • Protect your signing secret: Never expose the Stripe signing secret in client-side code
  • Validate all webhooks: Always use the signing secret to verify webhook authenticity
  • Use HTTPS only: Ensure all webhook URLs use encrypted connections
  • Implement proper access controls: Limit who can view sensitive payment information
  • PCI compliance: Be careful about storing or logging complete payment details

Congratulations! 🎉

You’ve successfully set up real-time payment event tracking and alerting between Stripe and HookFlo in just a few minutes. Your team can now receive immediate notifications about important payment events, helping you respond quickly to critical situations.

Need more help? Contact our support team or join our Discord forum or DM me directly on X.