Pay-in collection
About 4 min
Mexico region pay-in API (MXN). See Payment methods.
Request
Request Path:
sandbox:
https://sandbox-gateway.smilepayz.com/v2.0/transaction/pay-in
production:https://gateway.smilepayz.com/v2.0/transaction/pay-in
Header Parameters
| Field | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm (e.g. Mexico CST −06:00). |
X-SIGNATURE | M | String | Signature of JSON body (see product Signature doc). |
X-PARTNER-ID | M | String | Your merchantID |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
orderNo | M | String(32) | Merchant-unique id |
purpose | M | String(64) | Memo to payer |
merchant | M | Object | Wraps merchantId and optional sub-merchant fields. |
merchantId | M | String | Smilepayz merchantId for this call. |
merchantName | O | String | Merchant display name. |
subMerchantId | O | String | Sub-merchant ID. |
subMerchantName | O | String | Name for subMerchantId. |
money | M | Object | Currency plus amount for this transaction. |
currency | M | String | Fixed to MXN. |
amount | M | Number | Amount (up to 2 decimal places). See Money |
paymentMethod | M | String | See Payment methods doc. |
expiryPeriod | O | Number | ExpiryPeriod, default 3600. |
redirectUrl | O | String(256) | HTTPS post-pay return URL, max 256 chars. |
callbackUrl | O | String(256) | HTTPS async status URL, max 256 chars. |
Example Body – Transaction Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-06:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001
{
"orderNo": "20001mxspei394eeb7b44c2460",
"purpose": "Electronics invoice — CDMX",
"merchant": {
"merchantId": "20001"
},
"money": {
"currency": "MXN",
"amount": 250000
},
"paymentMethod": "SPEI"
}
Responses
HTTP Request
| Field | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
code | M | String | 00 success, other values error. |
message | M | String | UTF-8 human-readable result line. |
orderNo | M | String | Merchant-unique id |
tradeNo | O | String | Smilepayz tradeNo for this order. |
merchant | M | Object | Wraps merchantId and optional sub-merchant fields. |
merchantId | M | String | Smilepayz merchantId for this call. |
merchantName | O | String | Merchant display name. |
subMerchantId | O | String | Sub-merchant ID. |
subMerchantName | O | String | Name for subMerchantId. |
money | M | Object | Currency plus amount for this transaction. |
currency | M | String | Fixed to MXN. |
amount | M | Number | Amount (up to 2 decimal places). See Money |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss±HH:mm |
channel | M | Object | Channel payload (paymentUrl, qrString, …). |
paymentMethod | M | String | See Payment methods doc. |
paymentUrl | O | String | Cashier URL to open for the payer. |
qrString | O | String | PIX or channel copy-paste string if returned. |
receiverBankName | O | String | Bank / brand code when returned. |
vaNumber | O | String | Virtual account / reference when returned. |
status | O | String | Order or payment status enum value. |
responseCode | O | String | Channel result code when returned (e.g. CODI / OXXO). |
responseMessage | O | String | Channel result text when returned. |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-06:00
{
"code": "00",
"message": "Successful",
"orderNo": "20001mxspei394eeb7b44c2460",
"tradeNo": "141200112412131711531135",
"merchant": {
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store",
"accountNo": "11420011202402290943"
},
"money": {
"currency": "MXN",
"amount": 250000
},
"transactionTime": "2024-12-13T04:11:54-06:00",
"channel": {
"paymentMethod": "SPEI",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=141200112412131711531135",
"receiverBankName": "OPM",
"vaNumber": "646180157000000004"
},
"status": "PROCESSING"
}
{
"code": "00",
"message": "Successful",
"orderNo": "20011331546f1ca1447c69cc0caf",
"tradeNo": "1412001125102713583676303",
"merchant": {
"merchantId": "20011",
"merchantName": "Smilepayz Demo Store",
"accountNo": "11420011202402290943"
},
"money": {
"currency": "MXN",
"amount": 250000
},
"transactionTime": "2025-10-27T00:58:38-06:00",
"channel": {
"paymentMethod": "CODI",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=1412001125102713583676303",
"qrString": "{\"TYP\":20,\"v\":{\"DEV\":\"00001618035151761092/60\"},\"ic\":{\"IDC\":\"335b075298\",\"SER\":1733687829,\"ENC\":\"mgXOeZ0ufbeSkj0rFNi3Giu2Qy8zcoAV7yA54fHDhY9kyYz2s82PQLXH+1ObjyoFnQT8QT/aEuTNYquQbTYDO+TWLUEZHrLXQcLsPJ5qaH9LqfXuLRDZAN6wpwIxAvZudKxXKk3VDpswsKPcT98K/VHrEn1zz3MHMIz0cmJsoV+kUX1ed1gr7J162JimfjtOxC/MNKbMsvqZf8f48uDImxTWxEwGtWj0on1C8bs0ZnkBibn8buY4yxRK73ixQMywmXsWxwxp8hoAd8Yh7jO02QYof0F4uehUuu1E8Q6iomEcIYtorFRBcnzrUxLEsjSzMxeDAV4nhF7faVB65UTUp/LyV7lwzPQu5EKF/XUzEeOVyAz0tTQHnbGfkkEh44L5\"},\"CRY\":\"FK0Vm7dtBI+R5tv/3oIM9kkOJLfdSQVG0y6fVQHyAcw=\"}"
},
"status": "PROCESSING",
"responseCode": "2009000",
"responseMessage": "Successful"
}
{
"code": "00",
"message": "Successful",
"orderNo": "20011f15fd99a451042d585ba32c",
"tradeNo": "1412001125102713522460381",
"merchant": {
"merchantId": "20011",
"merchantName": "Smilepayz Demo Store",
"accountNo": "11420011202402290943"
},
"money": {
"currency": "MXN",
"amount": 250000
},
"transactionTime": "2025-10-27T00:52:25-06:00",
"channel": {
"paymentMethod": "OXXO",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=1412001125102713522460381",
"qrString": "8201880001347082"
},
"status": "PROCESSING",
"responseCode": "2009000",
"responseMessage": "Successful"
}
Sub-order transaction & callback
For Mexico pay-in (e.g. SPEI), the channel may credit the same merchant order more than once. Platform rules:
- Create request creates only the main order:
/v1/paydoes not pre-split sub-orders. - Extra successful credits become sub-orders: each recognized extra credit gets its own
tradeNo, credited amount, fees, settlement, and merchant callback. - Callback field meaning:
orderNo: always the original merchant order number (same as the main order).tradeNo: platform id for this transaction (main or sub-order; each is unique).money.amount: amount for this credit (a sub-order amount may differ from the original request amount).
- Idempotency: you may receive multiple SUCCESS callbacks for one
orderNo. UsetradeNoas the transaction-level idempotency key; do not dedupe only byorderNo. - Main and sub-orders are independent: sub-order amounts do not auto-mark the main order SUCCESS or rewrite the main order amount/status. See
subOrderListin Inquiry Status.
Tips
Verify signature and return plain-text SUCCESS for every main / sub-order callback.
Notification/Callback
Callback signature ≠ request signature
Do not verify callback X-SIGNATURE with the request-signing formula. See Callback Signature.
HTTP Request
| Field | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | See Callback Signature |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
orderNo | M | String | Merchant-unique id. Main and sub-order callbacks share the same original merchant orderNo. |
tradeNo | M | String | Smilepayz tradeNo for this transaction (main or sub-order). Use this field for transaction-level idempotency. |
merchantId | M | String | Smilepayz merchantId for this call. |
merchantName | M | String | Merchant display name. |
subMerchantId | O | String | Sub-merchant ID. |
subMerchantName | O | String | Name for subMerchantId. |
paymentMethod | M | String | See Payment methods doc. |
transactionTime | M | String | Format: yyyy-MM-ddTHH:mm:ss |
status | M | String | Order or payment status enum value. |
money | M | Object | Currency plus amount for this transaction. |
currency | M | String | Fixed to MXN. |
amount | M | Number | Amount for this credit (up to 2 decimal places). Sub-order uses the actual credited amount. See Money |
payer | O | Object | Payer object per region rules (see Payer model). |
name | O | String | Beneficiary full name (UTF-8). |
Return
Important
Respond with the string SUCCESS only.
{
"orderNo": "20001mxspei394eeb7b44c2460",
"tradeNo": "141200112412131711531135",
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store",
"subMerchantId": "",
"subMerchantName": "",
"paymentMethod": "SPEI",
"transactionTime": "2024-12-13T04:11:54-06:00",
"status": "SUCCESS",
"money": {
"currency": "MXN",
"amount": 250000
},
"payer": {
"name": "Juan Carlos Hernández"
}
}
{
"orderNo": "20001mxspei394eeb7b44c2460",
"tradeNo": "141200112412131711531135-01",
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store",
"subMerchantId": "",
"subMerchantName": "",
"paymentMethod": "SPEI",
"transactionTime": "2024-12-13T05:22:10-06:00",
"status": "SUCCESS",
"money": {
"currency": "MXN",
"amount": 100000
},
"payer": {
"name": "Juan Carlos Hernández"
}
}
SUCCESS

