capabilities.push
and an attested signing key. See configuration and compatibility.
Methods
Promise<void>, resolving when Bankroll accepts the request for
delivery. This is not confirmation that a device displayed it. notifyUser
targets one Bankroll user; notifyAudience targets your configured recent-user
audience. Bankroll applies your app’s audience and mute policies.
Authentication
WithBANKROLL_APP_KEY, the SDK sends a shared app JWT
in the Authorization header and an application/json body:
path is optional. The authenticated token supplies the origin.
BANKROLL_API_URL overrides the default API origin.
With only BANKROLL_PUSH_KEY, the SDK preserves the legacy application/jwt
request body, without an Authorization header. These JWTs use alg: EdDSA,
iss: <app-origin>, aud: bankroll-push, and a 60-second SDK lifetime.
The type is bankroll-push+jwt for unicast or bankroll-push-broadcast+jwt
for broadcast; content is in title, body, and optional path, with the
unicast recipient in sub. A legacy token does not grant general app access.
Errors
A refused request throwsPushError; its code is Bankroll’s reason:
Configuration and network failures can throw other errors. The SDK does not
retry sends automatically; a lost reply may hide an accepted notification,
so retrying can send it twice.