For Agents
Run Affirm buy-now-pay-later checkout, capture and refund transactions, and respond to disputes across 23 REST endpoints.
Get started with Affirm API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"create an affirm checkout for a cart"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Affirm API API.
Create and update checkouts to offer Affirm BNPL at the point of sale
Authorize, capture, refund, and void transactions on Affirm financing
List and read transactions and transaction events for reconciliation
Read settlement events to reconcile merchant payouts
Manage the dispute lifecycle including closing and submitting evidence
GET STARTED
Use for: Create an Affirm checkout for a $499 cart, Capture a previously authorised Affirm transaction, Issue a refund on an Affirm transaction, List recent settlement events for reconciliation
Not supported: Does not handle card-network processing, accounting reconciliation outside of settlement events, or fraud underwriting — use for Affirm BNPL checkout, transaction lifecycle, and dispute workflows only.
Jentic publishes the only available OpenAPI specification for Affirm API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for Affirm API, keeping it validated and agent-ready. Affirm is a buy-now-pay-later (BNPL) platform that lets merchants offer instalment financing at checkout. Its v1 API exposes 23 endpoints covering checkouts (store, direct, update, resend), card-based virtual card flows, transactions (authorize, capture, refund, void), settlement events, dispute lifecycle including evidence upload, and supporting file storage. Authentication uses HTTP basic auth with the public_api_key as the username and the private_api_key as the password.
Upload and retrieve files used as dispute evidence
Issue and finalize Affirm virtual cards via the /cards endpoints
Patterns agents use Affirm API API for, with concrete tasks.
★ Buy-Now-Pay-Later Checkout Integration
Add Affirm financing as a payment method at checkout. POST /checkout/store creates a hosted checkout the customer completes on Affirm, POST /checkout/direct supports a direct flow, /checkout/{checkout_id}/update modifies the cart before the customer confirms, and /checkout/resend re-sends the checkout link. Once the customer authorises, POST /transactions creates the transaction record on the merchant side.
Call POST /checkout/store with cart total $499, currency USD, and items array, then return the checkout URL for the customer
Transaction Lifecycle and Reconciliation
Manage the post-authorisation transaction lifecycle. POST /transactions/{transaction_id}/capture moves an authorisation to a captured charge, /void cancels an authorisation that won't be captured, and /refund issues a partial or full refund. GET /transactions/events streams every state change and GET /settlements/events lets finance reconcile Affirm payouts to merchant transactions.
Call POST /transactions/{transaction_id}/capture with the captured amount, then GET /settlements/events to find when the funds settle
Dispute Handling and Evidence Submission
Respond to chargebacks and disputes through the API. GET /disputes lists open disputes, /disputes/{dispute_id} returns the detail, /disputes/{dispute_id}/evidence accepts evidence files (uploaded first via POST /files), and /disputes/{dispute_id}/close closes the dispute. Useful for ops teams who manage many disputes per week and want to push the workflow into a queue tool.
Call POST /files with the evidence document, then POST /disputes/{dispute_id}/evidence with the returned file id and a written response
AI Agent Affirm Operations
Let an AI agent answer 'has this Affirm transaction settled?' or 'refund this order' inside an internal Slack or admin tool. Through Jentic, the agent searches by intent, loads the matching Affirm schema, and executes with the basic-auth keys isolated in the vault. Useful for support and finance teams that want self-service access without building a bespoke admin panel.
Search Jentic for 'refund an affirm transaction', load /transactions/{transaction_id}/refund schema, and execute with the transaction id and refund amount
23 endpoints — jentic publishes the only available openapi specification for affirm api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/checkout/store
Create a hosted Affirm checkout
/checkout/direct
Create a direct Affirm checkout
/transactions
Create a transaction from an authorised checkout
/transactions/{transaction_id}/capture
Capture an authorised transaction
/transactions/{transaction_id}/refund
Refund a captured transaction
/transactions/{transaction_id}/void
Void an unauthorised or pre-capture transaction
/disputes
List open disputes
/disputes/{dispute_id}/evidence
Submit evidence for a dispute
/checkout/store
Create a hosted Affirm checkout
/checkout/direct
Create a direct Affirm checkout
/transactions
Create a transaction from an authorised checkout
/transactions/{transaction_id}/capture
Capture an authorised transaction
/transactions/{transaction_id}/refund
Refund a captured transaction
Three things that make agents converge on Jentic-routed access.
Credential isolation
Your Affirm public_api_key and private_api_key are stored encrypted in the Jentic vault and applied as basic-auth credentials at execution time. Agents never see the raw private key in their context.
Intent-based discovery
Agents search by intent (e.g. 'refund an affirm transaction') and Jentic returns the matching v1 operation with its path and body schema, so the agent picks /transactions/{transaction_id}/refund over /transactions/{transaction_id}/void correctly.
Time to first call
Direct Affirm integration: 2-5 days to wire basic auth, sandbox vs production routing, capture/void/refund flows, and dispute evidence upload. Through Jentic: under 2 hours — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Afterpay
BNPL provider with broad merchant network across AU, US, UK, and EU
Choose Afterpay when targeting markets where it has stronger consumer adoption; choose Affirm for US-led BNPL with longer-term financing options
Zip
Pay-in-4 BNPL provider focused on retail and travel
Pick Zip for pay-in-4 with strong retail coverage; pick Affirm for longer instalment plans and dispute workflows
Stripe
General payment processor that also surfaces Affirm as a payment method
Pick Stripe to consolidate cards, wallets, and BNPL through one processor; pick the Affirm API directly when you need full access to checkout, settlement, and dispute lifecycle
Braintree
PayPal-owned processor with PayPal Pay Later as its BNPL option
Pick Braintree for PayPal-native checkout flows; pick Affirm for direct merchant control of BNPL operations
Specific to using Affirm API API through Jentic.
Why is there no official OpenAPI spec for the Affirm API?
Affirm publishes developer documentation but does not distribute a downloadable OpenAPI 3 specification. Jentic generates and maintains this spec so that AI agents and developers can call Affirm API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Affirm API use?
Affirm uses HTTP basic authentication with the public_api_key as the username and the private_api_key as the password, base64-encoded in the Authorization header. Through Jentic the key pair is stored in the vault and applied at execution time.
Does Affirm have a sandbox environment?
Yes. The spec lists two servers — production at https://api.affirm.com/api/v1 and sandbox at https://sandbox.affirm.com/api/v1. Use the sandbox base URL with sandbox keys for integration testing before going live.
How do I capture and refund an Affirm transaction?
After the customer completes a checkout, POST /transactions creates the transaction; POST /transactions/{transaction_id}/capture captures the authorised amount, /refund issues a refund, and /void cancels an authorisation that has not been captured. Each action returns the updated transaction state.
What are the rate limits for the Affirm API?
Affirm applies merchant-tier rate limits but does not declare specific numbers in the spec. HTTP 429 responses indicate the limit has been reached; Jentic surfaces them verbatim so agents can implement back-off.
How do I create a checkout through Jentic?
Run pip install jentic, search Jentic with 'create an affirm checkout for a cart', load the /checkout/store schema, and execute with the cart total, currency, items, and merchant URLs. Jentic injects the basic-auth keys at execution time.
/transactions/{transaction_id}/void
Void an unauthorised or pre-capture transaction
/disputes
List open disputes
/disputes/{dispute_id}/evidence
Submit evidence for a dispute