Stripe payment webhooks

The system receives Stripe webhook events to automatically record payments against CRM invoices and create payment links from invoices.

When this happens: (A) User creates a payment link from an invoice. (B) Stripe sends a webhook event.

Step by step

  1. 1

    On an Invoice detail page, clicks Create Payment Link.

    Calls Stripe API: creates a payment session with invoice line items, amount, currency. Receives Stripe payment link URL. EasyCRM shows link and Copy button.

  2. 2

    Send the payment link to the customer (email or quote).

Other paths

Partial payment

Payment amount < Balance Due. Invoice remains Partially Paid Balance updated.

Payment failed

Fires payment_intent.payment_failed. EasyCRM logs failed attempt. Notification to invoice owner: Payment attempt failed

Refund

Fires charge.refunded. EasyCRM creates negative payment entry. Adjusts Balance Due. Status reverts to Sent if fully refunded.

If something goes wrong

Invalid webhook signature

Webhook signature verification fails. EasyCRM returns HTTP 400. Event discarded. Logged as security event.

Invoice not found

Invoice ID in metadata doesn't match any CRM invoice. EasyCRM returns HTTP 200 (to prevent Stripe retries). EasyCRM logs orphaned event for Admin review.

Good to know

  • All webhook payloads are verified using the Stripe webhook signing secret.
  • Idempotency: duplicate webhook events (same event ID) are ignored.
  • Payment amounts are handled in the invoice's currency.