Architecture

What happens between your 202 and the webhook.

Request path

The bank pushes; the school pulls. Wishbone never calls a school system to write anything, and nothing a bank sends about a cardholder reaches the school.

Bank backend
   │  POST /v1/donations/request        (X-Wishbone-API-Key)
   ▼
Wishbone API ──▶ validate ──▶ record "accepted" ──▶ 202 Accepted
                                   │
                                   ▼
School ◀── GET /v1/school/gifts ── feed (X-Wishbone-School-Key)
   │  reads on past the cursor
   ▼
Wishbone ──▶ "delivered" ──▶ donation.delivered webhook ──▶ your endpoint

Validation order

A gift is checked in this order; the first failure is returned.

CheckFailure
School exists, is active, and is open to your bank404 SCHOOL_NOT_ACTIVE
fund_designation is active for the school422 FUND_INVALID
Amount clears the school and fund minimum422 AMOUNT_BELOW_MINIMUM
account_id, if sent, is an active account at your bank404 ACCOUNT_NOT_FOUND
bank_transaction_ref not already used by your bank409 DONATION_DUPLICATE

Gift lifecycle

StatusMeaning
acceptedRecorded. You have your 202. Waiting in the school's feed.
deliveredThe school pulled it and read on past it. donation.delivered sent.
cancelledYou cancelled it before the school was shown it. Refund the points.

You can cancel with POST /v1/donations/{id}/cancel until the gift first appears on a school feed page. After that it returns 409 CONFLICT.

Idempotency

bank_transaction_ref is your idempotency key, unique per bank. Wishbone stores only a keyed hash of it, so it is never echoed back — keep the donation_id.

Retrying a 5xx or a timeout with the same bank_transaction_ref is always safe. If the first attempt landed you get 409 DONATION_DUPLICATE with error.details.donation_id. Or ask directly with POST /v1/donations/lookup.

Where the money is not

Wishbone records, routes and confirms. It does not hold or move funds. See compliance for the full statement.