> ## 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.

# How to Accept SafetyPay Payments

This guide shows you how to accept payments using SafetyPay, an alternative payment network that operates across Latin America. SafetyPay supports two payment types: Cash (`safetypayCash`) for payments at physical locations, and Transfer (`safetypayTransfer`) for online bank transfers.

## When to Use SafetyPay

SafetyPay is ideal for:

* Customers in regions without OXXO coverage.
* Expanding cash payment options beyond convenience stores.
* Customers who prefer to pay via online bank transfer without a card.

## Step 1: Create a SafetyPay Payment Request

SafetyPay requires an `apm_config` object with `channel` and `bank_ids` to specify the payment network and collection point.

### SafetyPay Cash

Use `type: "safetypayCash"` and `channel: "WP"` for cash payments at physical locations.

```json theme={null}
{
  "operation_type": "payment",
  "amount": "150.00",
  "currency": "MXN",
  "customer": {
    "name": "John Doe",
    "email": "john.doe@email.com"
  },
  "payment_method": {
    "type": "safetypayCash",
    "apm_config": {
      "country": "Mexico",
      "channel": "WP",
      "bank_ids": [
        { "id": "8178" }
      ]
    }
  },
  "client_reference": "ORD-001",
  "return_url": "https://yoursite.com/return"
}
```

### SafetyPay Transfer

Use `type: "safetypayTransfer"` and `channel: "OL"` for online bank transfer payments.

```json theme={null}
{
  "operation_type": "payment",
  "amount": "150.00",
  "currency": "MXN",
  "customer": {
    "name": "John Doe",
    "email": "john.doe@email.com"
  },
  "payment_method": {
    "type": "safetypayTransfer",
    "apm_config": {
      "country": "Mexico",
      "channel": "OL",
      "bank_ids": [
        { "id": "1020" }
      ]
    }
  },
  "client_reference": "ORD-001",
  "return_url": "https://yoursite.com/return"
}
```

## Step 2: Send the Payment Request

Send a POST request to the [Process Transaction](/reference/process-transaction) endpoint to initiate the payment:

```bash theme={null}
curl -X POST https://stage.tonder.io/api/v1/process/ \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```

## Step 3: Handle the Response

Both Cash and Transfer return a `Pending` status with a redirect URL where the customer completes the payment.

### SafetyPay Cash response

```json theme={null}
{
  "id": "ce2c0f55-763b-4da9-9ca4-36b66960f80d",
  "operation_type": "payment",
  "status": "Pending",
  "amount": 150.0,
  "currency": "MXN",
  "client_reference": "ORD-001",
  "metadata": {},
  "provider": "tonder",
  "created_at": "2026-06-24T23:27:30.746969Z",
  "status_code": 201,
  "next_action": {
    "redirect_to_url": {
      "url": "https://sandbox-gateway.safetypay.com/Express4/Checkout/index?TokenID=a09a7953-f62a-40da-a0b5-7be671b2fabb&CountryID=MEX&ChannelID=CASH",
      "verify_transaction_status_url": "/transactions/ce2c0f55-763b-4da9-9ca4-36b66960f80d/"
    }
  }
}
```

### SafetyPay Transfer response

```json theme={null}
{
  "id": "1c93f512-c6c7-42cb-a280-fea1bdab53ee",
  "operation_type": "payment",
  "status": "Pending",
  "amount": 150.0,
  "currency": "MXN",
  "client_reference": "ORD-001",
  "metadata": {},
  "provider": "tonder",
  "created_at": "2026-06-24T23:27:09.232913Z",
  "status_code": 201,
  "next_action": {
    "redirect_to_url": {
      "url": "https://sandbox-gateway.safetypay.com/Express4/Checkout/index?TokenID=f42dc286-14f7-448b-b32f-0016ffbff350&CountryID=MEX&ChannelID=ONLINE",
      "verify_transaction_status_url": "/transactions/1c93f512-c6c7-42cb-a280-fea1bdab53ee/"
    }
  }
}
```

Redirect the customer to the `url` inside `next_action.redirect_to_url` to complete the payment on the SafetyPay gateway. Use `verify_transaction_status_url` to poll the transaction status.

## Step 4: Track Payment Status

SafetyPay payments follow this status flow:

1. **`Pending`** - Waiting for the customer to complete payment at the SafetyPay gateway.
2. **`Success`** - Payment confirmed.

Set up [webhooks](/direct-integration/webhooks/how-webhooks-works) to receive real-time notifications, or poll the status endpoint:

```bash theme={null}
curl -X GET https://stage.tonder.io/api/v1/transactions/{id}/ \
  -H "Authorization: Token YOUR_API_KEY"
```

## Available Bank IDs - Mexico

### Cash only (channel: "WP")

| Bank ID | Collection Points                                                                                                                                                 |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 8178    | Bodega Aurrera, Circle K, OpenPay, Super Farmacia Guadalajara, 7-Eleven, Farmacias de Ahorro, Sam's Club, Walmart, Extra, Waldo's, GestoPago, Kiosko, Pago Rápido |
| 8419    | Calimax, Super Farmacia Santa Maria, Farmacia la Más Barata, Roma, PayCash, Soriana                                                                               |

### Cash + Online (channel: "WP" or "OL")

| Bank ID | Bank          |
| ------- | ------------- |
| 8186    | Banco Azteca  |
| 8395    | Santander     |
| 1020    | BBVA Bancomer |
| 1007    | Scotiabank    |

Banks listed under Cash + Online support both `channel: "WP"` and `channel: "OL"`.

## Next Steps

* Set up [webhooks](/direct-integration/webhooks/how-webhooks-works) to receive notifications when SafetyPay payments are completed.
* Learn about [HTTP response codes](/direct-integration/http-response-codes) to handle different API responses.
* Explore [OXXO cash payments](/direct-integration/payment-methods/oxxo-cash-payments) as an alternative cash payment method.
