Authentication
Banks push with a bank key. Schools read with a school key. Nothing identifies a cardholder.
Bank / Issuer — API key
All server-to-server bank calls authenticate with a single header. Keys are scoped to your bank account, carry an environment, and can be revoked without rotating anything else.
X-Wishbone-API-Key: wbk_live_<key_id>:<secret>X-Wishbone-API-KeystringREQUIREDPrefix wbk_live_ (production) or wbk_test_ (sandbox), followed by <key_id>:<secret>.
Each host accepts only its own kind of key. The sandbox refuses live keys and production refuses test keys, with a 401 that says so. A test key can never touch production data.
The key is a server secret. It must never ship in a mobile binary or browser bundle. To put the donation flow in your app, mint a short-lived embed token from your backend — see Mobile SDK.
Only the secret half is stored, bcrypt-hashed, so the full key is displayed exactly once at issuance. If you lose it, issue a new one and revoke the old; there is no recovery path.
School — read-only key
Schools pull their gifts with a separate key in a separate header. It can only read that school's feed; it cannot call any bank endpoint, and a bank key cannot read a feed.
X-Wishbone-School-Key: wbs_live_<key_id>:<secret>Cardholders: hashes only
Wishbone never receives a cardholder's email, name, phone or card number. You identify a cardholder with your own opaque cardholder_ref; Wishbone stores only an HMAC of it, keyed per bank, and returns an account_id. The same reference at two banks produces two unrelated accounts.
Every account route checks the account belongs to your bank. Another bank's account_id returns 404.
School account linking
POST /v1/accounts/{account_id}/school-links returns the school's own sign-in URL. The cardholder signs in at the school; Wishbone reads back only the school's opaque donor reference, sealed, and redirects to your return_url with status=linked or status=failed. You never see the reference, and the school never sees anything from you.