Quickstart Guide for Developers
Get started with Affirm's API integration in just three steps. Learn how to retrieve your API keys, install a client, and make a test request.
Overview
Integrating Affirm into your app or website can begin as soon as you create an Affirm account, requiring only three steps:
- Retrieve your API keys so Affirm can authenticate your integration's API requests.
- Install a clientpayments/docs/transactions-web so your integration can interact with the Affirm API.
- Make a test API request to confirm everything is up and running.
Not a developer?
Use a prebuilt solution created by one of our partners. Little to no code required.
1. Retrieve your API keys
Your API keys are available from your dashboard. To prevent errors, include the appropriate key when making an API request.
Every account is provided with two pairs of keys per environment:
- One pair for sandbox, and
- One pair for running production transactions.
All API requests exist in either a sandbox or production environment, and objects in one environment can’t be affected by objects in the other environment.
2. Install a client
To support Affirm as a payment option in your application, we provide different client and integration mechanisms for web and mobile. Install a client to create the checkout experience:
3. Make a test API request
When a customer confirms their checkout (e.g., their loan), you must complete the purchase on Affirm Rails. Make a server-side API request to our transaction endpoint.
Updated 6 days ago