Accept Affirm payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.
When making an Affirm payment, you also need to:
- Provide details about the items being purchased when making a payment request.
- Capture the payment after the transaction has been fulfilled. When the payment has been captured, Affirm starts the repayment period for the shopper.
Requirements
Requirement | Description |
---|---|
Integration type | Make sure that you have built an API-only integration. |
Setup steps | Before you begin, add Affirm in your test Customer Area. |
Build your payment form for Affirm
To make an Affirm payment, you need to collect the following shopper details:
Name | Description |
---|---|
firstName |
Shopper's first name. |
lastName |
Shopper's last name. |
telephoneNumber |
Shopper's phone number. |
shopperEmail |
Shopper's email address. |
billingAddress |
The address where to send the invoice. |
deliveryAddress |
The address where the purchased goods should be delivered. |
We provide an Affirm logo which you can use in your payment form. For more information, refer to Downloading logos.
Make a payment
From your server, make a /payments request, specifying:
Parameter name | Required | Description |
---|---|---|
paymentMethod.type |
Set to affirm. | |
shopperName.firstName |
Shopper's first name. | |
shopperName.lastName |
Shopper's last name. | |
telephoneNumber |
Shopper's telephone number. | |
shopperEmail |
Shopper's email address. | |
billingAddress |
The address where to send the invoice. | |
deliveryAddress |
The address where the purchased goods should be delivered. If blank or missing, billingAddress is used by default. |
|
lineItems |
Price and product information about the purchased items. This is optional, but we recommend to include this data to improve approval rates. |