API Keys can be confusing - while it’s an essential part of getting Affirm to work, common issues can happen if used incorrectly in both Test and Live modes. We’ll cover these potential issues and the steps you can take to remediate them. If this article can’t resolve your problem, contact our Merchant Care team using the Business Resource Hub help widget.
Every Affirm merchant account is provided with two API key pairs; one pair is for configuration and testing within a Sandbox (test) environment, and the other pair is for facilitating live transactions in your Production (live) environment.
Make sure you are getting the API keys from the right environment:
- Check the API keys page to see if the keys match with what you’ve entered in your Platform Integration or Direct API Integration. There are rare instances where your API keys may have been updated or have changed.
Note: We recommend copying and pasting your API keys rather than manually writing them, also, check for typos or part of the API key being cut off.
Make sure that you are using the correct key pair. Using your Test Mode keys when working on your Production environment or when using your Production Keys on your Sandbox environment will not work.
Ensure that your public and private keys are entered in their correct fields. There are instances where a public key was used instead of a private key, and vice-versa.
- One pair of API keys won’t work on multiple sites. If you have multiple sites, make sure each site has the correct pair of API keys. You can create an Affirm account for each one of your sites.
If you are using a platform integration (eg: Shopify, Magento, WooCommerce, etc.), and want to know how to configure, test, or go live with your production environment, find your platform integration and more information here.
If you are a developer and want to understand how to build an integration using API Keys, check out this resource.