Skip to main content

Overview

The PayIn API for Mexico enables customer deposit transactions through multiple payment methods including card payments, OXXO cash vouchers, and SPEI bank transfers. Transactions are processed in real-time with webhook notifications for status updates.

Key Features

  • Multiple Payment Methods: CARD, CASH, SPEI, OXXO
  • Currency: Mexican Peso (MXN)
  • Real-time Processing: Immediate transaction validation and processing
  • Webhook Notifications: Asynchronous status updates via IPN
  • Secure Redirect Flow: Customer completes payment on a secure hosted page

Quick Reference

ParameterValueDescription
EndpointPOST /api/v1/payinInitiate PayIn transaction
CurrencyMXNMexican Peso
Country CodeMXMexico
Auth RequiredYesToken-Top + Basic Auth

Request Parameters

Required Fields

FieldTypeDescriptionExample
referencestringUnique transaction identifier from your system"TXN-MX-001"
amountfloatTransaction amount in MXN150.00 (= MX$ 150.00)
currencystringThree-letter currency code (ISO 4217)"MXN"
countrystringTwo-letter country code (ISO 3166-1 alpha-2)"MX"
payment_methodstringPayment method identifier"ALL_METHODS", "CARD", "SPEI", "OXXO"
ipn_urlstringWebhook URL for transaction status updates"https://your-domain.com/webhook"
redirect_urlstringURL to redirect customer after payment"https://your-domain.com/payment/success"
customer_dataobjectCustomer information object (see below)β€”

Customer Data Object

FieldTypeRequiredDescriptionExample
legal_docstringβœ…Customer’s legal document number"CURP12345678901234"
legal_doc_typestringβœ…Document type: CURP, RFC, INE, PPN, PP"INE"
phone_codestringβœ…Country calling code"52"
phone_numberstringβœ…10-digit phone number without country code"5512345678"
emailstringβœ…Customer email address"johndoe@email.com"
full_namestringβœ…Customer full name"John Doe"
customer_addressstringβœ… Required when payment_method is CASHCustomer’s full address for cash delivery"Av. Insurgentes Sur 1602, CDMX"

Optional Fields

FieldTypeDescriptionDefault
descriptionstringTransaction descriptionβ€”
expiration_timeintegerPayment link expiration in minutes720 (12 hours)
The customer_address field is required when using the CASH payment method.

Response Structure

Success Response

FieldTypeDescription
codestringResponse code ("01" = success)
statusstringTransaction status ("SUCCESS")
messagestringDescription of the response
dataobjectTransaction data object

Data Object

FieldTypeDescription
ticketstringUnique transaction identifier (TumiPay ID)
datestringTransaction timestamp (YYYY-MM-DD HH:MM:SS)
payment_urlstringSecure payment URL for customer redirect
transactionobjectTransaction details echo

Examples

Request Example

cURL
curl --request POST 'https://api-empresas.staging.tumipay.co/production/api/v1/payin' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reference": "TXN-MX-001",
    "amount": 150.00,
    "currency": "MXN",
    "country": "MX",
    "payment_method": "ALL_METHODS",
    "description": "Test PayIn Mexico",
    "customer_data": {
        "legal_doc": "CURP12345678901234",
        "legal_doc_type": "INE",
        "phone_code": "52",
        "phone_number": "5512345678",
        "email": "johndoe@email.com",
        "full_name": "John Doe"
    },
    "expiration_time": 720,
    "ipn_url": "https://your-domain.com/webhook",
    "redirect_url": "https://your-domain.com/payment/success"
}'

Response Example

{
    "code": "01",
    "status": "SUCCESS",
    "message": "Operacion exitosa",
    "data": {
        "ticket": "9CQtDGwb2OLRrz3",
        "date": "2025-10-15 17:58:36",
        "payment_url": "https://link.staging.tumipay.co/payments/main?s=9CQtDGwb2OLRrz3",
        "transaction": {
            "reference": "TXN-MX-001",
            "amount": 150.00,
            "currency": "MXN",
            "payment_method": "ALL_METHODS",
            "redirect_url": "https://your-domain.com/payment/success",
            "ipn_url": "https://your-domain.com/webhook",
            "description": "Test PayIn Mexico"
        }
    }
}