> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tonder.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Methods Guide

This guide helps you choose and implement the best payment methods for your business using Tonder's unified API. Learn when to use each payment method and how to create a comprehensive payment strategy for your customers.

<Info>
  For detailed technical specifications, see the [Payment Methods Reference](/direct-integration/payment-methods/payment-methods-reference).
</Info>

## How Payment Methods Work

All payment methods in Tonder work through the same unified [Process Transaction](/reference/process-transaction) endpoint. You simply change the `payment_method.type` and provide any method-specific parameters. This makes it easy to offer multiple payment options without managing different integrations.

```json theme={null}
{
  "operation_type": "payment",
  "amount": 100.00,
  "currency": "MXN",
  "customer": { /* customer data */ },
  "payment_method": {
    "type": "CARD" // or "SPEI", "oxxopay", "mercadopago", "SAFETYPAY"
  },
  "client_reference": "order-123"
}
```

## Available Payment Methods

Tonder supports multiple payment methods to accommodate different customer preferences and business needs. Each method has unique characteristics that make it suitable for specific use cases and customer segments.

<AccordionGroup>
  <Accordion title="Instant Payment Methods">
    These methods provide immediate payment confirmation and are ideal for digital transactions:

    | Method                                                                              | Best For                         | Processing Time |
    | ----------------------------------------------------------------------------------- | -------------------------------- | --------------- |
    | [**Card Payments**](/direct-integration/payment-methods/card-payments)              | E-commerce, instant confirmation | Immediate       |
    | [**Mercado Pago**](/direct-integration/payment-methods/mercado-pago-digital-wallet) | Digital-savvy customers          | Immediate       |
  </Accordion>

  <Accordion title="Bank Transfer Methods">
    These methods use the banking network for secure, high-value transactions:

    | Method                                                                             | Best For                       | Processing Time |
    | ---------------------------------------------------------------------------------- | ------------------------------ | --------------- |
    | [**SPEI Bank Transfers**](/direct-integration/payment-methods/spei-bank-transfers) | Higher-value transactions, B2B | Real-time       |
  </Accordion>

  <Accordion title="Cash Payment Methods">
    These methods allow customers to pay with cash at physical locations:

    | Method                                                                                     | Best For                         | Processing Time |
    | ------------------------------------------------------------------------------------------ | -------------------------------- | --------------- |
    | [**OXXO Cash Payments**](/direct-integration/payment-methods/oxxo-cash-payments)           | Customers without bank accounts  | 24-48 hours     |
    | [**SafetyPay Cash Payments**](/direct-integration/payment-methods/safetypay-cash-payments) | Alternative cash payment regions | 24-48 hours     |
  </Accordion>
</AccordionGroup>

## Choosing the Right Payment Methods

Selecting the appropriate payment methods for your business depends on your target audience, transaction patterns, and market characteristics. Here are recommendations for different business types and market conditions:

<AccordionGroup>
  <Accordion title="For E-commerce Stores">
    E-commerce platforms need to accommodate diverse customer preferences and transaction sizes. Some primary recommendations are:

    * Use card payments for immediate confirmation.
    * Use OXXO pay for cash-preferred customers.
    * Use SPEI for higher-value purchases.
  </Accordion>

  <Accordion title="For B2B Platforms">
    B2B platforms typically handle higher transaction values and need reliable payment methods. Some primary recommendations are:

    * Use SPEI bank transfers for business transactions.
    * Use card payments for smaller purchases and international cards.
  </Accordion>

  <Accordion title="For Cash-Heavy Markets">
    In regions where cash payments are common, offer multiple cash payment options. Some primary recommendations are:

    * Use OXXO for the widest store coverage in Mexico.
    * Use SafetyPay as an alternative for regions without OXXO.
    * Use card payments for customers with cards.
  </Accordion>
</AccordionGroup>

## Implementation Strategy

Follow this step-by-step approach to successfully integrate multiple payment methods into your application. This strategy helps you build a robust payment system that adapts to different customer needs and market conditions.

### Step 1: Start with Core Methods

Begin with the most essential payment methods for your market:

<Steps>
  <Step title="Implement card payments first">
    Cards provide immediate confirmation and work for most customers.
  </Step>

  <Step title="Add OXXO pay for cash payments">
    Essential for the Mexican market where cash is still popular.
  </Step>

  <Step title="Consider SPEI for higher amounts">
    Bank transfers are trusted for larger transactions.
  </Step>

  <Step title="Expand based on customer feedback">
    Add digital wallets and alternative methods based on demand.
  </Step>
</Steps>

### Step 2: Design Your Payment Flow

Create a payment flow that handles different payment methods appropriately. This code example shows how to build a dynamic payment method selector that presents relevant options based on order amount and customer location:

```javascript theme={null}
// Example: Payment method selector
class PaymentMethodSelector {
  constructor(orderAmount, customerLocation) {
    this.amount = orderAmount;
    this.location = customerLocation;
  }
  
  getAvailableMethods() {
    const methods = [
      {
        type: 'CARD',
        name: 'Tarjeta de crédito/débito',
        processingTime: 'Inmediato',
        icon: 'credit-card',
        recommended: true
      },
      {
        type: 'OXXO Pay', 
        name: 'Pago en OXXO Pay',
        processingTime: '24-48 horas',
        icon: 'store',
        description: 'Paga en efectivo en cualquier OXXO'
      }
    ];
    
    if (this.amount >= 500) {
      methods.push({
        type: 'SPEI',
        name: 'Transferencia bancaria',
        processingTime: 'Inmediato',
        icon: 'bank',
        description: 'Transfiere desde tu banca en línea'
      });
    }
    
    return methods;
  }
}
```

### Step 3: Handle Different Response Types

Each payment method returns different response patterns that you need to handle appropriately. This code example demonstrates how to process responses from different payment methods and route customers to the appropriate next step:

```javascript theme={null}
// Handle various payment method responses
const handlePaymentResponse = (response, paymentType) => {
  switch (paymentType) {
    case 'CARD':
      if (response.status === 'authorized') {
        showSuccessPage(response);
      } else if (response.next_action) {
        // Handle 3DS redirect
        redirectTo3DS(response.next_action.redirect_to_url.url);
      }
      break;
      
    case 'OXXO':
    case 'SAFETYPAY':
      // Show payment voucher
      displayCashVoucher(response.payment_instructions);
      break;
      
    case 'SPEI':
      // Show bank transfer instructions
      displayBankInstructions(response.payment_instructions);
      break;
      
    case 'mercadopago':
      // Redirect to Mercado Pago
      redirectToWallet(response.next_action.redirect_to_url.url);
      break;
  }
};
```

## Best Practices for Multiple Payment Methods

Implementing multiple payment methods successfully requires careful planning and attention to user experience. Follow these best practices to create a seamless payment experience that maximizes conversion rates and customer satisfaction.

<AccordionGroup>
  <Accordion title="User Experience">
    * Show processing times clearly for each method.
    * Recommend payment methods based on order amount and customer profile.
    * Provide fallbacks when preferred methods fail.
    * Maintain consistent UI across all payment methods.
  </Accordion>

  <Accordion title="Technical Implementation">
    * Use the same [Process Transaction](/reference/process-transaction) endpoint for all payment methods.
    * Implement proper error handling for each method type.
    * Set up webhooks to track asynchronous payments (OXXO Pay, SPEI, SafetyPay).
    * Store payment method preferences for returning customers.
  </Accordion>

  <Accordion title="Business Strategy">
    * Analyze payment method performance (success rates, customer preference).
    * Optimize for your customer base (age, location, transaction size).
    * Monitor abandonment rates by payment method.
    * Test different payment method orders in your checkout flow.
  </Accordion>
</AccordionGroup>

## Monitoring and Analytics

Track these metrics for each payment method. This code example shows how to track payment method interactions and store them in an analytics system:

```javascript theme={null}
const trackPaymentMethod = (method, action, metadata = {}) => {
  analytics.track('payment_method_interaction', {
    method: method,
    action: action, // 'selected', 'completed', 'failed'
    amount: metadata.amount,
    customer_segment: metadata.segment,
    timestamp: new Date().toISOString()
  });
};

// Usage examples
trackPaymentMethod('CARD', 'selected', { amount: 150, segment: 'returning' });
trackPaymentMethod('OXXO', 'completed', { amount: 250, segment: 'new' });
```

## Next Steps

* Start with [card payments](/direct-integration/payment-methods/card-payments) for immediate implementation.
* Set up [webhooks](/direct-integration/webhooks/how-webhooks-works) for real-time payment notifications.
* Learn about [HTTP response codes](/direct-integration/http-response-codes) for proper error handling.
* Explore [rate limits](/direct-integration/rate-limits) to ensure optimal API usage.
