When a checkout page fires at 3 a.m., the useful question is not whether a flag exists. It is: which flag state did this request receive, and did that state change the failure path? For a B2B SaaS checkout, the least complicated useful design is middleware that fetches the flag value at request time, attaches the result to the request context, and lets the handler decide whether the feature is available.
Short answer: use the GET /v1/flags/get_value/{key} endpoint from middleware, return the flag state to the checkout handler, and instrument both the flag lookup and the resulting payment path. Keep the fallback conservative. A failed lookup should not silently turn on a risky checkout change.
What should the checkout page actually tell you?
The page that fires should name the broken action: checkout attempts failing after a rollout, not merely “checkout errors increased.” Work backward from that page.…