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://api.global.sandbox.affirm.com
- Live:
https://api.global.affirm.com
Lorsque vous passez un appel, incluez vos clés API privées ou publiques.
Exemple de demande
curl https://api.global.affirm.com/api/v1/transactions
-X POST
-u "{public_api_key}:{private_api_key}"
-H "Content-Type: application/json"
-H "country_code: CAN"
-d '{"transaction_id": "{checkout_token}","order_id": "{order_id}"}'
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
Si le code vous fait un peu peur, ne vous inquiétez pas ! Utilisez nos plugins Platform Integrations pour démarrer avec Affirm avec peu ou pas de code requis.