Notify the customer of the incoming request. After they decide, send their response to POST /v1/billing/intent-response with the customerDecision and any spending limits.
Handler
app.post("/webhooks/peere/billing-intent", (req, res) => { const signature = req.headers["x-peere-signature"]; if (!verifySignature(req.body, signature)) { return res.status(401).send("Invalid signature"); } const { webhookType, data } = req.body; if (webhookType === "billing.intent") { for (const intent of data) { notifyCustomer(intent.customerId, intent); storeBillingIntent(intent); } } res.status(200).send("OK");});