跳至主要內容

Pay-in collection

大约 1 分钟

Pakistan region pay-in API (PKR). See 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 (Pakistan +05:00).
X-SIGNATUREMStringSignature of JSON body (see product Signature doc).
X-PARTNER-IDMStringYour merchantID.

Body Parameters

FieldRequiredTypeDescription
orderNoMString(32)Merchant-unique id.
purposeMString(64)Transaction memo.
merchantMObjectMerchant information.
    merchantIdMStringSmilepayz merchantId.
moneyMObjectCurrency and amount.
    currencyMStringFixed to PKR.
    amountMNumberAmount in PKR.
paymentMethodMStringSee Payment methods.
payerOObjectPayer information.
    nameOStringPayer name.
    phoneOStringPayer mobile number.
redirectUrlOString(256)Post-pay return URL.
callbackUrlOString(256)Async status URL.

Example Body

{
    "orderNo": "PKR_PAYIN_10001",
    "purpose": "Pakistan wallet pay-in",
    "merchant": {
        "merchantId": "20001"
    },
    "money": {
        "currency": "PKR",
        "amount": 1000
    },
    "paymentMethod": "JAZZCASH",
    "payer": {
        "name": "Ali Khan",
        "phone": "03001234567"
    },
    "redirectUrl": "https://www.example.com/success",
    "callbackUrl": "https://www.example.com/callback"
}

Responses

FieldRequiredTypeDescription
codeMString00 success, other values error.
messageMStringResult message.
orderNoMStringMerchant order number.
tradeNoOStringSmilepayz trade number.
money.currencyMStringPKR.
money.amountMNumberOrder amount.
channel.paymentMethodOStringPayment method used.
channel.paymentUrlOStringHosted payment URL when returned.
statusOStringINIT, PROCESSING, SUCCESS, FAILED, or EXPIRED.

Notification/Callback

Callback signature differs from request signature

Do not verify callback X-SIGNATURE with the request-signing formula. See Callback Signature.

Respond with the string SUCCESS only after the callback is accepted.