Search Overlay

SPEI

SPEI is a Mexican payment method and it is supported by the Paysafe Payments API. Developed and operated by Banco de México, SPEI allows rapid and safe electronic payments online, via a bank or mobile banking. This system allows money to be transferred electronically between bank deposit accounts in less than 30 seconds.

Customers must have a bank account that supports mobile or online banking in order to use the SPEI payment method, and the payment is deducted immediately from their account. A reference number, the type of payment, and the amount of the payment are all required together with the Standardized Bank Code (CLABE), debit card number, or cell phone number of the beneficiary. Despite, mobile phone numbers linked to a SPEI® service, payments must be made via mobile banking or through the user's bank.

The Paysafe Payments API supports SPEI via SafetyPay as a payment instrument for iGaming and Crypto Merchants in Mexico. You can process SPEI online payments using the Payments API.

Advantages: 

  • Instant payment confirmation
  • SPEI has no chargebacks risks
  • Payment code expiration date. If the payment code is not paid in the appropriate time, it expires and the transaction is cancelled

The Payments API caters to the following needs for SPEI:

  • currencyCode: MXN
  • paymentType: SPEI

Setup Requirements

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

  • Paysafecard API key

Transaction Types

  • Payments

AMOUNT IN MEXICAN PESO
Minimum Amount Maximum Amount
$11 $23,632

Payments Flow Diagram

Typical Scenarios

SPEI Payment

When you want to process a payment request using SafetyPay Bank Transfer, SafetyPay Cash, PIX, Boleto Bancario, MACH, SPEI, Khipu 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: SPEI

  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 is successfully completed by customer online, the merchant gets Payment Completed notification via webhooks.

API Contracts

Create a Payment Handle Example

{
"paymentType": "SPEI",
"spei": {
"consumerId": "merchantclientid5HzDvoZSodKDJ7X7VQ"
},
"transactionType": "PAYMENT",
"amount": 10000,
"currencyCode": "MXN",
"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"
}
]
}

SPEI Redirect URL to Generate a Payment Code Example

{
"id": "a92ece92-2889-4d8a-be61-ec70cc654d2b",
"paymentType": "SPEI",
"paymentHandleToken": "PHbZbxx8wDNyp7pl",
"merchantRefNum": "1653044860375",
"currencyCode": "MXN",
"txnTime": "2022-08-19T08:01:42Z",
"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=1020462090&paymentHandleId=a92ece92-2889-4d8a-be61-ec70cc654d2b&token=eyJhbGciOiJIUzI1NiJ9.eyJhY2QiOiIxMDIwNDYyMDkwIiwicHlkIjoiYTkyZWNlOTItMjg4OS00ZDhhLWJlNjEtZWM3MGNjNjU0ZDJiIiwiZXhwIjoxNjYwODk3OTAyfQ._w14bPlAGxsXtB9cYj8V_yX8MvEb7oomBQDqRh8Ujrk"
}
],
"liveMode": false,
"simulator": "EXTERNAL",
"usage": "SINGLE_USE",
"action": "REDIRECT",
"executionMode": "ASYNCHRONOUS",
"amount": 10000,
"merchantDescriptor": {
"dynamicDescriptor": "Test Description",
"phone": "5555345456"
},
"timeToLiveSeconds": 599,
"gatewayResponse": {
"processor": "PAYSAFECARD",
"id": "pay_1020014924_MpAot9HbfQUkJ51J0pYhFkP5rHqJcvqd_MXN"
},
"returnLinks": [
{
"rel": "on_failed",
"href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-error.html"
},
{
"rel": "default",
"href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-success.html"
},
{
"rel": "on_completed",
"href": "https://api.dev.paysafe.com/checkout/v2/pages/redirect-success.html"
}
],
"transactionType": "PAYMENT",
"gatewayReconciliationId": "pay_1020014924_MpAot9HbfQUkJ51J0pYhFkP5rHqJcvqd_MXN",
"updatedTime": "2022-08-19T08:01:42Z",
"statusTime": "2022-08-19T08:01:42Z",
"shippingDetails": {
"recipientName": "Vishnu",
"street": "20735 Stevens Creek Blvd",
"street2": "Montessori",
"city": "Cupertino",
"state": "CA",
"country": "US",
"zip": "95014"
},
"spei": {
"consumerId": "merchantclientid5HzDvoZSodKDJ7X7VQ"
},
"profile": {
"firstName": "ALBERTA",
"lastName": "BOBBETHCHARLESON",
"email": "accountholder0@example.com",
"dateOfBirth": {
"day": 23,
"month": 12,
"year": 1990
},
"phone": "1234567890"
}
}

Process Payment Request Using paymentHandleToken

{
"merchantRefNum": "1653044860375",
"amount": 10000,
"currencyCode": "MXN",
"dupCheck": true,
"settleWithAuth": true,
"paymentHandleToken": "PHbZbxx8wDNyp7pl",
"customerIp": "172.0.0.1",
"description": "Casino game purchase"
}

Payment Completed Notification via Webhooks

{
"id": "62fbf07e-1a82-4cdd-83cd-dcbb1cbef84e",
"paymentType": "SPEI",
"paymentHandleToken": "PHbZbxx8wDNyp7pl",
"merchantRefNum": "1653044860375",
"currencyCode": "MXN",
"settleWithAuth": true,
"dupCheck": false,
"txnTime": "2022-08-19T08:01:42Z",
"billingDetails": {
"street1": "100",
"street2": "Queen Street",
"city": "Cupertino",
"zip": "14236",
"state": "NY",
"country": "US"
},
"status": "PROCESSING",
"gatewayReconciliationId": "pay_1020014924_MpAot9HbfQUkJ51J0pYhFkP5rHqJcvqd_MXN",
"amount": 10000,
"availableToRefund": 0,
"consumerIp": "10.195.57.168",
"liveMode": false,
"simulator": "EXTERNAL",
"updatedTime": "2022-08-19T08:02:05Z",
"statusTime": "2022-08-19T08:02:05Z",
"gatewayResponse": {
"processor": "PAYSAFECARD",
"id": "pay_1020014924_MpAot9HbfQUkJ51J0pYhFkP5rHqJcvqd_MXN"
},
"availableToSettle": 0,
"shippingDetails": {
"recipientName": "Vishnu",
"street": "20735 Stevens Creek Blvd",
"street2": "Montessori",
"city": "Cupertino",
"state": "CA",
"country": "US",
"zip": "95014"
},
"spei": {
"consumerId": "merchantclientid5HzDvoZSodKDJ7X7VQ"
},
"profile": {
"firstName": "ALBERTA",
"lastName": "BOBBETHCHARLESON",
"email": "accountholder0@example.com",
"dateOfBirth": {
"day": 23,
"month": 12,
"year": 1990
},
"phone": "1234567890"
},
"settlements": {
"amount": 10000,
"txnTime": "2022-08-19T08:01:42.000+0000",
"availableToRefund": 0,
"merchantRefNum": "1653044860375",
"id": "62fbf07e-1a82-4cdd-83cd-dcbb1cbef84e",
"status": "RECEIVED"
}
}

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