Create Payin Order
API EndPoint
POST baseUrl
+ /api/payIn
Request Parameters
Parameter | Required | Type | Description | Example |
---|---|---|---|---|
currency | Y | string(32) | Currency code | CLP |
payType | Y | int | Pay product type | Payin PayType Enum |
amount | Y | decimal(20,0) | Amount | 100-10000000 |
reusableStatus | Y | boolean | Multiple payments | Currently it can only be false |
mchOrderNo | Y | string(32) | Merchant order number (should be unique in the merchant system) | mch12345 |
expireTime | Y | long | Expiration time, default 3600 seconds | 3600 |
notifyUrl | Y | string(250) | webhooks (callback) address | https://merchant.com/webhooks |
nonceStr | Y | string(32) | Random string | 1863484722378907648 |
remark | Y | string(32) | Order remarks | remark |
realName | Y | string(32) | Payer Name | Jack |
phone | Y | string(32) | Payer phonenumber | 9712345678 |
email | Y | string(32) | Payer email | xyz@gamil.com |
idType | Y | string(32) | Payer ID Type pls refer toPayin Payer ID Type | |
idCard | Y | string(32) | Payer ID number |
TIP
Please note that when you choose to use an electronic wallet payment method such as MACH, 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 compatible processing URL SCHEME to launch the logic of App payment.
Request Example
curl -L 'baseUrl/api/payIn' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"amount":1000,"idType":1,"mchOrderNo":"order0000001","idCard":"154175105","remark":"payment","nonceStr":"1733739205347","realName":"CRISTIAN ALEJANDRO","reusableStatus":false,"expireTime":86399,"phone":"9728034619","notifyUrl":"https://test.com/clcashy/payin-notify","currency":"CLP","email":"D850@gmail.com"}'
2
3
4
5
Response Parameters
Parameter | Type | Description |
---|---|---|
merchantId | long | MerchantId |
mchOrderNo | string(32) | Merchant order number |
orderNo | string(32) | Platform order number |
amount | decimal(20,0) | Amount |
orderFee | decimal(20,0) | fee |
payCode | string(32) | Payment Code |
payUrl | string(250) | Payment Url |
Response Example
{
"msg": "SUCCESS",
"code": 200,
"data": {
"merchantId": "1002001",
"mchOrderNo": "order0000001",
"orderNo": "PAYIN0000000000001",
"payCode": "",
"payUrl": "https://m.dana.id/link/pay?bizNo=20241202111212800110166154827",
"payDeskUrl": "https://m.dana.id/link/pay?bizNo=20241202111212800110166154827",
"amount": "20000",
"orderFee": "1700"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"msg": "Payin_Order_Error",
"code": 500
}
2
3
4
TestCase
For payin transactions, please use the following cards for testing.
CardType | Card Info | Result |
---|---|---|
VISA | 4051 8856 0044 6623 CVV 123 | payment successful |
AMEX | 3700 0000 0002 032 CVV 1234 | payment successful |
MASTERCARD | 5186 0595 5959 0568 CVV 123 | payment failed |
Redcompra | 4051 8842 3993 7763 | payment successful |
Redcompra | 5186 0085 4123 3829 | payment failed |
Prepago VISA | 4051 8860 0005 6590 CVV 123 | payment successful |
Prepago MASTERCARD | 5186 1741 1062 9480 CVV 123 | payment failed |
When authenticating with RUT and key, you must use RUT 11.111.111-1
, clave 123
.
Query Payin Order
API EndPoint
POST baseUrl
+ /api/payInQuery
Request Parameters
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
mchOrderNo | N | string(32) | 1386556575370063873 | Merchant order number |
orderNo | N | string(32) | PAYIN8551843837024997376 | Platform order number |
nonceStr | Y | string(32) | 9459931608 | 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/payInQuery' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"mchOrderNo":"1386556575370063873","nonceStr":"9459931608","orderNo":"PAYIN8551843837024997376"}'
2
3
4
5
Response Parameters
Parameter | Type | Description |
---|---|---|
merchantId | int | Merchant id |
mchOrderNo | string(32) | Merchant order number |
orderNo | string(32) | Platform order number |
channelOrderNo | string(32) | Channel order number |
payType | string(32) | Payin PayType Enum |
payCode | string(32) | Payment Code |
payUrl | string(250) | Payment url |
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 |
Response Example
{
"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
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"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
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Async Webhook Notification
The webhooks url is provided by the merchant
POST Merchant NotifyUrl
Webhook Request Parameters
Parameter | Type | Description |
---|---|---|
merchantId | int | Merchant id |
mchOrderNo | string(32) | Merchant order number |
orderNo | string(32) | Platform order number |
amount | decimal(20,2) | Amount |
fee | decimal(20,4) | Fee |
orderStatus | string(32) | Order status |
payUrl | string(32) | Payment url |
payCode | string(32) | Payment VA/QRCODE |
payType | string(32) | Pay product type |
completionTime | yyyy-MM-dd HH:mm:ss | Completion time |
nonceStr | string(32) | Random string |
Webhook Request Example
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"}'
2
3
4
5
{
"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"
}
2
3
4
5
6
7
8
9
10
11
12
13
{
"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"
}
2
3
4
5
6
7
8
9
10
11
12
13
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