meta
and a number of minutes, and when it fires Bankroll delivers timer.fired
with that meta to your webhook route, once. It is for
what your server must do when nobody is asking it: a no-show deadline, a
round that ends on the clock. Your server keeps no timer and runs no cron.
Setup
Your exact origin must be Bankroll Verified, and your webhook route must be in place: a fired timer is delivered the same way as a reference event, signed withBANKROLL_WEBHOOK_SECRET.
Set a timer
createTimer is on @joinbankroll/sdk/server and takes the same
{ origin } as createManagedReference.
A timer is not cancelled: when it fires, look at what it names and decide
whether there is still anything to do.
createTimer throws TimerError with a code:
Handle the event
timer.fired carries id, meta and at. The route hands it to onFired;
handle it idempotently, since a delivery can be retried.
Under the mock
WithBANKROLL_MOCK=1 outside production nothing reaches Bankroll: the timer
is set locally and delivers timer.fired to your route itself, unsigned, when
it fires.