Welcome to our API reference! We're happy that you've decided to partner with us and explore our REST APIs. To get started, you'll first want to log into the Merchant Dashboard, set up your development environment, and get your API keys for the sandbox and live environments.

Making REST API calls

To make a REST API call, include the URL associated with the sandbox or live environment"

  • Sandbox: https://sandbox.affirm.com
  • Live: https://api.affirm.com

When making a call, include your private or public api keys.

Sample request

curl https://api.affirm.com/api/v2/charges/
     -X POST
     -u "<public_api_key>:<private_api_key>"
     -H "Content-Type: application/json"
     -d '{"checkout_token": "<checkout_token>","order_id": "JKLM4321"}'

New to Affirm?

If this is your first time here, you may want to take a look at our quickstart guide to get you up and running.

ūüďė

Plugins & extensions

If code scares you a little bit, don't worry about it! Use our Platform Integrations plugins to get started with Affirm with little to no code required.