> For the complete documentation index, see [llms.txt](https://help.checkoutchamp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.checkoutchamp.com/crm/gateway-setup/gateway-integrations/flexecom.md).

# FlexEcom

FlexEcom is the award-winning decline recovery platform, helping brands turn payment declines into added sales.

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FGjiyAJeMNskHBOqX5Amx%2Fimage.png?alt=media&amp;token=f74e6d11-c615-42be-8d3c-ac65354112f9" alt="" width="495"><figcaption></figcaption></figure>

{% hint style="info" %}
FlexEcom is for decline salvage only. Do not place a FlexEcom gateway on a campaign product or in ATRI gateway profiles.
{% endhint %}

{% hint style="info" %}
FlexEcom is available on Recycle Billing and when retrying initial declines.
{% endhint %}

### **STEP 1 - Activate Plugin**

Go to Gateways > Gateway Integrations. Select FlexEcom. Press the <mark style="color:green;">**+ Activate**</mark> button.

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FmTfFausNCOuZuXSGb6e9%2Fimage.png?alt=media&amp;token=089687b6-dcf6-433e-be7b-ece3a5ebdd47" alt="" width="375"><figcaption></figcaption></figure>

Obtain **publicKey, secretKey,** and **signingSecret** from FlexEcom:

* Go to **Access Tokens** and click **Add Access Token**.
  * Change all of the drop downs to **‘View and manage’**, then confirm the changes.\
    This will present you your **publickey** and **secretkey**.

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2F7eaqhwg0I2wm0S77wEz5%2Fimage.png?alt=media&amp;token=b09836a3-0c26-49fd-b253-72938f4be807" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FWWSc29ZC2yo94FASMoqh%2Fimage.png?alt=media&amp;token=1cfb70d0-5dcb-46a8-a58f-033ecfa3a236" alt="" width="429"><figcaption></figcaption></figure>

* Go to **Webhooks** and click **Add Webhook**
  * Paste in the following URL, then enable all four toggle options and click Submit:

    `https://api.checkoutchamp.com/billers/flexecom/notification/`\
    Submitting this will generate your **signingSecret**.

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FrtFfqfUJ2qwrcFeFga2j%2Fimage.png?alt=media&amp;token=08f6e823-7e3c-4cb3-b18d-2036d5648deb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2Fs9cjLxyF0TEk1t1kYab2%2Fimage.png?alt=media&amp;token=0003a15a-97ef-4727-854a-a8d51e73974c" alt="" width="433"><figcaption></figcaption></figure>

Use **cascadeAll** to automatically cascade all initial soft-declines to FlexEcom. This option routes the transaction to the first cascade profile that contains FlexEcom, meaning you do not need to manually assign the cascade profile within your ATRI gateway profiles. See [Cascades (CIT)](#cascades-cit) for further instructions

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FSnzE2SGgdlE5mfAbfEq8%2Fimage.png?alt=media&amp;token=c4a01d98-17dd-402c-9171-dc6183681913" alt="" width="375"><figcaption></figcaption></figure>

### STEP 2 - Add FlexEcom to Cascades (CIT) and/or Recycle Billing (MIT)

#### Cascades (CIT)

Soft-declines can also be routed to FlexEcom through standard [ATRI](https://help.checkoutchamp.com/crm/gateway-setup/advanced-transaction-routing-interface-atri/cascade-profiles.md) cascade profiles.

Add the FlexEcom gateway to an ATRI cascade profile, then apply that cascade profile as a direct cascade on a gateway or as the cascade on an ATRI gateway profile.

Cascades return an instant approval or decline from FlexEcom.  There is no wait period as there is with recycle billing.

{% hint style="success" %}
FlexEcom generally yields higher recovery rates when placed higher in your cascade logic. You can control your cascade placement by using the [Priority Queue](https://help.checkoutchamp.com/crm/gateway-setup/advanced-transaction-routing-interface-atri/atri-algorithms#priority-queue) algorithm.
{% endhint %}

{% hint style="warning" %}
If you are using the **cascadeAll** option inside the FlexEcom gateway setup, you still need to configure a cascade profile with FlexEcom inside of it, but you do not need to manually apply the cascade profile to your gateway profiles.
{% endhint %}

{% hint style="warning" %}
A sale will not cascade to FlexEcom if the [Single Transaction](https://help.checkoutchamp.com/crm/crm-setup/campaign-setup/single-transaction-orders.md) functionality is enabled on the campaign.
{% endhint %}

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FkI1fwsYnDAsdYvur9cmu%2Fimage.png?alt=media&amp;token=7bef20b2-7b3a-497e-8be5-b5619d33c1b1" alt=""><figcaption></figcaption></figure>

#### Recycle Billing (MIT)

Go to Gateways > Recycle Billing to create or edit the Recycle Billing profile that you want to apply FlexEcom to.

Select FlexEcom as the Gateway for Re-Attempts 4-6, Re-Attempts 7-9, ***or*** in Final Attempt selection.

{% hint style="info" %}
Re-Attempts 1-3 will always run against the original gateway that the subscription is billing against.<br>

You do not need to set FlexEcom as the Re-Attempts for both 4-6 & 7-9. Once the transaction reaches FlexEcom it will remain on FlexEcom until a final decision is reached - and if it is rejected the it will not go back to FlexEcom for another series of retries.
{% endhint %}

{% hint style="success" %}
FlexEcom generally yields higher recovery rates when placed higher in your re-attempt logic.<br>

You can skip any of the Re-Attempts prior to FlexEcom to decrease the amount of attempts that occur before it reaches FlexEcom. For example, setting FlexEcom as Attempt 4 and skipping Attempt 3 will effectively make FlexEcom the 3rd recycle attempt.
{% endhint %}

{% hint style="info" %}

#### Final Attempt

Optional - Select your FlexEcom gateway for the final recycle attempt. There is no Wait Period for this attempt so this will process immediately after the previous attempt declines.\
\
You can skip attempts to reach the Final Attempt selection sooner. For example, skipping Attempt 3 and only configuring a Final Attempt within the Extended Recycle Billing Rules will effectively make FlexEcom the 3rd recycle attempt.
{% endhint %}

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FQVL20pUHJ2OB9v8hlVVI%2Fimage.png?alt=media&amp;token=c7874e14-a66f-499c-bada-19b4119820e7" alt=""><figcaption></figcaption></figure>

&#x20;

#### Rerun Initial Declines

Choose the FlexEcom gateway directly when retrying initial declines on the Order Details Report or via the [Rerun Declined Sale API](https://apidocs.checkoutchamp.com/#a19884c8-6958-4050-8a99-b29c581d1e2a).  Do NOT retry on an ATRI gateway profile.

Initial Declines (new sales) with recurring products may be sent to FlexEcom.  However a successful recovery leaves no payment token to rebill the subscription on the original decline gateway.  The next rebill will attempt on the original decline gateway with card number and without cvv.  If and when that declines then that can be sent to FlexEcom again through Recycle Billing.

#### FlexEcom Responses

Orders sent to FlexEcom are automatically retried by FlexEcom. The result from FlexEcom is communicated back to CRM.

| Type of order | Result  | Action                                                                                                                                                     |
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| New Sale      | Success | Order is Complete and fulfillments are processed                                                                                                           |
| New Sale      | Failure | Order is Declined.  The exception to this is completing a trial.  Completing a trial leaves the order status unchanged.                                    |
| Recurring     | Success | Move subscription to the next billing cycle. Fulfillments are processed. Subscription reverts to the previous declined gateway for next scheduled billing. |
| Recurring     | Failure | Subscription is Recycle Failed                                                                                                                             |

&#x20;

#### Send Hard Declines to FlexEcom

By default only Soft Declines are sent to FlexEcom.  This can be overridden using [Decline Mapping](https://help.checkoutchamp.com/crm/gateway-setup/decline-message-mapping.md).  Map any specific Hard Decline to a Soft Decline.
