When making API calls to Affirm, you will need to authenticate requests by using your API Keys. You can view your API keys in the Merchant Portal.
curl https://api.affirm.com/api/v1/transactions/
-X POST
-u {public_api_key}:{private_api_key}
-H "Content-Type: application/json"
Sandbox mode and production mode will have a different set of keys and endpoints.
Your API keys grant you access to Affirm ecosystems, so be sure to keep them protected.
When making API calls to Affirm, you'll need to include your API keys . You can view and manage your API keys in the Merchant Portal.
HTTPS
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.