Fiserv
Integrate Affirm with Fiserv using Hosted Checkout or Direct API to increase AOV, reduce fraud risk, and deliver a seamless BNPL checkout.
Overview
Fiserv supports Affirm as a Buy Now, Pay Later (BNPL) payment method across its online and mobile checkout solutions utilizing their enterprise gateway, CommerceHub. Merchants can enable Affirm using either Hosted Checkout (SDK, Hosted Pages, Hosted Components) or Direct API integrations.
How Affirm works
Customer experience
- Customer selects Affirm as the payment method during checkout.
- Merchant initiates a payment request through CommerceHub (Hosted Checkout or Checkouts Orders API).
- Customer is redirected to Affirm to log in, review the loan, and approve.
- Customer is redirected back to the merchant’s site with the transaction decision.
- Merchant captures the payment if required (authorization → capture).
- CommerceHub processes and returns final transaction details to the merchant.
Who Affirm pays
Affirm pays the merchant after approval.
Fraud, repayment, and risk
- Affirm owns fraud risk and consumer repayment risk for all approved transactions.
- Merchants receive guaranteed funds once the transaction is captured.
Integration steps
CommerceHub offers three primary integration methods for enabling Affirm:
- Hosted Checkout SDK
- Hosted pages and hosted components
- Direct API (full control integration)
1. Hosted Checkout SDK
Ideal for minimizing development lift. CommerceHub manages data collection, tokenization, and transmission to Affirm.
Steps
- Whitelist domains used in production. (Localhost testing allowed.)
- Start PaymentSession by submitting a server-side Security Credentials API request (returns:
accessToken,sessionId,publicKey,clientEncryptionAlgorithm). - Initialize the SDK using
window.fiserv.init. - Initialize the Affirm component with
window.fiserv.components.affirm(). - Submit a Checkouts Orders request using values returned via the
onApprovehook (orderId,transactionId).
After checkout
Use Checkouts Orders API to authorize, capture, cancel, refund, or update orders.
Fiserv Hosted Checkout SDK documentation
For more details on this integration, please review the Affirm Hosted Checkout SDK integration guide on Fiserv’s developer site.
2. Hosted pages and hosted components
These options allow merchants to enable Affirm without building custom UI.
Hosted pages
Customers are redirected to a secure, branded CommerceHub-hosted checkout page with Affirm enabled.
Steps
- Access Checkout Configurator.
- Create a Checkout Page.
- Customize layout & payment fields.
- Configure appearance.
- Preview & test.
- Promote to production.
Hosted components
Embeddable iFrame/WebView/Modal components that support Affirm as a payment option.
Both Hosted Pages and Hosted Components use the same Checkout Configurator for design and layout.
Fiserv Hosted pages and hosted components documentation
For more details on this integration, please review the Creating and managing Checkout Pages on Fiserv’s developer site.
3. Direct API (full control integration)
Ideal for merchants wanting full backend control over their Affirm checkout flow.
Steps
- Create a checkout order using the Checkouts Orders API.
- Redirect the customer to the actions.url returned in the API response.
- Submit a payment request:
- Can be sale or authorization.
- If authorization, follow with a capture request.
Additional actions available
- Update checkout order
- Cancel order
- Refund captured order
- Inquiry request to retrieve transaction history
Fiserv Direct API documentation
For more details on this integration, please review the Affirm Direct API integration guide on Fiserv’s developer site.
Next steps
Please reach out to your Fiserv Relationship Manager for more information on how to get started with Affirm.
Additional resources
CommerceHub developer documentation:
- CommerceHub Affirm overview
- Affirm Hosted Checkout SDK integration guide
- Creating and managing Checkout Pages
- Affirm Direct API integration guide
Updated about 4 hours ago
USA
Canada