affirm · AsyncAPI Specification

Affirm Webhooks

Version 1.0

Affirm uses webhooks to notify merchant endpoints in real time when events occur during the customer checkout and prequalification flows. Webhooks are available to Key and Enterprise merchants. Affirm sends two types of webhooks: checkout events delivered as application/x-www-form-urlencoded and prequalification events delivered as application/json. Checkout events fire as customers move through the Affirm financing flow, including opened, approved, not_approved, and confirmed status transitions. Prequalification events fire during the Affirm prequal flow, indicating approval decisions and expiry. Each webhook request includes an X-Affirm-Signature header containing a Base64-encoded HMAC signature that merchants can use to verify the request originated from Affirm. Merchant webhook endpoints must support TLS 1.2 and respond with a 2xx status code to acknowledge receipt. Affirm does not retry failed webhook deliveries.

View Spec View on GitHub AsyncAPIWebhooksEvents

Channels

/webhooks/checkout
publish receiveCheckoutEvent
Receive a checkout event
Channel for Affirm checkout lifecycle events. Affirm sends POST requests with content-type application/x-www-form-urlencoded to the merchant's configured webhook endpoint as customers progress through the checkout flow.
/webhooks/prequal
publish receivePrequalEvent
Receive a prequalification event
Channel for Affirm prequalification events. Affirm sends POST requests with content-type application/json to the merchant's configured webhook endpoint as customers complete or expire from the prequalification flow.

Messages

CheckoutOpenedEvent
Checkout Opened
Fired when a customer opens the Affirm checkout flow.
CheckoutApprovedEvent
Checkout Approved
Fired when a customer receives a positive credit decision from Affirm.
CheckoutNotApprovedEvent
Checkout Not Approved
Fired when a customer receives a negative credit decision from Affirm.
CheckoutConfirmedEvent
Checkout Confirmed
Fired when a customer confirms their financing and is redirected back to the merchant.
PrequalDecisionEvent
Prequalification Decision
Fired when a customer receives an approval decision during prequalification.
PrequalExpiryEvent
Prequalification Expiry
Fired when a customer's prequalification expires.

Servers

https
merchantWebhookEndpoint {webhookUrl}
The merchant-configured HTTPS endpoint that receives webhook event notifications from Affirm. Must support TLS 1.2 and respond with a 2xx HTTP status to acknowledge receipt.