Create Paydesk Order
API EndPoint
POST baseUrl
+ /api/payDesk
Request Parameters
Parameter | Required | Type | Description | Example |
---|---|---|---|---|
currency | Y | string(32) | Currency code | PHP |
amount | Y | decimal(20,0) | Amount | 100-5000000 |
reusableStatus | Y | boolean | Multiple payments | Currently it can only be false |
mchOrderNo | Y | string(32) | Merchant order number | |
expireTime | Y | long | Expire time | Default: 3600 seconds Only some payment products are supported |
notifyUrl | Y | string(250) | Webhooks url | |
nonceStr | Y | string(32) | Random string | |
remark | Y | string(32) | Remark | Please use English characters |
realName | Y | string(64) | User Name | firstName-middleName-lastName |
idType | Y | string(32) | Payer ID Type | Payer ID Type |
idCard | Y | string(32) | Payer ID Number | |
returnUrl | N | string(250) | Jump Url | Reserved field, not effective yet, will jump to this address after successful payment |
phone | N | string(32) | User phone number | 09123456789 |
email | N | string(64) | User email | example@maildomain.com |
INFO
Please use - to connect firstName, middleName, and lastName of realName. If there is no middleName, an empty string can be used instead.
INFO
Note that cashier collection only supports single repayment and fixed amount repayment products. If you need to use RefNo (BillPayments) and BankTransfer, please move to payin interface .
TIP
Please note that when you choose to use the e-wallet payment method, we will return to the payment landing page of the channel. The channel may choose to display the QR code or directly launch the APP payment based on the user's device environment. If you use the APP embedded webview technology solution to render the page, please pay attention to the logic of compatible processing URL SCHEME to launch the App payment.
Request Example
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
Parameter | Type | Description |
---|---|---|
merchantId | long | Merchant id |
mchOrderNo | string(32) | Merchant order number |
orderNo | string(32) | Platform order number |
amount | decimal(20,0) | Amount |
payUrl | string(250) | Payment Url |
expireTime | date | ExpireTime |
Response Example
{
"msg": "SUCCESS",
"code": 200,
"data": {
"merchantId": "1002001",
"mchOrderNo": "1313066365288624128",
"orderNo": "PAYDESK38318551848652059590656",
"payUrl": "https://paydesk.testpage.com/PAYDESK38318551848652059590656",
"amount": "100000",
"expireTime": "2022-12-06 17:48:40"
}
}
PayDesk Order Query
API EndPoint
POST baseUrl
+ /api/payDeskQuery
Request Parameters
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
mchOrderNo | N | string(32) | 1386556787811426305 | Merchant order number |
orderNo | N | string(32) | PAYIN8551844049125523456 | Platform order number |
nonceStr | Y | string(32) | 1863484722378907648 | Random 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
curl -L 'baseUrl/api/payDeskQuery' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d ' {"mchOrderNo":"202411301909131862936942783582208","nonceStr":"1138688daof9gnay3dt9j4wktxt1z99ww"}'
Response Parameters
Parameter | Type | Description |
---|---|---|
merchantId | int | Merchant id |
mchOrderNo | string(32) | Merchant order number |
orderNo | string(32) | Platform order number |
amount | decimal(20,0) | Amount |
fee | decimal(20,4) | Fee |
orderStatus | string(32) | Payin Order Status Enum |
completionTime | yyyy-MM-dd HH:mm:ss | Completion time |
payCode | string(32) | Payment account VA |
payUrl | string(250) | Payment QR code, some ways have QR code ,like QRIS |
payDeskUrl | string(250) | Payment Url |
Response Example
{
"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
Parameter | Type | Description |
---|---|---|
mchOrderNo | string(32) | Merchant order number |
orderNo | string(32) | Platform order number |
amount | decimal(20,2) | Amount |
fee | decimal(20,4) | Fee |
payUrl | string(250) | Payment QR code, some ways have QR code ,like QRIS |
orderStatus | string(32) | Payin Order Status Enum |
completionTime | yyyy-MM-dd HH:mm:ss | Completion time |
nonceStr | string(32) | Random string |
Webhook Request Example
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"}'
{
"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"
}
{
"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