Skip to content

Create Paydesk Order

  • Collection (cashier) aggregates all available payment methods.

HTTP Request

API EndPoint

POST baseUrl + /api/payDesk

Request Parameters

ParameterRequiredTypeDescriptionExample
mobileMoneyPhoneYstring(32)Mobile Wallet Number721323213
currencyYstring(32)Currency code(TZS)TZS
amountYdecimal(20,0)Integer, amount 500-50000001000
reusableStatusYboolean(false=Not allowed true=allow)false
mchOrderNoYstring(32)Merchant order number1386556787811426305
expireTimeYlongExpiration time, default 3600 seconds3600
notifyUrlYstring(250)webhooks (callback) addresshttps://merchant.com/webhooks
nonceStrYstring(32)Random string1863484722378907648
realNameYstring(32)Payer NameMaximum length is 64 charactersJeck
phoneYstring(32)Payer phonenumber255xxxxxxx
emailYstring(64)Payer emailexample@maildomain.com
idTypeNpls refer toPayin Payer ID TypePayer ID numberPayer ID type
idCardNstring(32)idCard Number
returnUrlNstring(250)Product subjecthttps://merchant.com/jump
remarkYstring(32)Order remarks

Request Example

bash
curl -L 'baseUrl/api/payDesk' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"nonceStr":"1733129817080","currency":"PHP","amount":1064800,"reusableStatus":false,"mchOrderNo":"1313066365288624128","expireTime":28982,"notifyUrl":"https://merchant.com/payIn/callback","remark":"payin order","realName":"HAMZAN WADI  ","phone":"87761734941","idType":"1","idCard":"5203092009900005"}'

Response Parameters

ParameterTypeDescription
merchantIdintMerchantId
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
amountdecimal(20,2)Amount
payUrlstring(250)Payment Url
expireTimedateexpire time

Response Example

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"
  }
}

Paydesk Order Query

HTTP Request

TIP

POST baseUrl + /api/payDeskQuery

Request Headers

HeaderNameRequiredValue
Content-TypeYapplication/json
MerchantIdYMerchantId
SignYSign

RequestBody

ParameterRequiredTypeExampleDescription
mchOrderNoNstring(32)1386556787811426305Merchant order number
orderNoNstring(32)PAYDESKxxxxxxxxxxPlatform order number
nonceStrYstring(32)1863484722378907648Random string

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
  }
}

PayDesk Order Query

API EndPoint

POST baseUrl + /api/payDeskQuery

Request Parameters

ParameterRequiredTypeExampleDescription
mchOrderNoNstring(32)1386556787811426305Merchant order number
orderNoNstring(32)PAYIN8551844049125523456Platform order number
nonceStrYstring(32)1863484722378907648Random string

TIP

We recommend using orderNo (platform order number) first. At least one of the platform order number and the Merchant order number must be passed.

Request Example

bash
curl -L 'baseUrl/api/payDeskQuery' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d ' {"mchOrderNo":"202411301909131862936942783582208","nonceStr":"1138688daof9gnay3dt9j4wktxt1z99ww"}'

Response Parameters

ParameterTypeDescription
merchantIdintMerchant id
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
amountdecimal(20,0)Amount
feedecimal(20,4)Fee
orderStatusstring(32)Payin Order Status Enum
completionTimeyyyy-MM-dd HH:mm:ssCompletion time
payCodestring(32)Payment account VA
payUrlstring(250)Payment QR code, some ways have QR code ,like QRIS
payDeskUrlstring(250)Payment Url

Response Example

json
{
  "msg": "SUCCESS",
  "code": 200,
  "data": {
    "merchantId": "3002112",
    "mchOrderNo": "202411301909131862936942783582208",
    "orderNo": "PAYDESK39568551277959484616704",
    "payUrl": "https://idpaydesk2.brcashypro.com/index.html?PAYDESK39568551277959484616704",
    "amount": "1000000",
    "fee": "0",
    "orderStatus": "PAYING",
    "completionTime": null,
    "nonceStr": null
  }
}

Async Webhook Notification

The webhooks url is provided by the merchant

POST Merchant NotifyUrl

Webhook Request Parameters

ParameterTypeDescription
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
amountdecimal(20,2)Amount
feedecimal(20,4)Fee
payUrlstring(250)Payment QR code, some ways have QR code ,like QRIS
orderStatusstring(32)Payin Order Status Enum
completionTimeyyyy-MM-dd HH:mm:ssCompletion time
nonceStrstring(32)Random string

Webhook Request Example

bash
curl -L 'merchant.com/webhooks/paydesk' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"amount":358320.00,"completionTime":"2024-12-02 12:07:06","fee":2500.0000,"mchOrderNo":"1313068703462109184","merchantId":"1002001","nonceStr":"1733116026894","orderNo":"PAYDESK27618551850988355260416","orderStatus":"SUCCESS","payCode":"OR.GPNQR..INOPROID_BS","payType":"41","payUrl":"https://payurl.com"}'
json
{
  "amount": 358320.0,
  "completionTime": "2024-12-02 16:08:32",
  "fee": 9083.0,
  "mchOrderNo": "1313068703462109184",
  "merchantId": "1002001",
  "nonceStr": "1733130512894",
  "orderNo": "PAYDESK27618551850988355260416",
  "orderStatus": "SUCCESS",
  "payUrl": "https://idpaydesk2.brcashypro.com/index.html?PAYDESK27618551850988355260416"
}
json
{
  "amount": 358320.0,
  "completionTime": "2024-12-02 16:08:32",
  "fee": 9083.0,
  "mchOrderNo": "1313068703462109184",
  "merchantId": "1002001",
  "nonceStr": "1733130512894",
  "orderNo": "PAYDESK27618551850988355260416",
  "orderStatus": "FAIL",
  "payUrl": "https://idpaydesk2.brcashypro.com/index.html?PAYDESK27618551850988355260416"
}

TIP

When the webhooks response HTTP status code is 200, 301 or 302, we believe that the merchant has successfully received and processed the callback. For other statuses, we believe that the merchant has failed to process the callback.

After the webhooks fails, it will be retried in 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 minutes, and the webhooks will be retried 10 times in total

Released under the MIT License.