Skip to content

Create Paydesk Order

  • 代收(收银台)聚合了所有开通的支付方式

HTTP Request

TIP

POST baseUrl + /api/payDesk

Request Headers

HeaderNameRequiredValue
Content-TypeYapplication/json
MerchantIdYMerchantId
SignYSign

RequestBody

参数名必选类型示例值字段说明
mobileMoneyPhoneYstring(32)721323213Mobile Wallet Number
currencyYstring(32)TZSCurrency code(TZS)
amountYdecimal(20,0)1000Integer, amount 500-5000000
reusableStatusYbooleanfalse(false=不允许 true=允许)目前只能是false
mchOrderNoYstring(32)P123456Merchant order number
expireTimeYlong3600Expiration time, default 3600 seconds
notifyUrlYstring(250)http://abc.com/webhooks (callback) address
nonceStrYstring(32)1628381288000Random string
realNameYstring(32)JeckPayer NameMaximum length is 64 characters
phoneYstring(32)255xxxxxxxPayer phonenumber
emailYstring(64)example@maildomain.comPayer email
idTypeNpls refer toPayin Payer ID TypePayer ID type
idCardNstring(32)Payer ID number
returnUrlNstring(250)http://abc.com/同步跳转地址
goodsSubjectNstring(32)appleProduct subject
goodsBodyNstring(32)appleProduct description
remarkYstring(32)remarkOrder remarks

TIP

注意回调/同步跳转地址仅支持https或者http协议的地址,如果地址是ip地址,请务必使用公网域名。

ResponseBodyDescription

json
{
  "msg": "SUCCESS",
  "code": 200,
  "data": {
    "merchantId": "100001",
    "mchOrderNo": "M165690800000001",
    "orderNo": "PAYDESKxxxxxxxxxxxxxxxxxx",
    "payUrl": "http://paydesk.testpage.com/PAYDESKxxxxxxxxxxxxxxx",
    "amount": "100000",
    "expireTime": "2022-12-06 17:48:40"
  }
}
ParameterTypeDescription
merchantIdintMerchantId
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
amountdecimal(20,2)Amount
payUrlstring(250)Payment Url
expireTimedateexpire time

Paydesk Order Query

HTTP Request

TIP

POST baseUrl + /api/payDeskQuery

Request Headers

HeaderNameRequiredValue
Content-TypeYapplication/json
MerchantIdYMerchantId
SignYSign

RequestBody

ParameterRequiredTypeExampleDescription
mchOrderNoNstring(32)P123456Merchant order number
orderNoNstring(32)PAYDESKxxxxxxxxxxPlatform order number
nonceStrYstring(32)1628381288000Random string

TIP

We recommend prioritizing the use of orderNo (platform order number), and at least one of the platform order number and merchant order number needs to be passed.

ResponseBody

json
{
  "msg": "SUCCESS",
  "code": 200,
  "data": {
    "merchantId": "100001",
    "mchOrderNo": "2a6421c4-3758-4d1a-b47e-f7d0e7133f9e",
    "orderNo": "PAYDESKxxxxxxxxxx",
    "payType": 154,
    "payUrl": "http://paydesk.testpage.com/PAYDESKxxxxxxxxxx",
    "amount": 10000.0,
    "fee": 0,
    "orderStatus": "PAYING",
    "completionTime": null
  }
}
ParameterTypeDescription
merchantIdintMerchantId
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
payTypeintPayment Product Type,pls refer topayin-paytype-enum
payUrlstring(250)Patment Url
amountdecimal(20,2)Amount
feedecimal(20,4)fee
orderStatusstring(32)Order StatusPaydesk Order Status Enum
completionTimedateComplete time

TIP

fee and completionTime have Value only when the order is successfully paid. completionTime has the format yyyy-MM-dd HH:mm:ss.

TIP

payType only has a value if the order was successfully paid.

Paydesk Order Async Webhook Notification

HTTP Request

TIP

POST Callback address notifyUrl for merchants to submit orders

Request Headers

HeaderNameRequiredValue
Content-TypeYapplication/json
MerchantIdYMerchantId
SignYSign

Async Webhook Notification

json
{
  "orderStatus": "SUCCESS",
  "amount": 10000.0,
  "fee": 0,
  "mchOrderNo": "2a6421c4-3758-4d1a-b47e-f7d0e7133f9e",
  "merchantId": "100001",
  "payType": 154,
  "orderNo": "PAYDESKxxxxxxxxxxx",
  "payUrl": "http://paydesk.testpage.com/PAYDESKxxxxxxxxxx",
  "completionTime": "2022-08-08 08:08:08",
  "nonceStr": "xxxxxxxxxx"
}
ParameterTypeDescription
merchantIdintMerchantId
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
payTypeintPayment Product Type,pls refer topayin-paytype-enum
amountdecimal(20,2)Amount
feedecimal(20,4)fee
payUrlstring(32)Payment Url
orderStatusstring(32)Order StatusPaydesk Order Status Enum
completionTimedateComplete time
nonceStrstring(32)Random string

TIP

fee and completionTime have Value only when the order is successfully paid. completionTime has the format yyyy-MM-dd HH:mm:ss.

TIP

Please respond SUCCESS for successful processing, otherwise we will consider the callback failed. If the callback fails, it will be retried in 1,2,4,8,16,32,64,128,256,512 minutes, and the callback will be retried 10 times in total.

Released under the MIT License.