Skip to main content

API PAY-IN TRANSACTION

smilepayz teamsAbout 6 min

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

FieldRequiredTypeDescription
Content-TypeMStringHTTP content type specification
Fixed value: application/json
Required for proper request parsing
X-TIMESTAMPMStringISO 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-SIGNATUREMStringDigital signature for request authentication
See Signature Generation
X-PARTNER-IDMStringUnique merchant identifier assigned by the platform
Format: Alphanumeric string
Used for merchant authentication and transaction routing
Please enter merchantID

Body Parameters

FieldRequiredTypeDescription
orderNoMString(32)Unique transaction identifier
Format: Alphanumeric string (numbers and letters only)
Length: 6-32 characters
Must be unique across all transactions for the merchant
purposeMString(64)Transaction purpose or description
Format: UTF-8 encoded string
Maximum length: 64 characters
Used for transaction identification and reporting
merchantMObjectMerchant information container
Contains merchant identification and business details
See Merchant Model
    merchantIdMStringPrimary merchant identifier assigned by the platform
Format: Alphanumeric string
Used for merchant authentication and transaction routing
    merchantNameOStringMerchant business name for display purposes
Format: UTF-8 encoded string
Used for transaction identification and customer display
    subMerchantIdOStringSub-merchant identifier for multi-level merchant structures
Format: Alphanumeric string
Used for complex merchant hierarchies
    subMerchantNameOStringSub-merchant business name for display purposes
Format: UTF-8 encoded string
Used for transaction identification in multi-level structures
moneyMObjectTransaction amount and currency specification
Contains payment amount and currency details
See Money Model
    currencyMStringISO 4217 currency code specification
Fixed value: PEN (Peruvian Sol)
Determines payment processing rules and settlement currency
    amountMNumberTransaction amount in smallest currency unit
Format: Integer value
Example: 20000 represents PEN 20000
Range: 100-999999999
payerMObjectCustomer information container
Contains payer identification and contact details
See Payer Model
    nameMStringCustomer's full name for transaction identification
Format: UTF-8 encoded string
Used for transaction records and customer service
paymentMethodMStringPayment method for transaction processing
Format: Predefined payment method codes
Fixed value: CASHIER_PE
See Payment Method List
expiryPeriodONumberTransaction expiration time in seconds
Format: Integer value
Default: 3600 (1 hour)
Range: 300-86400 (5 minutes to 24 hours)
redirectUrlOString(256)Customer redirect URL after payment completion
Format: Valid HTTP/HTTPS URL
Maximum length: 256 characters
Used for post-payment customer experience
callbackUrlOString(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

Response

HTTP Response

FieldRequiredTypeDescription
Content-TypeMStringHTTP response content type specification
Fixed value: application/json
Indicates JSON response format
X-TIMESTAMPMStringISO 8601 datetime format with timezone offset
Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Example: 2020-12-17T10:55:00-05:00

Body Parameters

FieldRequiredTypeDescription
codeMStringAPI response status code indicating operation result
Format: Two-digit string
Success: "00", Error: Other codes
Used for programmatic response handling
messageMStringHuman-readable response status description
Format: UTF-8 encoded string
Provides detailed information about the operation result
Localized based on request language
orderNoMStringMerchant transaction identifier
Format: Alphanumeric string
Same as the orderNo provided in the request
Used for transaction tracking and reconciliation
merchantMObjectMerchant information container
Contains merchant identification and account details
See Merchant Model
    merchantIdMStringPrimary merchant identifier assigned by the platform
Format: Alphanumeric string
Used for merchant authentication and transaction routing
    merchantNameOStringMerchant business name for display purposes
Format: UTF-8 encoded string
Used for transaction identification and customer display
    subMerchantIdOStringSub-merchant identifier for multi-level merchant structures
Format: Alphanumeric string
Used for complex merchant hierarchies
    subMerchantNameOStringSub-merchant business name for display purposes
Format: UTF-8 encoded string
Used for transaction identification in multi-level structures
    accountNoOStringMerchant account number for transaction processing
Format: Alphanumeric string
Used for account identification and balance management
moneyMObjectTransaction amount and currency specification
Contains confirmed transaction amount and currency
See Money Model
    currencyMStringISO 4217 currency code specification
Fixed value: PEN (Peruvian Sol)
Determines payment processing rules and settlement currency
    amountMNumberTransaction amount in smallest currency unit
Format: Integer value
Example: 20000 represents PEN 20000
Range: 100-999999999
transactionTimeMStringTransaction processing timestamp
Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Example: 2020-12-17T10:55:00-05:00
Timezone: UTC-5 (Peru timezone)
channelMObjectPayment channel information container
Contains payment method and processing details
See Channel Model
    paymentMethodMStringPayment method used for transaction processing
Format: Predefined payment method codes
Example: CASHIER_PE
Indicates the actual payment channel used
    paymentUrlMStringPayment processing URL for customer completion
Format: Valid HTTP/HTTPS URL
Used for redirecting customers to complete payment
    additionalInfoOObjectAdditional payment channel information
Format: JSON object
Contains supplementary payment processing details
        paymentUrlOStringAlternative payment URL for specific payment methods
Format: Valid HTTP/HTTPS URL
Used for specialized payment processing flows
tradeNoOStringInternal transaction reference number
Format: System-generated alphanumeric string
Used for internal transaction management and support
statusOStringCurrent 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

Notification

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringHTTP content type specification
Fixed value: application/json
Required for proper request parsing
X-TIMESTAMPMStringISO 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-SIGNATUREMStringDigital signature for request authentication
See Callback Signature Verification

Body Parameters

FieldRequiredTypeDescription
orderNoMStringMerchant transaction identifier
Format: Alphanumeric string
Same as the orderNo provided in the original request
Used for transaction tracking and reconciliation
tradeNoMStringInternal transaction reference number
Format: System-generated alphanumeric string
Used for internal transaction management and support
merchantIdMStringPrimary merchant identifier assigned by the platform
Format: Alphanumeric string
Used for merchant authentication and transaction routing
merchantNameMStringMerchant business name for display purposes
Format: UTF-8 encoded string
Used for transaction identification and customer display
subMerchantIdOStringSub-merchant identifier for multi-level merchant structures
Format: Alphanumeric string
Used for complex merchant hierarchies
subMerchantNameOStringSub-merchant business name for display purposes
Format: UTF-8 encoded string
Used for transaction identification in multi-level structures
paymentMethodMStringPayment method used for transaction processing
Format: Predefined payment method codes
Example: CASHIER_PE
Indicates the actual payment channel used
See Payment Method List
transactionTimeMStringTransaction processing timestamp
Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Example: 2020-12-17T10:55:00-05:00
Timezone: UTC-5 (Peru timezone)
statusMStringCurrent transaction processing status
Format: Predefined status codes
Examples: PROCESSING, SUCCESS, FAILED, CANCELLED
Indicates the current state of the transaction
See Status Model
moneyMObjectTransaction amount and currency specification
Contains confirmed transaction amount and currency
See Money Model
    currencyMStringISO 4217 currency code specification
Fixed value: PEN (Peruvian Sol)
Determines payment processing rules and settlement currency
    amountMNumberTransaction amount in smallest currency unit
Format: Integer value
Example: 20000 represents PEN 20000
Range: 100-999999999
payerOObjectCustomer 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"
}
Last update: