Skip to content

Create Payin Order

API EndPoint

POST baseUrl + /api/payIn

Request Parameters

ParameterRequiredTypeDescriptionExample
currencyYstring(32)Currency codePHP
payTypeYintPay product typePayin PayType Enum
amountYdecimal(20,2)Amount100-50000
reusableStatusYbooleanMultiple paymentsCurrently it can only be false
mchOrderNoYstring(32)Merchant order number
expireTimeYlongExpiration timeExpiration time, Some payment products support
notifyUrlYstring(250)Webhooks url
nonceStrYstring(32)Random string
remarkYstring(32)RemarkPlease use English characters
realNameYstring(32)Name of the payeefirstName-middleName-lastName
payerAddressYstring(256)Payee addressprovince-city-line1
phoneYstring(32)Payee phone09123456789
idTypeYstring(32)Payee IdTypePayer ID Type
idCardYstring(32)Payee Number
emailYstring(64)User emailexample@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

bash
curl -L 'baseUrl/api/payIn' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"realName":"Reza Wijaya","amount":"20000.00","reusableStatus":false,"payType":"43","expireTime":3600,"mchOrderNo":"1386556787811426305","notifyUrl":"https://merchant.com/webhooks/payin","currency":"IDR","remark":"Electronic Cigarettes","nonceStr":"16a5a70f43384134bfae33acc77132e0"}'

Response Parameters

ParameterTypeDescription
merchantIdlongMerchant id
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
amountdecimal(20,0)Amount
orderFeedecimal(20,0)Fee
payCodestring(32)payCode
billerstring(32)Receiving institution, used when receiving payment using refNo/bankVa
payUrlstring(250)Payment information display page/payment jump URL

Response Example

json
{
  "msg": "SUCCESS",
  "code": 200,
  "data": {
    "merchantId": "1002001",
    "mchOrderNo": "1386556787811426305",
    "orderNo": "PAYIN8551844049125523456",
    "payCode": "RN123456",
    "payUrl": "https://gcash.com/pay?bizNo=20241202111212800110166154827",
    "biller": "Gcash",
    "amount": "20000",
    "orderFee": "1700"
  }
}
json
{
  "msg": "Payin_Order_Error",
  "code": 500
}

TIP

Please use the payCode, biller, payUrl and other fields according to the actual selected PayType Enumeration. If you don't want to render the display information yourself, Cashy provides a display page, and merchants can use the payUrl field to jump directly to the page to display payment information for users. See the table below for the specific support list.

payType valuePayment product namepayCodepayUrlbiller
401QRPH_STATICOriginal QR code textDisplay page provided by CashyN/A
402QRPH_DYNAMICOriginal QR code textDisplay page provided by CashyN/A
403BANK_TRANSFER_INSTABank VA account numberDisplay page provided by CashyPayee
404BANK_TRANSFER_PESONETBank VA account numberDisplay page provided by CashyPayee
410RefNo (Bill Payment)Repayment codeDisplay page provided by CashyPayee, you need to inform the cashier when using it offline
431GCASH_WEB_ONLINEN/APayment URLN/A
432PAYMAYA_WEB_ONLINEN/APayment URLN/A
433COINS_WEB_ONLINEN/APayment URLN/A
434GRABPAY_WEB_ONLINEN/APayment URLN/A
435BPIA_WEB_ONLINEN/APayment URLN/A
436UBPB_WEB_ONLINEN/APayment URLN/A

Query Payin Order

API EndPoint

POST baseUrl + /api/payInQuery

Request Parameters

ParameterRequiredTypeExampleDescription
mchOrderNoNstring(32)1386556575370063873Merchant order number
orderNoNstring(32)PAYIN8551843837024997376Platform order number
nonceStrYstring(32)9459931608Random 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/payInQuery' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"mchOrderNo":"1386556575370063873","nonceStr":"9459931608","orderNo":"PAYIN8551843837024997376"}'

Response Parameters

ParameterTypeDescription
merchantIdintMerchant id
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
channelOrderNostring(32)Channel order number
payTypestring(32)Payin PayType Enum
payCodestring(32)Payment Code
payUrlstring(250)Payment url
amountdecimal(20,0)Amount
feedecimal(20,4)Fee
orderStatusstring(32)Payin Order Status Enum
completionTimeyyyy-MM-dd HH:mm:ssCompletion time

Response Example

json
{
  "msg": "SUCCESS",
  "code": 200,
  "data": {
    "merchantId": "1002001",
    "mchOrderNo": "1386556575370063873",
    "orderNo": "PAYIN8551843837024997376",
    "payType": "43",
    "payCode": "",
    "payUrl": "https://m.dana.id/link/pay?bizNo=202412021112128001101660361270",
    "payDeskUrl": "https://idpaydesk2.brcashypro.com/views/pay.html?PAYIN8551843837024997376",
    "amount": "20000",
    "fee": "1700",
    "orderStatus": "PAYING",
    "completionTime": null,
    "nonceStr": null
  }
}
json
{
  "msg": "SUCCESS",
  "code": 200,
  "data": {
    "merchantId": "1002001",
    "mchOrderNo": "1386556575370063873",
    "orderNo": "PAYIN8551843837024997376",
    "payType": "43",
    "payCode": "",
    "payUrl": "https://m.dana.id/link/pay?bizNo=202412021112128001101660361270",
    "payDeskUrl": "https://idpaydesk2.brcashypro.com/views/pay.html?PAYIN8551843837024997376",
    "amount": "20000",
    "fee": "1700",
    "orderStatus": "SUCCESS",
    "completionTime": "2024-12-02 15:40:50",
    "nonceStr": null
  }
}

Async Webhook Notification

The webhooks url is provided by the merchant

POST Merchant NotifyUrl

Webhook Request Parameters

ParameterTypeDescription
merchantIdintMerchant id
mchOrderNostring(32)Merchant order number
orderNostring(32)Platform order number
amountdecimal(20,2)Amount
feedecimal(20,4)Fee
orderStatusstring(32)Order status
payUrlstring(32)Payment url
payCodestring(32)Payment VA/QRCODE
payTypestring(32)Pay product type
completionTimeyyyy-MM-dd HH:mm:ssCompletion time
nonceStrstring(32)Random string

Webhook Request Example

bash
curl -L 'merchant.com/webhooks/payin' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"amount":20000.00,"completionTime":"2024-12-02 12:07:06","fee":2500.0000,"mchOrderNo":"1386503284355244033","merchantId":"1002001","nonceStr":"1733116026894","orderNo":"PAYIN8551790545658687488","orderStatus":"SUCCESS","payCode":"OR.GPNQR..INOPROID_BS","payType":"41","payUrl":"https://payurl.com"}'
json
{
  "amount": 20000.0,
  "completionTime": "2024-12-02 12:07:06",
  "fee": 2500.0,
  "mchOrderNo": "1386503284355244033",
  "merchantId": "1002001",
  "nonceStr": "1733116026894",
  "orderNo": "PAYIN8551790545658687488",
  "orderStatus": "SUCCESS",
  "payCode": "OR.GPNQR..INOPROID_BS",
  "payType": "41",
  "payUrl": "https://payurl.com"
}
json
{
  "amount": 20000.0,
  "completionTime": "2024-12-02 12:07:06",
  "fee": 2500.0,
  "mchOrderNo": "1386503284355244033",
  "merchantId": "1002001",
  "nonceStr": "1733116026894",
  "orderNo": "PAYIN8551790545658687488",
  "orderStatus": "FAIL",
  "payCode": "OR.GPNQR..INOPROID_BS",
  "payType": "41",
  "payUrl": "https://payurl.com"
}

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.