# Affirm

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FTsLV5PMmTDbXNEmSAZal%2FUntitled.png?alt=media&#x26;token=98ad83c1-6eaf-49da-b789-e1bcf8126eb7" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}

#### **Disclaimers:** <a href="#affirm-disclaimers" id="affirm-disclaimers"></a>

No card details are stored for merchants using Affirm's Payment Gateway

Affirm will only work for one-time purchases, it will NOT work for recurring billing/subscriptions. Affirm does not support One-click Upsells.
{% endhint %}

{% hint style="warning" %}
Affirm will work with Form-code and landers that connect to Konnektive via Direct API. This will NOT work with Order Entry.
{% endhint %}

**STEP 1**

Go to **Gateways** → **Gateway Integrations** and select Affirm. Then click on **+Activate**.

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FNPakTofbwjJW7ZPnBB6C%2Fimage.png?alt=media&#x26;token=41e8a77f-2fbb-4aa6-bbf0-63aff7a45f36" alt=""><figcaption></figcaption></figure>

Enter the following information obtained from Affirm:

* **public\_api\_key**
* **private\_api\_key**

Click the green **Create Gateway** button to save your changes and create the gateway.

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FrVyPPSyVZex9JLOZfUsr%2Fimage.png?alt=media&#x26;token=b9111f40-7ccd-4d00-b0dd-39f3460ec9b6" alt=""><figcaption></figcaption></figure>

**STEP 2**

Assign the gateway to campaign products.

**STEP 3**

A checkout page should be secure HTTPS. A non-secured call to the Affirm gateway will be rejected.

Pass paySource=PREPAID and prepaidType=AFFIRM on the import order API call from your checkout page. Do not pass any other card information.

One option is to use hidden input fields on the page

```
<input type="hidden" name='paySource' value="PREPAID">
<input type='hidden' name='prepaidType' value='AFFIRM'>
```

If your standard credit card gateways are applied to your offers, use the **forceMerchantId** parameter in the Import Order API call. Note that this will only work for one time sales, it will not work with recurring transactions.

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FmhM4NdEFl6H3BAV52C2s%2FUntitled.png?alt=media&#x26;token=62f32469-fc4e-481e-bdf6-859a639b09a9" alt=""><figcaption></figcaption></figure>

For more info on the API call, please refer to our [API Documentation.](https://apidocs.konnektive.com/)

Our integration to Affirm does support the use of their Authorization system, however the Campaign Shipping Setting: ***Capture On Shipment*** must be enabled for this function to work. Once the fulfillment records are marked in a shipped status the Capture action will initiate.\
\
In the Order Import API call, pass in the Transaction ID from the Authorization on Affirm’s end using the parameter: **preAuthMerchantTxnId**<br>

**STEP 4**\
\
Affirm has 2 required values which will be supplied by our system when following directions below:\
\
Import images onto your products in the Base Product list. Accessed by going to: **CRM-> Products**\
(doing this will allow our system to supply the ‘item\_image\_url’ to Affirm, which is required)\
\
Secondly, you will need to pass in this parameter on each Affirm Import Order call: “errorRedirectsTo”\
(doing this will allow our system to supply the ‘item\_url’ to Affirm, which is required)\
\
If these two steps are not taken, Invalid Request responses will be received when attempting a sale.\
\ <br>
