Get up and running quickly to start developing your Affirm integration.

Integrating Affirm into your app or website can begin as soon as you create an Affirm account, requiring only three steps:

  1. Retrieve your API keys so Affirm can authenticate your integration's API requests.
  2. Install a client so your integration can interact with the Affirm API.
  3. 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.

Step 1: Retrieve your API keys

Your API keys are available from your dashboard. Make sure to include the appropriate key when making an API request or Affirm will return an error.

Every account is provided with two pairs of keys per environment: one for sandbox and one for running production transactions. All API requests exist in either a sandbox or production environment, and objects in one environment cannot be manipulated by objects in the other.

Step 2: Install a client

We provide different client and integration mechanisms for web and mobile to support Affirm as a payment option in your application. This will create your checkout experience.

Step 3: Make a test API request

Once a customer confirms their checkout (e.g., their loan), you need to complete the purchase on Affirm Rails. This can be achieved by making a server-side API request to our transaction endpoint.