Context
A business sold memberships, a course, community access and client services through payment links created over many months. A webhook was meant to grant access on payment: a portal seat, an access code by text, a community role.
The problem
- The webhook decided what was bought from a metadata field. A link without it recorded the money and provisioned nothing.
- It had happened at least twice, and both cases were found by accident weeks later.
- Tagging every link was wrong too: client invoices are not course products, and tagging them would enroll a paying client into a course.
Architecture
- 01Audit before fixingEvery live link was listed and classified: product sale, client invoice or retired. Only real product links received metadata; the rest were left alone on purpose.
- 02Metadata drives entitlementsA product link names its program. The webhook maps program to entitlements and grants all of them in one pass.
- 03Nothing unrecognized disappearsA payment the webhook cannot map lands in the CRM tagged for review, and the owner is alerted, so a person sees it the same day instead of weeks later.
- 04Retire the clutterDuplicate and stale links were deactivated, so there are fewer ways to pay for the wrong thing.
Security model
- Webhook signatures verified before any entitlement is granted.
- Access codes are single-purpose and issued server side only.
- No card data touches the application.
Tasks now automated
- Issuing the portal seat on payment
- Texting the access code
- Granting the community role
- Routing unrecognized payments to a person with an alert
Time returned
- ~10 min
- Manual provisioning removed per sale
- Weeks to same day
- Time to catch an unmapped payment
- 85 audited
- Links reviewed and classified
Check the payment, create the seat, send the code, assign the role, by hand.
Both earlier misses surfaced weeks later; now an alert fires on arrival.
Every active link listed and tagged, left alone or retired.
Time figures are estimates per unit of work, based on the manual steps the build removed. Every other number on this page is measured.
Outcome
Every product sale provisions automatically; every other payment is routed to a person.
Both missed customers were identified from the audit, and the failure mode that caused them is closed.
Look for the money that arrives without a matching action. It is usually the most expensive silent failure in the stack.