• Documentation
  • API Reference
  • Documentation
  • API Reference
Expand All Collapse All
< BACK TO HOME
  • General
    • Introduction to APMs
    • APM Input Fields and APIs
    • APM subMethod Class
    • Account Details Capture
    • APM Countries and Currencies
  • US and Canada Guides
    • ACH
    • Interac Instant
    • Mazooma
    • PayNearMe
    • PlayPlus
      • PlayPlus (REST)
      • PlayPlus (Web SDK)
    • VIP Preferred
      • VIP Preferred (REST)
      • VIP Pref. (Web SDK/Checkout)
  • Europe Guides
    • Okto Cash
    • Open Banking
  • Global Guides
    • Apple Pay
      • Registering with Apple Pay
        • (Manually) Register in the Apple System
          • Create an Apple ID
          • Enroll in the Apple Developer Program
            • Submit an Enrollment Request
            • Complete the Enrollment Process
            • Activate your Apple Developer Program Account
          • Register a Merchant ID in the Apple System
            • Create a Merchant ID
            • Create a Payment Processing Certificate
            • Create a Merchant Identity Certificate
            • Register and Verify Your Domain
      • Nuvei Apple Pay Implementations
        • Payment Page using IFrame
        • Static Apple Pay Button
        • Static Pay Button (Web SDK)
        • Dynamic Apple Pay Button
      • Apple Pay Integration
        • Apple Pay Guide (REST API)
        • Apple Pay Guide (Web SDK)
        • Apple Pay Guide (Checkout)
        • Apple Pay Integration Testing
    • Google Pay
      • Google Pay (REST API)
      • Google Pay (Web SDK)
      • Google Pay (Checkout)
    • Neteller
    • PayPal
    • Skrill
    • Visa Checkout
  • Latin America Guides
    • PIX
    • PIX Payouts
    • STPmex
  • Asia Pacific Guides
    • Alipay HK
    • Dana
    • DragonPay
    • GCash
    • India Payouts
    • KakaoPay
    • TouchnGo
    • TrueMoney

STPmex

On this page:
  • Introduction
    • Prerequisites and Notes
  • Supported Countries
  • Supported Currencies
  • Implementation Details
  • User Experience
    • Deposit
    • Withdrawal
  • Testing Credentials
Attributes
  • METHOD TYPEReal-Time Bank Transfer
  • DEPOSITS
  • WITHDRAWS
  • REFUNDS

Introduction

STPmex is a participant of the Interbank Electronic Payment System (SPEI®) authorized by Banco de México®, which offers technological products and services aimed at satisfying the needs of its clients in making electronic transfers.

The main objective of STP is to establish a technological architecture that offers an open, secure, robust and scalable link to the SPEI® system, enabling an online and real-time scheme in a continuous schedule for sending and receiving payments.

Prerequisites and Notes

  • When a deposit request is submitted with a new user (user_token_id), a unique CLABE number is generated for this specific user. The CLABE number remains the same for all future deposits with the same user. All future deposits are connected to the first request. This means that for every user, we have one request in our system but there can be many transactions associated with this user.
  • When a user completes the deposit, a notification is sent from the provider. The generated notification from the provider for this user for all future deposits (after the first deposit) will not contain custom parameters (such as merchant_unique_id, userid and others) submitted with the deposit request.
  • Since the user completes the deposit offline (via his bank account), the user can submit another deposit to the same CLABE number (generated on the first deposit) without having to go to the merchant’s payment page.

Supported Countries

  • Mexico

Supported Currencies

  • MXN

Implementation Details

Click tab to open…

  • for REST API
  • for Web SDK
  • for Payment Page
{
  "sessionToken":"<sessionToken from getSessionToken>",
  "merchantId": "<your merchantId>",
  "merchantSiteId": "<your merchantSiteId>",
  "clientRequestId": "<unique request ID in merchant system>",
  "amount": "1000",
  "currency": "MXN",
  "userTokenId": "<unique customer identifier in merchant system>",
  "clientUniqueId": "<unique transaction ID in merchant system>",
  "paymentOption":{
    "alternativePaymentMethod":{
    "paymentMethod":"apmgw_STPmex"
    }
  },
  "deviceDetails":{
    "ipAddress":"127.0.0.1"   
  },
    "billingAddress":{
      "email":"john.smith@email.com",
      "country":"MX"
    },
  "timeStamp":"<YYYYMMDDHHmmss>",
  "checksum":"<calculated checksum>"
}

sfc.createPayment({
  "sessionToken": "<sessiontoken>",
  "merchantId": "<your merchantId>",
  "merchantSiteId": "<your merchantSiteId>",
  "clientUniqueId": "<your clientUniqueId>",
  "paymentOption": {
    "alternativePaymentMethod": {
      "paymentMethod": "apmgw_STPmex"
    }
  },
 "billingAddress": {
    "country": "MX",
    "email": " john.smith@email.com"
  }
}, function(res) {
  console.log(res);
  if (res.cancelled === true) {
    example.querySelector('.token').innerText = 'cancelled';
  } else {
    example.querySelector('.token').innerText = res.transactionStatus + ' – Reference: ' + res.transactionId;
  }
  example.classList.add('submitted');
});

https://ppp-test.safecharge.com/ppp/purchase.do?merchant_id=2916030121050274325&merchant_site_id=760263&user_token=auto&user_token_id=UserID_8474783867&userid=UserID_8474783867&item_open_amount_1=false&item_min_amount_1=1&item_max_amount_1=100&item_name_1=Cashier%20Test%20product&item_amount_1=1000&item_quantity_1=1&item_discount_1=0&numberofitems=1&total_tax=0&discount=0&total_amount=1000.00&currency=MXN&version=4.0.0&encoding=UTF-8&zip=123456&country=MX&email=9678689907%40gmail.com&time_stamp=2021-12-16.12%3A59%3A53&checksum=e013c6c5538847b4ed4a197709347201d3053787694ee983bb8ad752d82207cd&


for REST API
{
  "sessionToken":"<sessionToken from getSessionToken>",
  "merchantId": "<your merchantId>",
  "merchantSiteId": "<your merchantSiteId>",
  "clientRequestId": "<unique request ID in merchant system>",
  "amount": "1000",
  "currency": "MXN",
  "userTokenId": "<unique customer identifier in merchant system>",
  "clientUniqueId": "<unique transaction ID in merchant system>",
  "paymentOption":{
    "alternativePaymentMethod":{
    "paymentMethod":"apmgw_STPmex"
    }
  },
  "deviceDetails":{
    "ipAddress":"127.0.0.1"   
  },
    "billingAddress":{
      "email":"john.smith@email.com",
      "country":"MX"
    },
  "timeStamp":"<YYYYMMDDHHmmss>",
  "checksum":"<calculated checksum>"
}

for Web SDK
sfc.createPayment({
  "sessionToken": "<sessiontoken>",
  "merchantId": "<your merchantId>",
  "merchantSiteId": "<your merchantSiteId>",
  "clientUniqueId": "<your clientUniqueId>",
  "paymentOption": {
    "alternativePaymentMethod": {
      "paymentMethod": "apmgw_STPmex"
    }
  },
 "billingAddress": {
    "country": "MX",
    "email": " john.smith@email.com"
  }
}, function(res) {
  console.log(res);
  if (res.cancelled === true) {
    example.querySelector('.token').innerText = 'cancelled';
  } else {
    example.querySelector('.token').innerText = res.transactionStatus + ' – Reference: ' + res.transactionId;
  }
  example.classList.add('submitted');
});

for Payment Page

https://ppp-test.safecharge.com/ppp/purchase.do?merchant_id=2916030121050274325&merchant_site_id=760263&user_token=auto&user_token_id=UserID_8474783867&userid=UserID_8474783867&item_open_amount_1=false&item_min_amount_1=1&item_max_amount_1=100&item_name_1=Cashier%20Test%20product&item_amount_1=1000&item_quantity_1=1&item_discount_1=0&numberofitems=1&total_tax=0&discount=0&total_amount=1000.00&currency=MXN&version=4.0.0&encoding=UTF-8&zip=123456&country=MX&email=9678689907%40gmail.com&time_stamp=2021-12-16.12%3A59%3A53&checksum=e013c6c5538847b4ed4a197709347201d3053787694ee983bb8ad752d82207cd&

User Experience

Deposit

  1. On the payment page, the user selects the SPEI/STPmex option.
  2. The user is redirected to a page with the generated CLABE number to which they need to transfer the funds.
  3. The user needs to log in to their bank account and make the transfer offline. It is possible to use the bank icons at the bottom to be redirected to the relevant bank login page.
  4. Once the user completes the deposit, a notification is sent from the provider.

    As mentioned above, all future deposits associated with the same user (user_token_id) are connected to the first deposit request, which means the same CLABE number is used. Custom parameters included in the deposit request are not returned in the notifications for approved deposits.

Withdrawal

  1. On the payment page, the user selects the SPEI/STPmex option.
  2. The user enters the amount they wish to withdraw.
  3. The user is redirected to a bank capture page where they are required to enter their CLABE number:
  4. Once the user completes the form, a withdrawal request is created.

Testing Credentials

Full flow testing is not possible in an integration environment.

2022 Nuvei. All rights reserved.