API PAY-IN TRANSACTION
Request
The Pay-In Transaction API enables merchants to initiate payment collection from customers through various payment methods. This API supports multiple payment channels including cash payments, bank transfers, and other local payment methods available in Peru.
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 | HTTP content type specification Fixed value: application/json Required for proper request parsing |
X-TIMESTAMP | M | String | ISO 8601 datetime format with timezone offset Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00-05:00 Note: Must be current server time within ±5 minutes |
X-SIGNATURE | M | String | Digital signature for request authentication See Signature Generation |
X-PARTNER-ID | M | String | Unique merchant identifier assigned by the platform Format: Alphanumeric string Used for merchant authentication and transaction routing Please enter merchantID |
Body Parameters
Field | Required | Type | Description |
---|---|---|---|
orderNo | M | String(32) | Unique transaction identifier Format: Alphanumeric string (numbers and letters only) Length: 6-32 characters Must be unique across all transactions for the merchant |
purpose | M | String(64) | Transaction purpose or description Format: UTF-8 encoded string Maximum length: 64 characters Used for transaction identification and reporting |
merchant | M | Object | Merchant information container Contains merchant identification and business details See Merchant Model |
merchantId | M | String | Primary merchant identifier assigned by the platform Format: Alphanumeric string Used for merchant authentication and transaction routing |
merchantName | O | String | Merchant business name for display purposes Format: UTF-8 encoded string Used for transaction identification and customer display |
subMerchantId | O | String | Sub-merchant identifier for multi-level merchant structures Format: Alphanumeric string Used for complex merchant hierarchies |
subMerchantName | O | String | Sub-merchant business name for display purposes Format: UTF-8 encoded string Used for transaction identification in multi-level structures |
money | M | Object | Transaction amount and currency specification Contains payment amount and currency details See Money Model |
currency | M | String | ISO 4217 currency code specification Fixed value: PEN (Peruvian Sol) Determines payment processing rules and settlement currency |
amount | M | Number | Transaction amount in smallest currency unit Format: Integer value Example: 20000 represents PEN 20000 Range: 100-999999999 |
payer | M | Object | Customer information container Contains payer identification and contact details See Payer Model |
name | M | String | Customer's full name for transaction identification Format: UTF-8 encoded string Used for transaction records and customer service |
paymentMethod | M | String | Payment method for transaction processing Format: Predefined payment method codes Fixed value: CASHIER_PE See Payment Method List |
expiryPeriod | O | Number | Transaction expiration time in seconds Format: Integer value Default: 3600 (1 hour) Range: 300-86400 (5 minutes to 24 hours) |
redirectUrl | O | String(256) | Customer redirect URL after payment completion Format: Valid HTTP/HTTPS URL Maximum length: 256 characters Used for post-payment customer experience |
callbackUrl | O | String(256) | Webhook notification URL for transaction status updates Format: Valid HTTP/HTTPS URL Maximum length: 256 characters Used for asynchronous transaction notifications |
Important Notes
1. Transaction Uniqueness:
orderNo
must be unique across all transactions for your merchant account
2. Amount Format: All amounts are specified in the smallest currency unit (e.g., 20000 = PEN 200.00)
3. Timezone: All timestamps use UTC-5 (Peru timezone)
4. Payment Method: Currently supports CASHIER_PE for cash payment collection
5. Expiration: Transactions automatically expire if not completed within the specified period
Example Body – Transaction Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-05:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001
{
"merchant": {
"merchantId": "20011"
},
"payer": {
"idType": "DNI",
"identity": "48982488880",
"name": "Carlos Rodriguez Mendoza",
"phone": "51987654321",
"email": "[email protected]"
},
"money": {
"amount": 20000,
"currency": "PEN"
},
"orderNo": "200110edbb466abb04682968b40",
"paymentMethod": "CASHIER_PE",
"purpose": "Payment for online purchase",
"redirectUrl": "https://www.example.com/success"
}
Response
HTTP Response
Field | Required | Type | Description |
---|---|---|---|
Content-Type | M | String | HTTP response content type specification Fixed value: application/json Indicates JSON response format |
X-TIMESTAMP | M | String | ISO 8601 datetime format with timezone offset Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00-05:00 |
Body Parameters
Field | Required | Type | Description |
---|---|---|---|
code | M | String | API response status code indicating operation result Format: Two-digit string Success: "00", Error: Other codes Used for programmatic response handling |
message | M | String | Human-readable response status description Format: UTF-8 encoded string Provides detailed information about the operation result Localized based on request language |
orderNo | M | String | Merchant transaction identifier Format: Alphanumeric string Same as the orderNo provided in the request Used for transaction tracking and reconciliation |
merchant | M | Object | Merchant information container Contains merchant identification and account details See Merchant Model |
merchantId | M | String | Primary merchant identifier assigned by the platform Format: Alphanumeric string Used for merchant authentication and transaction routing |
merchantName | O | String | Merchant business name for display purposes Format: UTF-8 encoded string Used for transaction identification and customer display |
subMerchantId | O | String | Sub-merchant identifier for multi-level merchant structures Format: Alphanumeric string Used for complex merchant hierarchies |
subMerchantName | O | String | Sub-merchant business name for display purposes Format: UTF-8 encoded string Used for transaction identification in multi-level structures |
accountNo | O | String | Merchant account number for transaction processing Format: Alphanumeric string Used for account identification and balance management |
money | M | Object | Transaction amount and currency specification Contains confirmed transaction amount and currency See Money Model |
currency | M | String | ISO 4217 currency code specification Fixed value: PEN (Peruvian Sol) Determines payment processing rules and settlement currency |
amount | M | Number | Transaction amount in smallest currency unit Format: Integer value Example: 20000 represents PEN 20000 Range: 100-999999999 |
transactionTime | M | String | Transaction processing timestamp Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00-05:00 Timezone: UTC-5 (Peru timezone) |
channel | M | Object | Payment channel information container Contains payment method and processing details See Channel Model |
paymentMethod | M | String | Payment method used for transaction processing Format: Predefined payment method codes Example: CASHIER_PE Indicates the actual payment channel used |
paymentUrl | M | String | Payment processing URL for customer completion Format: Valid HTTP/HTTPS URL Used for redirecting customers to complete payment |
additionalInfo | O | Object | Additional payment channel information Format: JSON object Contains supplementary payment processing details |
paymentUrl | O | String | Alternative payment URL for specific payment methods Format: Valid HTTP/HTTPS URL Used for specialized payment processing flows |
tradeNo | O | String | Internal transaction reference number Format: System-generated alphanumeric string Used for internal transaction management and support |
status | O | String | Current transaction processing status Format: Predefined status codes Examples: PROCESSING, SUCCESS, FAILED Indicates the current state of the transaction See Status Model |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-05:00
{
"channel": {
"additionalInfo": {
"paymentUrl": "https://pay-met.pe:8080/#/metodo-pago/VE9LRU4gR0VORVJBIFJFQ1VETzg5OTc0MA=="
},
"paymentMethod": "CASHIER_PE",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=1512001125042115424463245"
},
"code": "00",
"merchant": {
"accountNo": "11520011202402290943",
"merchantId": "20011",
"merchantName": "bradytest123www"
},
"message": "Successful",
"money": {
"amount": 20000,
"currency": "PEN"
},
"orderNo": "20011563d9094aa7d4d9e9b933bb",
"status": "PROCESSING",
"tradeNo": "1512001125042115424463245",
"transactionTime": "2025-04-21T03:42:47-05:00"
}
Notification
HTTP Request
Field | Required | Type | Description |
---|---|---|---|
Content-Type | M | String | HTTP content type specification Fixed value: application/json Required for proper request parsing |
X-TIMESTAMP | M | String | ISO 8601 datetime format with timezone offset Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00-05:00 Note: Must be current server time within ±5 minutes |
X-SIGNATURE | M | String | Digital signature for request authentication See Callback Signature Verification |
Body Parameters
Field | Required | Type | Description |
---|---|---|---|
orderNo | M | String | Merchant transaction identifier Format: Alphanumeric string Same as the orderNo provided in the original request Used for transaction tracking and reconciliation |
tradeNo | M | String | Internal transaction reference number Format: System-generated alphanumeric string Used for internal transaction management and support |
merchantId | M | String | Primary merchant identifier assigned by the platform Format: Alphanumeric string Used for merchant authentication and transaction routing |
merchantName | M | String | Merchant business name for display purposes Format: UTF-8 encoded string Used for transaction identification and customer display |
subMerchantId | O | String | Sub-merchant identifier for multi-level merchant structures Format: Alphanumeric string Used for complex merchant hierarchies |
subMerchantName | O | String | Sub-merchant business name for display purposes Format: UTF-8 encoded string Used for transaction identification in multi-level structures |
paymentMethod | M | String | Payment method used for transaction processing Format: Predefined payment method codes Example: CASHIER_PE Indicates the actual payment channel used See Payment Method List |
transactionTime | M | String | Transaction processing timestamp Format: yyyy-MM-ddTHH:mm:ss±HH:mm Example: 2020-12-17T10:55:00-05:00 Timezone: UTC-5 (Peru timezone) |
status | M | String | Current transaction processing status Format: Predefined status codes Examples: PROCESSING, SUCCESS, FAILED, CANCELLED Indicates the current state of the transaction See Status Model |
money | M | Object | Transaction amount and currency specification Contains confirmed transaction amount and currency See Money Model |
currency | M | String | ISO 4217 currency code specification Fixed value: PEN (Peruvian Sol) Determines payment processing rules and settlement currency |
amount | M | Number | Transaction amount in smallest currency unit Format: Integer value Example: 20000 represents PEN 20000 Range: 100-999999999 |
payer | O | Object | Customer information container Contains payer identification and contact details See Payer Model |
Return
Important Response Requirement
Notification Response: Please return only the string
SUCCESS
to acknowledge receipt of the notification
{
"merchantId": "20001",
"merchantName": "test",
"money": {
"amount": 20000,
"currency": "PEN"
},
"orderNo": "2000102900000000000001",
"status": "SUCCESS",
"tradeNo": "151200012410241325417215",
"transactionTime": "2020-12-17T10:55:00-05:00"
}
SUCCESS