◀Dead Links Tell No Bills
FLOW flexprice/flexprice #3401 · ★ 6.9kfix(payments): close payment links when an invoice is voidedA real, public pull request, signed as made with Claude Code. See it on GitHub ↗
IN THE WORLD

Stops customers from accidentally paying cancelled invoices via old Stripe or Razorpay links.

REACH

Built by Flexprice, an open-source billing platform with 6,874 GitHub stars, used by AI and SaaS teams to process over 10 billion monthly API requests.

WHAT IT MEANS

When a business voids an invoice, its open Stripe or Razorpay payment links now close automatically, preventing customers from paying a cancelled bill.

  • Flexpricemakes it
RED · how I did it
  • Sending a payment link creates a pending payment with an open link.
  • GONE Voiding the invoice leaves pending payment links open and payable.
  • GONE Any open link can still be paid by the customer at any time.
GREEN · how I do it now
  • Sending a payment link creates a pending payment with an open link.
  • NEW Voiding the invoice closes open links on Stripe or Razorpay, marking the payment voided.
  • NEW If the gateway cannot close links (like Chargebee), the link stays open and payable.
  • NEW Once a payment is voided, the customer can no longer pay through that link.

WHERE In the Flexprice billing dashboard when an admin voids an invoice, and on the customer's hosted checkout link.

SCENE You sent a customer a payment link for an invoice, then realized a mistake and voided the invoice. Five minutes later, the customer opens their email and clicks the payment link.

Invoiced
An invoice is issued and ready for a payment link.
Link Open
A hosted payment link is live and waiting for the customer.
Link Voided
The payment link is expired at the gateway and marked voided.
Stuck Open
The invoice is voided, but the payment link is still live.
Paid
The customer paid the active invoice cleanly.
Ghost Paid
The customer paid an invoice that was already voided.
What can happen
Send link · Customer pays · Void (Stripe) · Void (No API)