Affirm
Quick Start
- Sign up at affirm.com and obtain API credentials
- Create a terminal in the Admin Console with the parameters below
- Start processing — the adapter is pre-built and ready to use
Overview
Affirm — Installment purchase financing
| Provider ID | affirm |
| Category | Buy Now, Pay Later |
| Website | affirm.com |
Supported operations: Create Checkout Get Transaction Refund
Authentication
Method: Basic Auth (public_key:private_key) Header format:
Authorization: Basic {base64(public_key:private_key)}
Configuration
Required Parameters
| Parameter | Description |
|---|---|
base_url | Base API URL |
public_key | Public Key |
private_key | Private Key |
Payment Flow
- Creation checkout → redirect_url
- Redirect on Affirm
- User selects a plan installment plan
- Check creditworthiness
- Confirmation
- Webhook/redirect → status check
Status Mapping
| Provider Status | 4pay Status | Description |
|---|---|---|
captured | charged | |
partially_captured | charged | |
authorized | charging | |
confirmed | charging | |
created | charging | |
declined | failed | |
canceled | failed | |
voided | failed | |
auth_expired | failed | |
event: capture | charged | |
event: confirm | charged | |
event: refund | refunded | |
captured | charged | |
partially_captured | charged | |
authorized/confirmed/created | charging | |
declined/canceled/voided/auth_expired | failed | |
refunded/partially_refunded | refunded |