Quickstart
CAF CANADA exposes three integration surfaces. Pick the one that fits your project.
League onboarding — 4 steps end-to-end
You have redeemed the connect token Head Office sent you and hold your operator slug and webhook signing secret. From zero to a fully-registered roster:
Register a club.
POST /api/v1/operators/{slug}/clubs → returns cafcan_number. Docs.
Register players.
POST /api/v1/operators/{slug}/clubs/{cafcan_number}/persons for each member. Write access is auto-granted by step 1. Docs.
Subscribe to lifecycle events.
CAF CANADA POSTs person.transferred / person.released / person.suspended / person.reinstated / person.retired events to your webhook URL as they happen. It starts as the callback URL you gave when redeeming; change it via PUT /api/v1/operators/{slug}/config/outbound-webhook-url. Docs.
Reconcile on demand.
GET /clubs/by-ref/{operator_club_id} and GET /persons/by-ref/{operator_member_id} let you translate your IDs into CAF CANADA IDs at any time.
First call — verify a member ID
No setup. Paste this into your terminal — works right now.
curl https://api.cafcan.ca/api/v1/public/members/CL26-4F2K-7MQ/verifyNot a developer? Visit /verify/member, paste any CAF CANADA member number, see the result. To register players, log into your Club Portal → "My Roster" → "Register new". CAF CANADA issues the IDs for you.
Authentication
Three auth modes — pick whichever your endpoint requires (each section below tells you).
Public — no key
Member-verification, public competition reads, the embed widget. Just GET. We rate-limit by IP — you don’t need to do anything. For more competition reads, send an approved key in the X-CAFCAN-Key header.
Operator HMAC
All operator-side endpoints (registration, lifecycle webhooks, self-serve config). Signed with your webhook_secret — same one CAF CANADA uses to sign outbound webhooks to you.
X-Cafcan-Operator: <your_slug>
X-Cafcan-Signature: sha256=<hex HMAC-SHA256 of body>
X-Cafcan-Delivery: <uuid>
Content-Type: application/jsonConnect-token (one-time)
Head Office sends a one-time connect token (valid 7 days by default). Redeem it once with an HTTPS callback URL that answers, and the response shows your operator API key and webhook signing secret, once. Club, person and config calls are then signed with the webhook secret (HMAC).
curl -X POST https://api.cafcan.ca/api/v1/onboarding/redeem \
-H "Content-Type: application/json" \
-d '{
"token": "cnct_live_...",
"operator_callback_url": "https://api.cma.example.com/webhooks/cafcan"
}'Member Verification
What it does: Confirms a CAF CANADA ID is valid and shows live status (active/suspended/etc.) — no PII for minors.
To show whether a club or person is in good standing: tournament organisers, sponsors, partner sites. A number is public, so it doesn’t prove that whoever gives it holds it: never grant a member benefit on a number alone. Benefits use one-time codes (Member Benefits, below).
GET/api/v1/public/members/{number}/verify
curl https://api.cafcan.ca/api/v1/public/members/PL26-K7M3-9QD/verify{
"number": "CL26-4F2K-7MQ",
"type": "club", // from the prefix: CL, PC professional club, AC, AN association, IN institution,
// OR organisation, MB member, PL, CC, SU, OF, LO (AF and AS: numbers issued before 2026-11-12)
"issue_year": 2026,
"name": "Example FC", // organisations and operators only; null for players, coaches and supporters
"org_type": "community_club", // organisations only: community_club, professional_club, academy, association,
// institution or organisation
"membership_class": "club", // organisations only: club (Member club), affiliate, associate or academy
"status": "active", // e.g. active, pending, suspended, expired, retired, terminated; unknown if no record
"cycle_start": "2026-08-01", // organisations only
"cycle_end": "2027-07-31",
"verified_at": "2026-04-29T03:14:00Z"
// "former_number": "CL26-4F2K-7MQ" when you sent a number used before 2026-11-11; "number" is the current one
}Anyone can verify any CAF CANADA member number at api.cafcan.ca/verify/member — no developer needed. Share the link with sponsors/operators.
Club Registration
What it does: Atomically mints a permanent CAF CANADA Club ID (its type’s prefix: CL…, PC…, AN…, IN…, OR…) under your operator account. Seeds the club with the 7 standard compliance slots, drafts a CMS club row, and auto-grants your operator write authorization so you can register players under it right away. The club is active at once (status="active"); a sandbox operator’s club waits for CAF CANADA’s approval (status="pending_approval").
You run a league (e.g. CMA) with multiple member clubs. CAF CANADA approved your operator, so a club you register here is active at once and CAF CANADA emails its contact a welcome. A sandbox operator’s club starts as status="pending_approval" and isn’t a member in good standing until Head Office approves it. Read a club’s status with GET /clubs or the verifier. The CMS public club page stays draft until an admin promotes it.
POST/api/v1/operators/{slug}/clubs
Request body
| Field | Type | Description |
|---|---|---|
operator_club_idrequired | string | Your internal club ID (1–80 chars). Used for idempotent retries and reverse lookup. |
club_namerequired | string | Legal club name (2–160 chars). Stored verbatim. |
contact_emailrequired | email | Primary club contact. Lowercased and used as the strongest natural key for dedupe (see 409 below). |
contact_name | string | Optional contact person name. |
tier | "club" | "affiliate" | "associate" | The membership class. Defaults to "club" (Member club). |
org_type | "community_club" | "professional_club" | "academy" | "association" | "institution" | "organisation" | Optional — what the organisation is; it gives the number’s prefix (CL, PC, AC, AN, IN, OR) and must allow the tier. Left out: community_club for "club", association otherwise. |
province | string | Optional — 2-letter Canadian province code (ON, QC, BC…). |
city | string | Optional city. |
website | URL | Optional public website — carried into the draft CMS club row. |
founded_year | integer | Optional founding year (1800–2100). |
Example
BODY='{"operator_club_id":"example-fc","club_name":"Example FC","contact_email":"[email protected]","tier":"club","province":"QC","city":"Montreal"}'
SIG="sha256=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" -hex | awk '{print $NF}')"
curl -X POST https://api.cafcan.ca/api/v1/operators/cma/clubs \
-H "Content-Type: application/json" \
-H "X-Cafcan-Operator: cma" \
-H "X-Cafcan-Signature: $SIG" \
-H "X-Cafcan-Delivery: $(uuidgen)" \
-d "$BODY"{
"id": "a7f9b2…",
"cafcan_number": "CL26-4F2K-7MQ",
"club_name": "Example FC",
"tier": "club",
"status": "active",
"contact_email": "[email protected]",
"cycle_start": "2026-08-01",
"cycle_end": "2027-07-31",
"created_at": "2026-04-29T18:04:21+00:00",
"your_operator_club_id": "example-fc",
"registered_via_operator": true,
"idempotent": false
}Idempotency — three layers
Same X-Cafcan-Delivery → cached response replayed (same status code).
Same (operator_slug, operator_club_id) → 200 with idempotent: true. Re-running your registration script is always safe.
contact_email already belongs to a CAF CANADA club: if your operator already linked that club under a different operator_club_id → 409 with the existing cafcan_number and type: "club/duplicate"; otherwise the existing club is linked to your operator_club_id (200 with linked: true) and keeps its number.
After registration — your next calls
The moment this endpoint returns 201, your operator has write authorization on the new club. Register players immediately against the cafcan_number you received:
# Using the CAF CANADA Club ID from above
CAFCAN_CLUB="CL26-4F2K-7MQ"
curl -X POST https://api.cafcan.ca/api/v1/operators/cma/clubs/$CAFCAN_CLUB/persons \
-H "X-Cafcan-Operator: cma" \
-H "X-Cafcan-Signature: $SIG" \
-H "X-Cafcan-Delivery: $(uuidgen)" \
-d '{ "operator_member_id": "cma-pl-1", "kind": "player", "role": "player",
"legal_name": "Sample Player", "dob": "2012-04-15" }'GET/api/v1/operators/{slug}/clubs
Every club your operator has registered or been authorized for, newest first (up to 500). Each row returns your_operator_club_id — cross-operator privacy is enforced (you never see another operator’s refs).
curl https://api.cafcan.ca/api/v1/operators/cma/clubs \
-H "X-Cafcan-Operator: cma" \
-H "X-Cafcan-Signature: sha256=${SIG_OF_EMPTY_BODY}" \
-H "X-Cafcan-Delivery: $(uuidgen)"
# → 200 { "clubs": [ ... ], "total": 12 }GET/api/v1/operators/{slug}/clubs/by-ref/{operator_club_id}
Reverse-lookup — translate your internal club ID to the CAF CANADA number. Useful when your job queue retries and you need to know whether a given club has already been minted.
curl https://api.cafcan.ca/api/v1/operators/cma/clubs/by-ref/example-fc \
-H "X-Cafcan-Operator: cma" \
-H "X-Cafcan-Signature: sha256=${SIG_OF_EMPTY_BODY}" \
-H "X-Cafcan-Delivery: $(uuidgen)"
# → 200 { "cafcan_number": "CL26-4F2K-7MQ", ... }
# → 404 if no CAF CANADA club is linked to that operator_club_id yetSingle club, no developer? A club representative can apply through /membership/apply — CAF CANADA admins review and approve. The operator API is for connected leagues that register their clubs from their own system.
Person Registration
What it does: Mints a permanent CAF CANADA Person ID (PL… for players, CC… for coaches) under a CAF CANADA club, on behalf of users registered in your operator system.
You run a member-management platform (e.g. CMA). When a player or coach signs up in your app, push them to CAF CANADA to get a permanent ID. The ID follows them between clubs forever.
POST/api/v1/operators/{slug}/clubs/{club_cafcan_number}/persons
Request body
| Field | Type | Description |
|---|---|---|
operator_member_idrequired | string | Your internal ID for the person. Used for idempotent retries and reverse lookup. |
kindrequired | "player" | "coach" | Type of person. |
rolerequired | string | “player” for players; “head_coach” / “assistant_coach” / “goalkeeper_coach” / “fitness_coach” / “manager” for coaches. |
legal_namerequired | string | Legal name. Stored verbatim. For a minor, operator responses return only the first name once a parent has signed the season consent, and null before that (hidden on public verify); never their city, address or contact details. |
preferred_name | string | Display name. Falls back to legal_name. |
dobrequired | ISO date | Used to compute is_minor. Responses to you show the birth year only; public verification shows no date of birth. |
contact_email | email | Kept on the person record; its SHA-256 hash (with dob and kind) detects duplicates. |
player_email | email | Optional. The email is how the person gets into the CAF Connect app (CAF CANADA emails it an invitation); for a minor player, contact_email is the parent’s or guardian’s, and a player 14 or older may also have their own here (refused with 422 person/own-email-under-14 for a younger player). |
contact_phone | string | Same handling as email. |
curl -X POST https://api.cafcan.ca/api/v1/operators/cma/clubs/CL26-4F2K-7MQ/persons \
-H "Content-Type: application/json" \
-H "X-Cafcan-Operator: cma" \
-H "X-Cafcan-Signature: sha256=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | awk '{print $NF}')" \
-H "X-Cafcan-Delivery: $(uuidgen)" \
-d '{
"operator_member_id": "cma-internal-12345",
"kind": "player",
"role": "player",
"legal_name": "Sample Player",
"dob": "2012-04-15",
"contact_email": "[email protected]"
}'{
"id": "8e7c9a…",
"cafcan_number": "PL26-K7M3-9QD",
"kind": "player",
"role": "player",
"legal_name": null,
"is_minor": true,
"current_club_cafcan_number": "CL26-4F2K-7MQ",
"current_club_name": "Example FC",
"status": "active",
"external_ref": {
"operator_slug": "cma",
"operator_member_id": "cma-internal-12345"
},
"idempotent": false
}Idempotency — three layers
Same X-Cafcan-Delivery → cached response replayed (with original status code).
Same (operator_slug, operator_member_id) → 200 with idempotent: true. Safe to retry forever, no duplicates.
(email_hash, dob, kind) collision with a different operator_member_id → 409 with the existing CAF number + transfer-flow hint.
You need a write authorization for the club: registering the club through this API gives you one; otherwise CAF CANADA grants it with the club’s agreement. Without it: 403 operator/not-authorized-for-club. A club’s public number alone never lets you act for it.
Companion endpoints
.../clubs/{club_cafcan_number}/personsList the club’s roster (your_operator_member_id surfaced for reconciliation).
.../persons/by-ref/{operator_member_id}Reverse-lookup your internal ID → CAF CANADA ID.
.../persons/{cafcan_number}/profileThe date of birth, email, phone and a 5-minute photo link CAF CANADA holds for a person in one of your clubs (a minor’s: the guardians’ emails, once a parent signed the consent). Read it when you need it rather than keep a copy; each read is logged.
.../persons/{cafcan_number}/profileCorrect contact_email, player_email or contact_phone of a person in a club you may write to (a minor’s contact_email is the primary guardian’s; a new address gets an invitation). The date of birth is set at registration: 422 dob/correction-needed, ask CAF CANADA’s Head Office.
Clubs that don’t use an operator system can register their players directly through the Club Portal "My Roster" tab — no API needed. CAF CANADA issues IDs the same way.
Member Benefits
What it does: CAF CANADA members claim the benefits CAF CANADA offers through you (a registration discount, free entries) on your own website. You send CAF CANADA the member’s number; CAF CANADA checks they may claim and emails them a six-digit code; they type it on your site and you confirm the claim. They never leave your site, and a member number alone never unlocks anything: it’s public. CAF CANADA pays for each claim you confirm.
For each benefit offered through you: who can claim it (any member whose CAF CANADA membership is active, or only clubs and people taking part with you), the amount per claim (dollars, or entries that each have a dollar value), your budget, the claims per member and the dates. CAF CANADA’s Finance approves your budget before members can claim. You receive a setup sheet by email with each value and its name in the API, and again whenever one changes (with a webhook address on file, your server also gets a benefit.updated event). Each claim you confirm is a CAF CANADA grant to the member: CAF CANADA repays you for the claims you confirmed.
Before you start
What to build on your site
Ask for the CAF CANADA number
Show the benefit in the member’s language (title_en or title_fr, and summary.en or summary.fr from the list of benefits) and a field for their CAF CANADA number; pre-fill it when you already know it. Your server then starts the claim.
Ask for the code
Show the answer’s message (message.en or message.fr: “We emailed a 6-digit code to k•••@e•••.org. Enter it here before 3:15 p.m.”). Use one field for the six digits (inputmode="numeric", autocomplete="one-time-code") and offer “Send a new code”, which starts a new claim and replaces the old code.
Apply it
On 200 with redeemed: true, apply amount to the order, show the message (“Your CAF CANADA member benefit is applied: $500.00.”) and keep redemption_id with the order.
Explain a refusal
Every answer, refusals included, carries message.en and message.fr: show the one in the member’s language. Never apply a benefit without a 200 with redeemed: true.
Signing your calls
Every call comes from your server with three headers. The signature covers the time, the method, the address and the body, so a copied request can’t be replayed later or sent elsewhere:
X-Cafcan-Operator: your-slug
X-Cafcan-Delivery: a new UUID for each action (the same one only to retry it)
X-Cafcan-Signature-V2: t=<unix seconds>,v1=sha256=<hex>
<hex> = HMAC-SHA256(your signing secret, t + "." + METHOD + "." + path + "." + body)
path: the address without the domain, e.g. /api/v1/operators/your-slug/benefits/claims
body: the exact bytes you send (empty for GET)Your server’s clock must be within 5 minutes of the real time (set it automatically). The older X-Cafcan-Signature (sha256 of the body alone) is still accepted for now: such answers carry an X-Cafcan-Notice header, and CAF CANADA will tell you before it requires the new one.
<?php
// Keep the secret on your server (an environment variable, or wp-config.php): never in a page or an app.
const CAFCAN_BASE = 'https://api.cafcan.ca';
const CAFCAN_SLUG = 'your-slug'; // from your setup sheet
function cafcan_call(string $method, string $path, ?array $payload = null, ?string $delivery = null): array {
$body = $payload === null ? '' : json_encode($payload);
$urlPath = '/api/v1/operators/' . CAFCAN_SLUG . '/benefits' . $path;
$t = time();
$mac = hash_hmac('sha256', "$t.$method.$urlPath.$body", getenv('CAFCAN_SIGNING_SECRET'));
$ch = curl_init(CAFCAN_BASE . $urlPath);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Cafcan-Operator: ' . CAFCAN_SLUG,
"X-Cafcan-Signature-V2: t=$t,v1=sha256=$mac",
'X-Cafcan-Delivery: ' . ($delivery ?? bin2hex(random_bytes(16))),
],
]);
if ($body !== '') curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$answer = json_decode((string) curl_exec($ch), true) ?: [];
$status = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
return [$status, $answer];
}
// 1. The member gave their number: CAF CANADA emails them a code.
[$status, $claim] = cafcan_call('POST', '/claims', ['offer_id' => $offerId, 'number' => $number, 'reference' => 'order-1042']);
echo htmlspecialchars($claim['message'][$lang] ?? ''); // show it either way
// 2. The member typed the code on your site.
[$status, $use] = cafcan_call('POST', '/claims/' . $claim['claim_id'] . '/confirm', ['code' => $typedCode]);
if ($status === 200 && !empty($use['redeemed'])) {
apply_benefit($order, $use['amount'], $use['redemption_id']);
}The calls
GET/api/v1/operators/{slug}/benefits/offers
The benefits offered through you, each with your part (allocation). Offer a benefit only while allocation.open is true. Read it again before showing benefits: CAF CANADA can pause one, change its dates or raise your budget at any time (you’re emailed when it does).
{
"type": "benefit/offers",
"items": [{
"id": "9b1e…",
"title_en": "Registration discount", "title_fr": "Rabais sur l’inscription",
"description_en": "…", "description_fr": "…",
"eligible_types": ["club"], "participants_only": false,
"unit": "cad", "unit_label_en": "", "unit_label_fr": "", "value_per_use": null,
"limit_per_holder": 1, "period": "offer",
"starts_on": null, "ends_on": "2026-12-31", "status": "active",
"allocation": {
"id": "51c0…", "partner": "Your League", "partner_slug": "your-slug", "edition": null,
"per_claim": 500, "total": 5000, "used": 1000, "remaining": 4000,
"claim_url": "https://your-league.example/benefits", "status": "active", "open": true
},
"summary": {
"en": "Clubs with an active CAF CANADA membership can claim $500.00 on Your League’s website once each, until December 31, 2026. Budget: $5,000.00 (10 claims).",
"fr": "Les clubs dont l’adhésion à CAF CANADA est active peuvent réclamer 500,00 $ sur le site de Your League une fois chacun, jusqu’au 31 décembre 2026. Budget : 5 000,00 $ (10 réclamations)."
}
}]
}POST/api/v1/operators/{slug}/benefits/claims
| Field | Type | Description |
|---|---|---|
offer_idrequired | string | The benefit ID from your setup sheet (or its id in …/benefits/offers). |
numberrequired | string | The member’s CAF CANADA number. |
amount | number | Leave it out to use the amount per claim (most sites). Send it only to apply less: at most allocation.per_claim and allocation.remaining, a whole number for entries. |
reference | string | Your order or registration reference (up to 80 characters), kept with the use. |
{
"type": "benefit/claimed",
"claimed": true,
"claim_id": "4c2a…",
"expires_at": "2026-11-05T20:15:00+00:00",
"email_hint": "k•••@e•••.org",
"offer": { "id": "9b1e…", "title_en": "Registration discount", "title_fr": "Rabais sur l’inscription" },
"amount": 500, "unit": "cad", "value": 500, "edition": null,
"holder": { "type": "club", "number": "CL26-4F2K-7MQ", "display": "Example FC" },
"message": { "en": "We emailed a 6-digit code to k•••@e•••.org. Enter it here before 3:15 p.m.",
"fr": "Nous avons envoyé un code à six chiffres à k•••@e•••.org. Saisissez-le ici avant 15 h 15." }
}value is what the claim is worth in dollars (entries × value_per_use). For a person, holder.display is a first name and initial (“Awa D.”): enough to match your customer, nothing more. In the sandbox the answer also carries sandbox_code, the code production emails.
POST/api/v1/operators/{slug}/benefits/claims/{claim_id}/confirm
Body: { "code": "482913" }, the six digits the member typed.
{
"type": "benefit/redeemed",
"redeemed": true,
"redemption_id": "ffa1…",
"offer": { "id": "9b1e…", "title_en": "Registration discount", "title_fr": "Rabais sur l’inscription" },
"amount": 500, "unit": "cad", "value": 500, "edition": null,
"holder": { "type": "club", "number": "CL26-4F2K-7MQ", "display": "Example FC" },
"remaining": 3500,
"message": { "en": "Your CAF CANADA member benefit is applied: $500.00.",
"fr": "Votre avantage membre CAF CANADA est appliqué : 500,00 $." }
}remaining is what’s left of your budget. CAF CANADA then emails the member that the benefit was used, with a link to report a use they don’t recognise, and books the claim as owed to you.
Every answer
Every answer is JSON with type, title (for you, in English) and message (for the member: en and fr), plus reason, attempts_left or fields when they apply. Show the member message in their language as is, or your own wording.
201 benefit/claimedCAF CANADA emailed the member a six-digit code, valid 15 minutes. Ask for it.200 benefit/redeemedThe benefit is used: apply amount to the order and keep redemption_id with it.403 benefit/not-eligible · not_participantThe benefit is for your participants only, and the member doesn’t take part with you (or didn’t by the edition’s end).403 benefit/not-eligible · inactiveThe membership isn’t active today.403 benefit/not-eligible · typeThe benefit isn’t for this kind of member.403 benefit/not-eligible · limitThe member has used all their claims with you.403 benefit/not-eligible · exhausted, 409 benefit/total-reachedYour budget for this benefit is used up (total-reached: it ran out between the claim and its confirmation).403 benefit/not-eligible · closedThe benefit or your part of it is paused or ended, today is outside its dates, or its budget isn’t approved yet (allocation.open is false).403 benefit/not-eligible · unknown_numberNo member has this number.409 benefit/no-emailCAF CANADA has no email on file for this number, so no code can be sent.429 benefit/too-many-claimsThree codes were already sent today for this number and benefit through you.422 benefit/amount · over_limit, over_total, whole_uses, amount_requiredYour amount is over the amount per claim or what’s left of your budget, or isn’t a whole number of entries. Send no amount to use the amount per claim.422 benefit/code-wrongWrong code; attempts_left tells how many tries remain. Five wrong codes lock the claim.410 benefit/claim-expired, claim-replaced, claim-lockedThe code is more than 15 minutes old, a newer claim replaced it, or five wrong codes locked it: offer “Send a new code”.409 benefit/claim-usedAlready confirmed: look up the redemption_id you stored.404 benefit/offer-unknown, benefit/claim-unknownNot a benefit offered through you, or not your claim: check the offer_id from your setup sheet.422 benefit/request-invalid, 400 benefit/request-emptyA field is missing or wrong: fields lists each one ({ field, problem }).401 benefit/signature-invalidThe signature doesn’t match: check your signing secret, and that you sign exactly the bytes you send.401 benefit/signature-expiredt is more than 5 minutes from CAF CANADA’s clock: set your server’s clock automatically (NTP).401 benefit/signature-upgrade-requiredCAF CANADA now requires X-Cafcan-Signature-V2 from you.401 benefit/signature-replayedThis signature was already used with another X-Cafcan-Delivery: sign each request afresh. A retry keeps its X-Cafcan-Delivery.400 benefit/delivery-required, delivery-invalidSend X-Cafcan-Delivery (up to 64 characters, a new UUID per action) with X-Cafcan-Signature-V2.403 benefit/address-not-allowedYour server’s address isn’t on the list CAF CANADA keeps for you: send CAF CANADA your servers’ addresses.404 benefit/partner-unknown, 403 partner-inactive, 400 partner-mismatchThe slug in the address isn’t yours (use the one in your setup sheet), your operator account is paused, or X-Cafcan-Operator doesn’t match the address.429 benefit/too-many-unknown, 5xxToo many unknown codes from your server, or CAF CANADA is unavailable. Apply nothing; retry later with the same X-Cafcan-Delivery.Rules for a safe integration
Try it in the sandbox
A sandbox comes with two benefits offered through your temporary operator, their budgets approved: a registration discount ($150 per claim, $600 budget, one claim per member) and free entries worth $25 each (1 per claim, 10 in the budget, two claims per member). Claim with a seeded club’s number: the answer carries sandbox_code instead of an email, and nothing is emailed or booked. Try a wrong code, a new code, a seeded player (no email on file: 409), a signature with a wrong secret, and the budget running out. Everything is deleted after 24 hours.
Before going live
In the CAF Connect app (once it’s live)
/api/v1/operators/{slug}/benefits/redeemThe member shows a QR code from the app (valid 10 minutes). Scan it and send its text as code, with reference (and amount only to apply less), and optionally dry_run: true to check it without using it. Answers as above, with benefit/code-… types.
Write to [email protected]. For a benefit, your budget, a repayment or a member’s report, write to [email protected].
Person Lifecycle Webhooks
What it does: CAF CANADA POSTs an event to your outbound_webhook_url whenever a player or coach you registered changes state. No polling needed.
Events
person.transferredFires when a transfer to another club completes (the releasing club approves, or 14 days pass; immediate when the person has no club).person.releasedFires when their current club releases them (no target club yet).person.turned_18Fires on their 18th birthday: is_minor is now false and no parental consent is needed.person.consent_changedA parent signed a minor’s season consent (consent_status "signed", signed_at). Also sent for minors already signed when a club is linked to you.person.suspendedEmitted when CAF CANADA suspends a person.person.reinstatedEmitted when a person is set back to active.person.retiredEmitted when a person is marked retired.member.renumberedA number you hold (yours, a club’s or a person’s) was reissued in the current format: subject has old_number, new_number and type. Sent once, for numbers issued before 11 November 2026; calls with the former number keep working.benefit.updatedA member benefit offered through you opened, changed, paused, ended or ran out of budget, or CAF CANADA sent you its setup. subject is the benefit as GET …/benefits/offers lists it, with change (opened, changed, paused, ended, used_up, sheet). See Member Benefits.Payload — what CAF CANADA POSTs to you
{
"event": "person.transferred",
"delivery_id": "5c0e…",
"occurred_at": "2026-04-29T03:14:00Z",
"subject": {
"cafcan_number": "PL26-K7M3-9QD",
"kind": "player",
"role": "player",
"is_minor": true,
"status": "active",
"current_club_cafcan_number": "CL26-H8RW-3NJ",
"current_club_name": "Example United",
"your_operator_member_id": "cma-internal-12345",
"from_club_cafcan_number": "CL26-4F2K-7MQ",
"to_club_cafcan_number": "CL26-H8RW-3NJ",
"to_club_name": "Example United",
"auto_released": false,
"transfer_id": "ab7c9e2f0a4d1b6e9c2d3a51"
}
}Verifying the signature on YOUR receiver
# FastAPI receiver — drop into your app
import hmac, hashlib
from fastapi import APIRouter, Request, HTTPException
router = APIRouter()
WEBHOOK_SECRET = os.environ["CAFCAN_WEBHOOK_SECRET"]
@router.post("/webhooks/cafcan")
async def cafcan_webhook(request: Request):
body = await request.body()
sig = request.headers.get("X-Cafcan-Signature", "")
if not sig.startswith("sha256="):
raise HTTPException(401, "bad signature header")
expected = hmac.new(WEBHOOK_SECRET.encode(), body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(sig.split("=", 1)[1], expected):
raise HTTPException(401, "bad signature")
delivery_id = request.headers["X-Cafcan-Delivery"]
if already_processed(delivery_id): # idempotency on YOUR side
return {"ok": True}
event = await request.json()
handle_event(event) # update your roster
mark_processed(delivery_id)
return {"ok": True} # respond within 10 sPrivacy guarantees
CAF CANADA makes up to 5 attempts on a connection failure, a timeout (10 s) or a non-2xx response, waiting about 30 s, 2 min, 8 min and 32 min between them, then marks the delivery failed. Same delivery_id on every attempt — your idempotency key works across retries.
Self-serve Config
What it does: Update your outbound_webhook_url and read your operator config — without emailing CAF CANADA.
PUT/api/v1/operators/{slug}/config/outbound-webhook-url
BODY='{"outbound_webhook_url":"https://op-new.example.com/webhook"}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | awk '{print $NF}')
curl -X PUT https://api.cafcan.ca/api/v1/operators/cma/config/outbound-webhook-url \
-H "Content-Type: application/json" \
-H "X-Cafcan-Operator: cma" \
-H "X-Cafcan-Signature: sha256=$SIG" \
-H "X-Cafcan-Delivery: $(uuidgen)" \
-d "$BODY"GET/api/v1/operators/{slug}/config
Returns slug, name, status, base_url, outbound_webhook_url, masked api_key + webhook_secret, last sync and connection-test results. Shared secrets returned masked-only — to rotate the webhook secret, ask Head Office; the old one keeps working for 24 hours.
localhost / 127.0.0.1 allowed for dev only.
Verified-Member Badge (Embed widget)
What it does: Renders a live "Verified by CAF CANADA" badge on any website. Click → opens the public verifier. Re-checks every 10 minutes by default (data-refresh) so suspensions and expiries show without redeploying. Labels are in English.
Drop-in HTML
<script src="https://api.cafcan.ca/api/embed/member-badge.js"
data-id="PL26-K7M3-9QD"
data-variant="badge" // "badge" or "card"
data-theme="light" // "light" | "dark" | "brand" | "brand-dark" | "minimal"
data-size="md" // "sm" | "md" | "lg"
data-refresh="600" // seconds, 0 to disable
async></script>→ Open the visual configurator to preview themes, copy the snippet, and pick the variant.
Anyone managing a club website can paste this snippet into their footer. No backend, no API key, no developer required.
Public Read APIs
What it does: Read-only competition data — standings, fixtures, top scorers, discipline, brackets, awards, team pages, match pages and the live centre. The CAF CANADA competition pages read the same endpoints.
/api/v1/public/competitions/{op}/{ext}/standings?lang=en/api/v1/public/competitions/{op}/{ext}/fixtures?lang=en/api/v1/public/competitions/{op}/{ext}/top-scorers/api/v1/public/competitions/{op}/{ext}/disciplinary/api/v1/public/competitions/{op}/{ext}/bracket?lang=en/api/v1/public/competitions/{op}/{ext}/awards/api/v1/public/competitions/{op}/{ext}/calendar.ics/api/v1/public/teams/{op}/{team_id}?lang=en/api/v1/public/matches/{op}/{match_id}?lang=en/api/v1/public/live?lang=enAnonymous calls are limited to 60 a minute per IP; an approved key raises the limit. Responses carry the time the data was captured (as_of). The lang query parameter accepts en or fr and returns French names and titles wherever the operator supplies them.
curl "https://api.cafcan.ca/api/v1/public/competitions/cma/caf-prem-2026/standings?lang=fr"Errors & Status Codes
{
"detail": {
"type": "person/duplicate",
"title": "Person already registered",
"message": "Use the transfer flow to claim them.",
"cafcan_number": "PL26-X3B8-NRW",
"current_club_cafcan_number": "CL26-H8RW-3NJ"
}
}Rate Limits
| API | Limit | Notes |
|---|---|---|
| Public verify | 60 / min / IP | Sliding one-minute window. Returns 429 with Retry-After when exceeded. |
| Public read APIs | 60 / min / IP | Standings, fixtures, etc. With X-CAFCAN-Key: 600 / min (free key) or 6,000 / min (partner key). X-RateLimit-* headers show your quota. |
| Operator API | no fixed limit | Every call must be signed; a repeated X-Cafcan-Delivery is answered from the cache. |
| Embed widget scripts | cached 1–5 min | Member badge script 5 min, competition widget script 1 min (browser + CDN). |
