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 client 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.
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.
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.
Once a customer confirms their checkout (e.g their loan), you need to complete the purchase on Affirm Rails. This is can be achieved by making a server-side API request to our charge endpoint.
Updated about 1 year ago