Pembayaran masuk (Pay-In · Meksiko)
Sekitar 4 menit
API pay-in wilayah Meksiko (MXN). Lihat 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 (maks. 2 desimal). Lihat 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 (maks. 2 desimal). Lihat 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
Untuk pay-in Meksiko (mis. SPEI), channel dapat mengkredit order merchant yang sama lebih dari sekali. Aturan platform:
- Create request hanya membuat order utama:
/v1/paytidak memecah sub-order di muka. - Kredit sukses tambahan menjadi sub-order: setiap kredit tambahan yang dikenali mendapat
tradeNo, jumlah, biaya, settlement, dan callback merchant sendiri. - Arti field callback:
orderNo: selalu nomor order merchant asli (sama dengan order utama).tradeNo: id platform untuk transaksi ini (order utama atau sub-order; masing-masing unik).money.amount: jumlah kredit ini (jumlah sub-order bisa berbeda dari jumlah create).
- Idempotency: Anda mungkin menerima beberapa SUCCESS callback untuk satu
orderNo. GunakantradeNosebagai kunci idempotency tingkat transaksi; jangan dedupe hanya denganorderNo. - Order utama dan sub-order independen: jumlah sub-order tidak otomatis menandai order utama SUCCESS atau mengubah amount/status order utama. Lihat
subOrderListdi Inquiry Status.
Tips
Verifikasi signature dan balas teks SUCCESS untuk setiap callback order utama / sub-order.
Notification/Callback
Callback signature ≠ request signature
Jangan verifikasi X-SIGNATURE callback dengan formula request. Lihat 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 | Lihat Callback Signature |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
orderNo | M | String | Merchant-unique id. Callback order utama dan sub-order memakai orderNo merchant asli yang sama. |
tradeNo | M | String | Smilepayz tradeNo untuk transaksi ini (order utama atau sub-order). Gunakan field ini untuk idempotency tingkat transaksi. |
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 untuk kredit ini (maks. 2 desimal). Sub-order memakai jumlah yang dikredit aktual. Lihat 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

