← Back to Systems
Aldermere Systems / Build Notes

FAILED PAYMENT RECOVERY

# Failed Payment Recovery (Churn Preventer): DIY Installation Manual

Welcome to your **Failed Payment Recovery / Churn Preventer Business-in-a-Box**! This guide details how to build and configure an automated failed payment recovery system. 

By immediately catching credit card declines or invoice failures via payment processor, notifying the customer with a direct payment update link, and tracking status via an automated project task card, this system prevents churn and helps you reclaim thousands in unpaid services automatically.

You will build this pipeline using **Make.com**, **payment processor**, **Gmail**, and **Trello** (or Notion).

---

## 📋 Prerequisites & Accounts Needed
Ensure you have set up the following:
1. **payment processor Account:** (Standard or custom billing/subscriptions enabled).
2. **Gmail Account:** (For automatic customer outreach emails).
3. **Trello Account:** (Or Notion/Slack to notify yourself of decline alerts).
4. **Make.com Account:** A free or low-cost automation workspace.

---

## ⚡ Step 1: Import the Scenario Blueprint into Make.com
We have provided a pre-configured automation blueprint for this recovery workflow:
1. Log in to [Make.com](https://www.make.com/).
2. Click **Create a new scenario** (top right).
3. Click the **three dots (...)** at the bottom control bar and select **Import Blueprint**.
4. Upload the **`make_blueprint.json`** file included in this directory.
5. Save the scenario. You will see the visual pipeline:
   `[Payment Processor: Watch Failures]` ➡️ `[Gmail: Send Recovery Notification]` ➡️ `[Trello: Create Recovery Card]`

---

## 💳 Step 2: Configure the payment processor Event Trigger
We need our scenario to listen for failed payment attempts in real-time:
1. Double-click the **Payment Processor: Watch Events** trigger module in Make.
2. Click **Add Connection** and authenticate using your payment processor Restricted API Key (with write access to webhooks and read access to events/charges).
3. Under **Event Type**, select **`invoice.payment_failed`** (recommended for subscriptions/retainers) or **`charge.failed`** (for one-off product billing).
4. Save the module to generate the Webhook URL. Copy this URL.
5. In your **Payment processor dashboard**, navigate to **Developers ➡️ Webhooks**, click **Add Endpoint**, paste the Make Webhook URL, select the `invoice.payment_failed` event, and click **Add Endpoint**.

---

## 📧 Step 3: Map Gmail to Send the Recovery Notification
Instead of generic banking notifications, we send a friendly, styled email that directs the client to payment processor's secure Billing Customer Portal to resolve the issue:
1. Double-click the **Gmail: Send an Email** module in Make.
2. Connect your business Gmail account via OAuth.
3. Map the recipient field to the client's email address parsed from Payment Processor:
   ```text
   {{payment_customer_email}}
   ```
4. Set the **Subject** line to something operational and urgent but non-threatening:
   ```text
   Failed Transaction: Action Required for [Your Company Name] Invoice
   ```
5. Set **Content Type** to **HTML** and paste your custom billing template, making sure to embed payment processor's Customer Portal URL variable:
   ```html
   <div style="font-family: Arial, sans-serif; max-width: 600px; color: #111;">
     <h2>Action Required: Payment Update Needed</h2>
     <p>Hi {{payment_customer_name}},</p>
     <p>We recently tried processing your invoice for {{payment_invoice_description}} (Amount: £{{payment_invoice_amount}}), but the transaction was declined by your bank.</p>
     <p>To avoid service disruption, please securely update your billing details using the payment processor's direct customer portal link below:</p>
     <p style="margin: 20px 0; text-align: center;">
       <a href="{{payment_customer_portal_link}}" style="background-color: #ef4444; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; font-weight: bold; display: inline-block;">Update Payment Details</a>
     </p>
     <p>Once your card is updated, payment processor will automatically re-attempt the charge. If you have any questions, please contact our support team.</p>
     <br>
     <p>Best regards,</p>
     <p><strong>Billing Operations</strong></p>
     <span style="font-size: 11px; color: #888;">This is an automated operational notification.</span>
   </div>
   ```

---

## 📋 Step 4: Map Trello to Generate a Recovery Card
To ensure nothing slips through the cracks, create an internal task card for manual follow-up if the client doesn't update their details:
1. Double-click the **Trello: Create a Card** module.
2. Connect your Trello account.
3. Select your operations board (e.g. `Client Admin & Accounts`).
4. Select the list (e.g., `Failed Invoices / Collections`).
5. Map the card details:
   * **Name:** `RECOVERY: {{payment_customer_name}} - £{{payment_invoice_amount}}`
   * **Description:** Pre-populate with recovery instructions and links:
     ```text
     - Customer: {{payment_customer_name}}
     - Email: {{payment_customer_email}}
     - Amount: £{{payment_invoice_amount}}
     - Payment invoice ID: {{payment_invoice_id}}
     
     ---
     Action Checklist:
     - [ ] Check if card details were updated (customer payment portal).
     - [ ] If unpaid after 48 hours, send manual follow-up email.
     - [ ] If unpaid after 5 days, freeze service/access.
     ```
   * **Due Date:** Map dynamically to 2 days after failure: `addDays(now; 2)`.

---

## 🔬 Step 5: Save & Run a Test
1. Click **Save** on your Make scenario.
2. Go to **Payment processor dashboard ➡️ Developers ➡️ Webhooks**, click your endpoint, and choose **Send Test Webhook** (select `invoice.payment_failed` event template).
3. Verify that:
   * Gmail dispatches the recovery email.
   * Trello creates the collection card in the correct list.
4. Once verified, toggle the Make scenario scheduling switch to **ON**.