Payments 5 min read

Reduce Failed Payments in Latin America

Recover revenue from failed payments. Automatic routing, retries, and fallback methods.

Problem

  • 30-40% of payments fail in LATAM (vs 15-20% in US/EU)
  • Customers abandon after first decline
  • Manual retry processes don’t scale
  • Single payment provider = single point of failure

What You’ll Build

  • Smart payment routing across methods
  • Automatic retry with fallback options
  • Real-time failure recovery

Architecture

Payment Request → Primary Method → Fails? → Retry → Fallback Method → Success

Orangepill automatically tries alternative methods without customer re-entering payment info.

Steps

1. Enable Multiple Payment Methods

Configure payment waterfall:

const payment = await orangepill.paymentRequests.create({
  amount: 100000,
  currency: "COP",
  payment_method_types: [
    "bre_b",    // Primary: instant bank transfer
    "pse",      // Fallback 1: traditional bank transfer
    "card"      // Fallback 2: card payment
  ],
  retry_config: {
    enabled: true,
    max_attempts: 3
  }
});

2. Configure Smart Routing

Set routing rules by customer segment:

const routingRules = {
  high_value: ["bre_b", "card"],        // Fast methods for premium customers
  bulk: ["pse", "bre_b"],               // Bank transfers for B2B
  default: ["bre_b", "pse", "card"]     // All methods for everyone else
};

Dashboard configuration also available (no code required).

3. Handle Soft Declines

Automatically retry temporary failures:

app.post('/webhooks/orangepill', (req, res) => {
  const event = req.body;

  if (event.type === 'payment.failed') {
    const failure = event.data;

    if (failure.decline_code === 'insufficient_funds') {
      // Offer installment payment option
      offerInstallments(failure.customer_id);
    }
  }

  res.sendStatus(200);
});

4. Implement Retry Logic

Let customers retry without re-entering info:

// Customer clicks "Try again"
const retry = await orangepill.paymentRequests.retry(
  'preq_failed123',
  {
    payment_method_types: ["pse", "card"] // Skip Bre-B, try alternatives
  }
);

// Customer sees new payment options immediately

5. Monitor Approval Rates

Track performance by method:

# Dashboard or API
GET /v1/analytics/approval-rates?period=30d

{
  "bre_b": { "approval_rate": 92.5, "avg_time": "45s" },
  "pse": { "approval_rate": 78.3, "avg_time": "15m" },
  "card": { "approval_rate": 65.2, "avg_time": "5s" }
}

6. Enable Dunning for Recurring

For subscriptions, automatically retry failed charges:

const subscription = await orangepill.subscriptions.create({
  customer: "cus_abc123",
  price: "price_monthly",
  retry_schedule: [1, 3, 5, 7] // Retry on days 1, 3, 5, 7 after failure
});

7. Optimize Based on Data

Use analytics to refine routing:

  • Which methods have highest approval rates?
  • What times of day see most failures?
  • Which customer segments prefer which methods?

Adjust routing rules monthly based on data.

Code Sample

Full optimization setup:

// Create payment with smart fallbacks
async function createOptimizedPayment(amount, customer) {
  const payment = await orangepill.paymentRequests.create({
    amount,
    currency: "COP",
    customer: customer.id,
    payment_method_types: selectMethodsForCustomer(customer),
    retry_config: {
      enabled: true,
      max_attempts: 3,
      retry_delay: 300 // 5 minutes between retries
    },
    metadata: { segment: customer.segment }
  });

  return payment;
}

function selectMethodsForCustomer(customer) {
  if (customer.lifetime_value > 500000) {
    return ["bre_b", "card"]; // Fast methods for high-value
  }
  return ["bre_b", "pse", "card"]; // All methods for others
}

Outcome

Failed payments automatically recover. Customers see alternative methods without friction.

Typical results:

  • 15-25% increase in approval rates
  • 30-40% reduction in payment support tickets
  • 10-15% revenue recovery from previously failed transactions
  • 50% reduction in customer churn due to payment failures

What to read next