Langsung ke konten utama

Pembayaran masuk (Pay-In · Thailand)

smilepayz teamsSekitar 3 menit

API pay-in wilayah Thailand (THB). Lihat Payment methods.

Request

POST/v2.0/transaction/pay-in

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-TIMESTAMPMStringFormat: yyyy-MM-ddTHH:mm:ss±HH:mm
X-SIGNATUREMStringSignature of JSON body (see product Signature doc).
X-PARTNER-IDMStringYour merchantID (alphanumeric).

Body Parameters

FieldRequiredTypeDescription
orderNoMString(32)Merchant-unique id, 6–32 alphanumeric.
purposeMString(64)Memo to payer, 1–64 UTF-8 chars.
merchantMObjectWraps merchantId and optional sub-merchant fields.
    merchantIdMStringSmilepayz merchantId for this call.
    merchantNameOStringUTF-8 merchant display name.
    subMerchantIdOStringSub-merchant ID.
    subMerchantNameOStringUTF-8 name for subMerchantId.
moneyMObjectCurrency plus amount for this transaction.
    currencyMStringFixed to THB.
    amountMNumberTHB amount as integer per channel rules.
payerMObjectPayer object per region rules (see Payer model).
    nameMStringBeneficiary full name (UTF-8).
    accountNoMStringSettlement accountNo if gateway returns it.
    bankNameMStringBank code (e.g. KBANK, BBL, SCB); see Payment methods doc.
paymentMethodMStringCode (see Payment methods doc).
expiryPeriodONumberSession TTL seconds, default 3600, max 86400 unless noted.
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

Responses

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringapplication/json request body.
X-TIMESTAMPMStringFormat: yyyy-MM-ddTHH:mm:ss±HH:mm

Body Parameters

FieldRequiredTypeDescription
codeMString00 success, other values error.
messageMStringUTF-8 human-readable result line.
orderNoMStringMerchant-unique id, 6–32 alphanumeric.
tradeNoOStringSmilepayz tradeNo for this order.
merchantMObjectWraps merchantId and optional sub-merchant fields.
    merchantIdMStringSmilepayz merchantId for this call.
    merchantNameOStringUTF-8 merchant display name.
    subMerchantIdOStringSub-merchant ID.
    subMerchantNameOStringUTF-8 name for subMerchantId.
moneyMObjectCurrency plus amount for this transaction.
    currencyMStringFixed to THB.
    amountMNumberTHB amount as integer per channel rules.
    payAmountONumberSettled amount after fees (decimal THB).
transactionTimeMStringyyyy-MM-ddTHH:mm:ss±HH:mm
channelMObjectChannel payload (paymentUrl, qrString, …).
    paymentMethodOStringCode (see Payment methods doc).
    paymentUrlMStringCashier URL to open for the payer.
    qrStringOStringPIX or channel copy-paste string if returned.
    receiverBankNameOStringBank code when channel is bank transfer.
    vaNumberOStringVA / reference when returned.
statusOStringOrder or payment status enum value.
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00

Notification/Callback

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringapplication/json request body.
X-TIMESTAMPMStringFormat: yyyy-MM-ddTHH:mm:ss±HH:mm
X-SIGNATUREMStringCallback body signature (see Callback signature guide).

Body Parameters

FieldRequiredTypeDescription
orderNoMStringMerchant-unique id, 6–32 alphanumeric.
tradeNoMStringSmilepayz tradeNo for this order.
merchantIdMStringSmilepayz merchantId for this call.
merchantNameMStringUTF-8 merchant display name.
subMerchantIdOStringSub-merchant ID.
subMerchantNameOStringUTF-8 name for subMerchantId.
paymentMethodMStringCode (see Payment methods doc).
transactionTimeMStringFormat: yyyy-MM-ddTHH:mm:ss
statusMStringOrder or payment status enum value.
moneyMObjectCurrency plus amount for this transaction.
    currencyMStringFixed to THB.
    amountMNumberTHB amount as integer per channel rules.
    payAmountONumberNet amount when returned.
payerOObjectPayer object per region rules (see Payer model).

Return

Important

Respond with the string SUCCESS only.

{
    "orderNo": "20001f7d65167e8b1419896f2dfb",
    "tradeNo": "111200012412151710505955",
    "merchantId": "20001",
    "merchantName": "test",
    "subMerchantId": "",
    "subMerchantName": "",
    "paymentMethod": "QRPAY",
    "transactionTime": "2024-12-15T17:10:51",
    "status": "SUCCESS",
    "money": {
        "currency": "THB",
        "amount": 150
    },
    "payer": {
        "name": "payerName",
        "accountNo": "*****25432"
    }
}
Terakhir diperbarui: