This page includes details for setting up your environment and testing your integration to ensure everything works as planned.
Order management functions
It is important to review your order management functions before entering the testing phase. Processing orders (capture, void, refund, and partial refund) in BigCommerce updates the order status in the Affirm dashboard. While you can process orders in the dashboard, we strongly recommend using BigCommerce to keep order status synced with Affirm rather than manually updating the Affirm dashboard. For more information on processing orders in BigCommerce, refer to their documentation.
## Sandbox development
Before going live with your Affirm integration, we suggest testing your integration in your development environment connected to our sandbox. To use our sandbox, retrieve your sandbox API keys at <https://sandbox.affirm.com/dashboard/#/apikeys> for use during integration.
## Connect to the live Affirm environment
1\. Retrieve your live API keys at <https://affirm.com/dashboard/#/apikeys>. 2\. In the **Business Manager** main page, go to **Merchant Tools > Site Preferences > Custom Site Preferences > Affirm**. 3\. Enter the **Affirm Public Key** and **Affirm Private Key** you just retrieved from the Affirm merchant dashboard 4\. In the **Business Manager** go to **Administration > Operations > Services > Service Credentials -> Affirm**. 5\. Enter the **Affirm Public Key** and **Affirm Private Key** as the **User name** and **Password**. 6\. Set **Affirm Mode** to **Live**.
After you have connected to our live environment and we have tested your integration, you are ready to launch to your production environment and offer Affirm as a payment option to your customers.