## Install Affirm on Spree
1\. [Download the Spree extension](🔗). 2\. Add the following line to your Spree Gemfile:
3\. Install the gem with Bundler:
4\. Restart your Spree server.
## Configure Affirm
1\. Sign in to the Spree admin page.
2\. Go to **Configurations > Payment Methods**.
3\. Click **New Payment Method**.
4\. Set **PROVIDER** to **Spree::Gateway::Affirm**..
5\. Enter **Affirm Monthly Payments** for **NAME**.
6\. Click **Create**.
7\. **Keep SERVER** set to `sandbox.affirm.com
`Â for testing.
8\. Check the **TEST MODE** box for testing.
9\. Enter the **API Key **(public key) and **Secret Key** (private key) you retrieved from the Affirm sandbox merchant dashboard.
10\. If your checkout process automatically captures the charge, set **AUTO CAPTURE** to **Yes**.
11\. Set **ACTIVE** to **Yes** to enable Affirm as a payment method.
12\. Click **Update**.
