Integrating Affirm
Auth: API key · Partner program: not required · Setup time: about 10 minutes · Last verified: 2026-05-15
BNPL in the US — point-of-sale loans up to 36 months. Two API tiers (sandbox + live) with distinct keys.
Auth model
Section titled “Auth model”
rawis opt-in. The upstream payload is withheld unless an operator enablesdata_store.raw_payload.paymentsin Admin → Settings → Data store. It is off by default because across the payments adapters it declares bank account numbers, IBANs and card numbers the canonical schema does not expose.
HTTP Basic from public_api_key:private_api_key. Generate both keys under Settings → API keys in the Affirm merchant dashboard.
Required adapter quirks
Section titled “Required adapter quirks”- Adaptive Checkout returns a token, not a charge. The customer-facing flow yields a
checkout_tokenclient-side; the server authorises the loan withPOST /api/v1/chargesand then captures separately. OurcreateChargecovers the authorise step; callcaptureCharge(or let auto-capture handle it) to settle. - Charge.amount = loan principal. Installment schedule, APR, and lender disclosures live on
Charge.rawonly. Charge.failureCodecarries the loan-decline reason. Use it to surface the actual decline cause to the customer (not the raw 4xx).
Webhooks
Section titled “Webhooks”Configure in Settings → Notifications. Affirm signs with HMAC-SHA-256 keyed with the shared secret; hex-encoded in X-Affirm-Signature.
References
Section titled “References”- API reference (introduction): https://docs.affirm.com/developers/reference/introduction
- Developer docs root: https://docs.affirm.com/developers
opensteward.dev ·Plans and free license ·Terms ·Privacy ·support@opensteward.dev
© 2026 Falco Consulting AB. Built from open-steward/opensteward@a3961d8. This site sets no cookies, runs no analytics and loads nothing from other sites, except platform logos from Brandfetch on the Platforms page.