Express Checkout API
Interested in offering Affirm Express Checkout?
Reach out to your Affirm Account Manager to confirm availability and for next steps on building your APIs.
Overview
Affirm Express Checkout relies on two merchant-hosted API endpoints to dynamically complete checkout within the Affirm experience:
These endpoints enable Affirm to collect customer shipping details, present valid shipping methods, calculate taxes and totals, and return finalized order details to the merchant after loan confirmation.
By offloading address collection and checkout calculation into Affirm’s hosted flow, merchants can reduce front-end checkout complexity while retaining full control over shipping logic, pricing, and tax calculations on the backend.
Shipping Options API
The Shipping Options API returns all valid shipping methods for a given cart and shipping address.
Body
Field | Type | Description |
|---|---|---|
items required | object | The items in the user’s cart. See Items object for details. |
shipping required | object | The shipping details. See ShippingBilling object for details. |
order_id | string | Merchant identifier to reference the current checkout session. Note the merchant is still expected to give an |
currency required | string | Three-letter ISO currency code in uppercase |
Items object
Field | Type | Description |
|---|---|---|
display_name required | string | The display name of the product/item. |
sku required | string | The product/item SKU. |
unit_price required | integer | The item price amount in USD or CAD cents. |
qty | integer | The item quantity. |
item_image_url | string | The item’s product image URL. |
item_url | string | The item’s product description page URL. |
categories | array | The categories that apply to the product/item, and the hierarchy of those category definitions. Each list in the array contains one or more comma-separated strings, with the first string being the highest-level (widest) category. |
ShippingBilling object
Field | Type | Description |
|---|---|---|
name | object | The customer's name. See Name object for details. |
address required | object | The user's address. See Address object for details. |
phoneNumber | string | The customer's phone number. |
string | The customer's email address. |
Name object
| Field | Type | Description |
|---|---|---|
| first | string | Customer’s first name. Can contain multiple words (for middle names). |
| last | string | Customer's last name. |
| full | string | Note: This field is required if the first and last names are missing. The string must contain at least two words. |
Address object
Field | Type | Description |
|---|---|---|
line1 required | string | Address line 1 (e.g., street, PO Box, or company name). |
line2 | string | Address line 2 (e.g., apartment, suite, unit, or building). |
city required | string | City, district, suburb, town, or village. |
state required | string | State, county, province, or region. |
zipcode required | string | ZIP or postal code. |
country required | string | Two-letter country code (ISO 3166-1 alpha-2). |
Checkout Totals API
The Checkout Totals API calculates the final cart total after the customer selects a shipping option.
Body
Field | Type | Description |
|---|---|---|
items required | object | The items in the user’s cart. See Items object for details. |
shipping required | object | The shipping details. See ShippingBilling object for details. |
selected_shipping_option required | object | The chosen shipping option. See ShippingOption object for details. |
order_id | string | Merchant identifier to reference the current checkout session. Note the merchant is still expected to give an |
currency required | string | Three-letter ISO currency code in uppercase |
Items object
Field | Type | Description |
|---|---|---|
display_name required | string | The display name of the product/item. |
sku required | string | The product/item SKU. |
unit_price required | integer | The item price amount in USD or CAD cents. |
qty | integer | The item quantity. |
item_image_url | string | The item’s product image URL. |
item_url | string | The item’s product description page URL. |
categories | array | The categories that apply to the product/item, and the hierarchy of those category definitions. Each list in the array contains one or more comma-separated strings, with the first string being the highest-level (widest) category. |
ShippingBilling object
Field | Type | Description |
|---|---|---|
name | object | The customer's name. See Name object for details. |
address required | object | The user's address. See Address object for details. |
phoneNumber | string | The customer's phone number. |
string | The customer's email address. |
ShippingOption object
Field | Type | Description |
|---|---|---|
shipping_id required | string | The identifier of the shipping option. |
shipping_type required | string | The type of shipping method. |
shipping_amount required | integer | The item price amount in USD or CAD cents. |
Name object
| Field | Type | Description |
|---|---|---|
| first | string | Customer’s first name. Can contain multiple words (for middle names). |
| last | string | Customer's last name. |
| full | string | Note: This field is required if the first and last names are missing. The string must contain at least two words. |
Address object
Field | Type | Description |
|---|---|---|
line1 required | string | Address line 1 (e.g., street, PO Box, or company name). |
line2 | string | Address line 2 (e.g., apartment, suite, unit, or building). |
city required | string | City, district, suburb, town, or village. |
state required | string | State, county, province, or region. |
zipcode required | string | ZIP or postal code. |
country required | string | Two-letter country code (ISO 3166-1 alpha-2). |
Updated about 9 hours ago