Skip to main content

API PAY-IN TRANSACTION

smilepayz teamsAbout 3 min

USDT region pay-in API (USDT). See Payment methods.

Request

The Pay-In API enables merchants to initiate payment collection transactions from customers. This API supports various
cryptocurrency payment methods for secure and efficient digital asset collection.

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-TypeMStringapplication/json request body.
X-TIMESTAMPMStringDatetime with zone offset, format yyyy-MM-ddTHH:mm:ss±HH:mm
X-SIGNATUREMStringSignature of JSON body (see product Signature doc).
X-PARTNER-IDMStringYour merchantID

Body Parameters

FieldRequiredTypeDescription
orderNoMString(32)Merchant-unique id
purposeMString(64)Memo to payer
merchantMObjectWraps merchantId and optional sub-merchant fields.
    merchantIdMStringSmilepayz merchantId for this call.
    merchantNameOStringMerchant display name.
    subMerchantIdOStringSub-merchant ID.
    subMerchantNameOStringName for subMerchantId.
moneyMObjectCurrency plus amount for this transaction.
    currencyMStringFixed to USDT.
    amountMNumberAmount
networkMStringBlockchain network specification for digital currency Format: Predefined network codes Examples: ERC20, BEP20, TRC20 Indicates the blockchain network for transaction processing
productDetailOString(128)Product or service description Format: UTF-8 encoded string Maximum length: 128 characters Used for transaction identification and reporting
paymentMethodOStringSee Payment methods doc.
expiryPeriodONumberExpiryPeriod, default 3600.
redirectUrlOString(256)HTTPS post-pay return URL, max 256 chars.
callbackUrlOString(256)HTTPS async status URL, max 256 chars.

Example Body – Transaction Request:

Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001

Response

HTTP Response

FieldRequiredTypeDescription
Content-TypeMStringapplication/json response or callback body.
X-TIMESTAMPMStringDatetime with zone offset, format yyyy-MM-ddTHH:mm:ss±HH:mm

Body Parameters

FieldRequiredTypeDescription
codeMString00 success, other values error.
messageMStringUTF-8 human-readable result line.
orderNoMStringMerchant-unique id
tradeNoOStringSmilepayz tradeNo for this order.
merchantMObjectWraps merchantId and optional sub-merchant fields.
    merchantIdMStringSmilepayz merchantId for this call.
    merchantNameOStringMerchant display name.
    subMerchantIdOStringSub-merchant ID.
    subMerchantNameOStringName for subMerchantId.
moneyMObjectCurrency plus amount for this transaction.
    currencyMStringFixed to USDT.
    amountMNumberAmount
transactionTimeMStringTransaction completion timestamp Format: yyyy-MM-ddTHH:mm:ss Example: 2024-12-17T10:55:00 Used for transaction timing and audit
channelMObjectChannel payload (paymentUrl, qrString, …).
statusOStringOrder or payment status enum value.
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00

Notification

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringapplication/json request body.
X-TIMESTAMPMStringDatetime with zone offset, format yyyy-MM-ddTHH:mm:ss±HH:mm
X-SIGNATUREMStringCallback body signature (see Callback signature guide).

Body Parameters

FieldRequiredTypeDescription
orderNoMStringMerchant-unique id
tradeNoMStringSmilepayz tradeNo for this order.
merchantIdMStringSmilepayz merchantId for this call.
merchantNameMStringOptional Merchant display name.
subMerchantIdOStringSub-merchant ID.
subMerchantNameOStringName for subMerchantId.
paymentMethodMStringSee Payment methods doc.
transactionTimeMStringTransaction completion timestamp Format: yyyy-MM-ddTHH:mm:ss Example: 2024-12-17T10:55:00 Used for transaction timing and audit
statusMStringOrder or payment status enum value.
moneyMObjectCurrency plus amount for this transaction.
    currencyMStringFixed to USDT.
    amountMNumberAmount
payerMObjectPayer object per region rules (see Payer model).

Return

Important Response

Notification Response: Please return only the string SUCCESS to acknowledge receipt of the notification

{
  "orderNo": "20001usdtwallet98b010db244c99d",
  "tradeNo": "3012003025112812141312194",
  "merchantId": "20001",
  "merchantName": "Smilepayz Demo Store",
  "subMerchantId": "",
  "subMerchantName": "",
  "paymentMethod": "WALLET",
  "transactionTime": "2024-11-19T12:51:47+07:00",
  "status": "SUCCESS",
  "money": {
    "currency": "USDT",
    "amount": 100
  },
  "payer": {
    "name": "Demo Payer",
    "email": "[email protected]"
  }
}