SafetyPay Cash

SafetyPay Cash allows its users to select SafetyPay as their preferred payment method and currency while making purchases online or over the phone (via a variety of service channels, such as e-commerce or a call centre). They are then given a special payment code, which they can present to one of SafetyPay's local payment partners, sometimes a local bank.

The Paysafe Payments API supports SafetyPay Cash via SafetyPay as a Payment Instrument for iGaming and Crypto Merchants in Brazil, Peru, Chile, Mexico, Colombia, Ecuador, Panama, El Salvador and Guatemala. You can process SafetyPay Cash payments using the Payments API.

Setup Requirements

For Paysafe to create a test account in sandbox and production environments, the following information is required.

  • Paysafecard API key

Separate Paysafecard API keys are recommended to be used for different countries with the same currency, i.e. Ecuador, Panama and El Salvador.

Transaction types

  • Payments

Minimum Amount

Maximum Amount
$1 $10,000

Payments Flow Diagram

Typical Scenarios

SafetyPay Cash Payment

When you want to process a payment request using SafetyPay Cash as the payment type, you would do the following:

  1. Create a Payment Handle with the transactionType parameter set to PAYMENT and the paymentType parameter set to one of the following value: SAFETYPAY_CASH

  2. Redirect the customer to the SafetyPay redirect URL so they can generate a payment code. The status of the Payment Handle becomes PAYABLE. The merchant gets notified of this status change via webhooks that have been configured.

  3. Use the paymentHandleToken returned in the response to process the Payment request. The Payment will have a status of PROCESSING until the customer has made the payment.

Once the Payment in cash is successfully completed by customer, the merchant gets Payment Completed notification via webhooks.

APIs to use: Payment Handles + Payments

API Contracts

Create a Payment Handle Example

{
    "paymentType": "SAFETYPAY_CASH",
    "safetyPayCash": {
        "consumerId": "merchantclientid5HzDvoZSodKDJ7X7VQ"
    },
    "transactionType": "PAYMENT",
    "amount": 2500,
    "currencyCode": "PEN",
    "profile": {
        "firstName": "ALBERTA",
        "lastName": "BOBBETHCHARLESON",
        "email": "accountholder0@example.com",
        "phone": "1234567890",
        "dateOfBirth": {
            "day": 23,
            "month": 12,
            "year": 1990
        }
    },
    "billingDetails": {
        "nickName": "John Dee",
        "street": "100",
        "street2": "Queen Street",
        "city": "Cupertino",
        "zip": "14236",
        "country": "US",
        "state": "NY"
    },
    "merchantRefNum": "1653044860375",
    "merchantDescriptor": {
        "dynamicDescriptor": "Test Description",
        "phone": "5555345456"
    },
    "shippingDetails": {
        "recipientName": "Vishnu",
        "street": "20735 Stevens Creek Blvd",
        "street2": "Montessori",
        "city": "Cupertino",
        "zip": "95014",
        "country": "US",
        "state": "CA"
    },
    "dupCheck": false,
    "deviceFingerprinting": {
        "threatMetrixSessionId": "855d67c9-86dd-4b67-a036-72359bf5631a"
    },
    "returnLinks": [
        {
            "rel": "on_completed",
            "href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-success.html",
            "method": "GET"
        },
        {
            "rel": "on_failed",
            "href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-error.html",
            "method": "GET"
        },
        {
            "rel": "default",
            "href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-success.html",
            "method": "GET"
        }
    ]
}

SafetyPay Redirect URL to Generate a Payment Code Example

{
    "id": "66699827-e0b6-49f3-81a2-8662c7a6bf55",
    "paymentType": "SAFETYPAY_CASH",
    "paymentHandleToken": "PH094ZeSP4F2Zopp",
    "merchantRefNum": "1653044860375",
    "currencyCode": "PEN",
    "txnTime": "2022-08-18T05:55:04Z",
    "billingDetails": {
        "street": "100",
        "street2": "Queen Street",
        "city": "Cupertino",
        "zip": "14236",
        "state": "NY",
        "country": "US"
    },
    "customerIp": "10.195.57.168",
    "status": "INITIATED",
    "links": [
        {
            "rel": "redirect_payment",
            "href": "https://api.qa.paysafe.com/alternatepayments/v1/redirect?accountId=1020572150&paymentHandleId=66699827-e0b6-49f3-81a2-8662c7a6bf55&token=eyJhbGciOiJIUzI1NiJ9.eyJhY2QiOiIxMDIwNTcyMTUwIiwicHlkIjoiNjY2OTk4MjctZTBiNi00OWYzLTgxYTItODY2MmM3YTZiZjU1IiwiZXhwIjoxNjYwODAzOTA1fQ.oluh-Vop-5Y6u94X52159EZSsh1HepW3HtSTfNhqAu4"
        }
    ],
    "liveMode": false,
    "simulator": "EXTERNAL",
    "usage": "SINGLE_USE",
    "action": "REDIRECT",
    "executionMode": "ASYNCHRONOUS",
    "amount": 2500,
    "merchantDescriptor": {
        "dynamicDescriptor": "Test Description",
        "phone": "5555345456"
    },
    "timeToLiveSeconds": 599,
    "gatewayResponse": {
        "processor": "PAYSAFECARD",
        "id": "pay_1020014799_PVXkydtwbewtbwgEfbYjs0qNAgZE7DFM_PEN"
    },
    "returnLinks": [
        {
            "rel": "on_completed",
            "href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-success.html"
        },
        {
            "rel": "default",
            "href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-success.html"
        },
        {
            "rel": "on_failed",
            "href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-error.html"
        }
    ],
    "transactionType": "PAYMENT",
    "gatewayReconciliationId": "pay_1020014799_PVXkydtwbewtbwgEfbYjs0qNAgZE7DFM_PEN",
    "updatedTime": "2022-08-18T05:55:05Z",
    "statusTime": "2022-08-18T05:55:05Z",
    "shippingDetails": {
        "recipientName": "Vishnu",
        "street": "20735 Stevens Creek Blvd",
        "street2": "Montessori",
        "city": "Cupertino",
        "state": "CA",
        "country": "US",
        "zip": "95014"
    },
    "profile": {
        "firstName": "ALBERTA",
        "lastName": "BOBBETHCHARLESON",
        "email": "accountholder0@example.com",
        "dateOfBirth": {
            "day": 23,
            "month": 12,
            "year": 1990
        },
        "phone": "1234567890"
    },
    "safetyPayCash": {
        "consumerId": "merchantclientid5HzDvoZSodKDJ7X7VQ"
    }
}

Process Payment Request Using paymentHandleToken

{
  "merchantRefNum": "1653044860375",
  "amount": 2500,
  "currencyCode": "PEN",
  "dupCheck": true,
  "settleWithAuth": true,
  "paymentHandleToken": "PH094ZeSP4F2Zopp",
  "customerIp": "172.0.0.1",
  "description": "Casino game purchase"
}

Payment Completed Notification via Webhooks

{
    "id": "74c966b4-7d81-46ea-a2fc-4b1db8906d35",
    "paymentType": "SAFETYPAY_CASH",
    "paymentHandleToken": "PH094ZeSP4F2Zopp",
    "merchantRefNum": "1653044860375",
    "currencyCode": "PEN",
    "settleWithAuth": true,
    "dupCheck": false,
    "txnTime": "2022-08-18T05:55:04Z",
    "billingDetails": {
        "street1": "100",
        "street2": "Queen Street",
        "city": "Cupertino",
        "zip": "14236",
        "state": "NY",
        "country": "US"
    },
    "status": "PROCESSING",
    "gatewayReconciliationId": "pay_1020014799_PVXkydtwbewtbwgEfbYjs0qNAgZE7DFM_PEN",
    "amount": 2500,
    "availableToRefund": 0,
    "consumerIp": "10.195.57.168",
    "liveMode": false,
    "simulator": "EXTERNAL",
    "updatedTime": "2022-08-18T05:59:32Z",
    "statusTime": "2022-08-18T05:59:32Z",
    "gatewayResponse": {
        "processor": "PAYSAFECARD",
        "id": "pay_1020014799_PVXkydtwbewtbwgEfbYjs0qNAgZE7DFM_PEN"
    },
    "availableToSettle": 0,
    "shippingDetails": {
        "recipientName": "Vishnu",
        "street": "20735 Stevens Creek Blvd",
        "street2": "Montessori",
        "city": "Cupertino",
        "state": "CA",
        "country": "US",
        "zip": "95014"
    },
    "profile": {
        "firstName": "ALBERTA",
        "lastName": "BOBBETHCHARLESON",
        "email": "accountholder0@example.com",
        "dateOfBirth": {
            "day": 23,
            "month": 12,
            "year": 1990
        },
        "phone": "1234567890"
    },
    "safetyPayCash": {
        "consumerId": "merchantclientid5HzDvoZSodKDJ7X7VQ"
    }
}

To know more about each parameter, you can visit Payments.

Did you find this page useful?