Transaction Split Payment
Merchant can use transaction Split API to split the payment between two or more merchants so that payout could happen in the respective merchant's account without any hassle. Transaction Split Payments are available only in our Redirect Flow.
To use split functionality, all merchants need to be onboarded on Zaakpay and should have their own credentials.
There can be only one main Merchant and multiple sub Merchants. Transaction will happen from the master Merchant and needs to be split into multiple non-master Merchants. Payouts will happen directly to accounts linked with non-master Merchants on Zaakpay.
Master Merchant can see the transaction in the Zaakpay dashboard in the Transactions Detail Panel.
Payout Data can be seen in the respective Payout Panel in the dashboard.
There are 2 steps to initiate a transaction Split API.
Step 1: Token generation for Split Payment
Test Server
https://zaakstaging.zaakpay.com/api/payment/v1/initiate
Live Server
https://api.zaakpay.com/api/payment/v1/initiate
{SERVER} api / payment/v1/initiate
Request Parameters
Parameter | Type | Optional/ Mandatory | Validation | Allowed Values |
---|---|---|---|---|
merchantIdentifier | String | M | alphanumeric | Zaakpay’s unique identifier for your website. |
orderId | String | M | max 40 alphanumeric,must be unique per website, we do not accept duplicate **Advice: Orderid should be an alphanumeric value eg: ZAAK20170421 | Your unique transaction identifier. |
returnUrl | String | O | This must be the domain(or a sub- domain of it) you saved under My Account>Integration | Url where you want MobiKwik Payment Gateway to post the response |
showMobile | String | O | false:We show the full-fledged version unconditionally. DETECT:We do detection of the user Agent of the browser from which the request is sent & route accordingly. true:We show the mobile page unconditionally. missing/not sent: Same as DETECT (i.e. We do detection at our end ). | Only allowed value is “true” if you want MobiKwik Payment Gateway to represent mobile view |
txnType | String | O | Numeric: MobiKwik Payment Gateway will show the tab on the payment page which corresponds to the txnType you provide | 1-ALL 11 - CARD 12 - NETBANKING 13 - WALLETS 14 - UPI 15 - CCONLY - Only allow Credit Cards 16 - DCONLY - Only allow Debit Cards 17 - EZEClick 18 - ATM+PIN 19 - MasterPass 20 - EMI |
zpPayOption | String | O | Which MobiKwik Payment Gateway option have you used for this transaction. 1 digit only, numeric Default value is 1. | 0 = on_zaakpay, 1 = button_redirect, 2 = widget_redirect, 3 = api |
mode | String | O | 1 digit only, numeric | 1 = Domain check, 0 = Domain check skip |
currency | String | M | INR | |
amount | String | M | Value in paisa. Min 100 paise Max 10000000. Amount limit saved under Transaction Limit in your Zaakpay panel. | |
merchantIpAddress | String | O | buyer’s IP address as recorded by your website | |
purpose | String | O | Min and max numeric 1 digit. You must specify the purpose of the transaction | 0 = Service, 1 = Goods, 2 = Auction, 3 = Other |
txnDate | String | O | Transaction date in yyyy-mm-dd format | 2020-10-09 |
productInfo | String | O | To show order details with Offers on MobiKwik Payment Gateway Payment Page. | productInfo= "customizationField":"Cashback" , "listProduct": [ "description" :"Apollo Health Insurance", "cost":"Rs. 80,000.00", "customizationVal ue":"Rs. 8,123.00" ], "terms":"Cashback will get credited in MobiKwik Wallet" |
buyerEmail | String | M | valid email address of the buyer | [email protected] |
buyerPhoneNumber | String | O | buyer’s landline or mobile phone number, numeric only, no dashes,no spaces | eg.1234567789 |
productDescription | String | O | Text description of what you are selling. At Least 1 product description is mandatory to show in the bill on payment page. free text alphanumeric 100 max | e.g. name of book, name of mobile etc. e.g. Rs 199 Godzilla Movie DVD |
merchantAmount | String | M | amount to be split for each merchant in paisa | |
isMasterMerchant | Boolean | M | true for master , false for submerchants | true/false |
Response Parameters
Parameters | Description |
---|---|
success | If all goes right, it will return true else false. |
statusCode | All valid HTTP status codes, Ex: 404, 503,401,etc |
data | Data will be received in JSON format: |
Sample Request
Method : POST
Header : X-API-KEY
Body :
{
"merchantIdentifier": "b6415a6443604ec59644a70c8b25a0f6",
"orderId": "ZPLive1597143965280",
"returnUrl": "",
"showMobile": "DETECT",
"txnType": "1",
"zpPayOption": "1",
"mode": "0",
"currency": "INR",
"amount": "1463",
"merchantIpAddress": "127.0.0.1",
"purpose": "1",
"txnDate": "2020-08-11",
"productInfo": "",
"productDescription": "Zaakpay subscription fee"
"billingAddress": {
"buyerEmail": "[email protected]",
"buyerPhoneNumber": ""
},
"splitDetails": [
{
"merchantIdentifier": "b6415a6443604ec59644a70c8b25a0f6",
"merchantAmount": "1000",
“isMasterMerchant”: true
},
{
"merchantIdentifier": "b6415a6443604ec59644a70c8b25a0f5",
"merchantAmount": "463",
“isMasterMerchant”: false
}
]
}
curl --location --request POST 'https://staging3-api.zaakpay.com/api/payment/v1/initiate' \
--header 'X-API-KEY: 5d5adbadf57246b1925a9afca08c05fa' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
"orderId": "daksh0014",
"returnUrl": "",
"showMobile": "",
"txnType": "",
"zpPayOption": "",
"mode": "",
"currency": "INR",
"amount": "1463",
"merchantIpAddress": "",
"purpose": "",
"txnDate": "",
"productInfo": "",
"billingAddress": {
"buyerEmail": "[email protected]",
"buyerPhoneNumber": ""
},
"productDescription": "abc",
"splitDetails": [
{
"merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
"merchantAmount": "0",
"isMasterMerchant": true
},
{
"merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
"merchantAmount": "463",
"isMasterMerchant": false
},
{
"merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
"merchantAmount": "1000",
"isMasterMerchant": false
}
]
}'
{
"success": true,
"message": {
"code": "1001",
"text": "Success"
},
"data": {
"token": "ZGFrc2gwMDE0NWMyZjE4NjQtOWYwOC00YWY3LTkx"
}
}
{
"success": false,
"message": {
"code": "129",
"text": "OrderId field missing or blank."
}
}
Step 2: API for Initiating Split Payment Page
Use token received from Step 1(API For Initiating Payment) in this request. This is a GET API and this API will redirect the user to Zaakpay Payment Page.
Test Server
https://zaakstaging.zaakpay.com/api/payment/v1/page/TOKEN
Live Server
https://api.zaakpay.com/api/payment/v1/page/TOKEN
Sample Request
Method : GET
Response: Payment Page
curl --location --request GET 'http://zaakpaystaging.zaakpay.com/api/payment/v1/page/WmFhazEyM0Rha3NoMTIzM2VkZDM2Yj' \
--header 'X-API-KEY: 5d5adbadf57246b1925a9afca08c05fad04'
Server to Server Callback Response
For Success
{
"merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
"txns": [
{
"amount": "10500",
"pgTransId": "ZP91569b1b6526",
"orderId": "de9c2c082be802cfc833",
"paymentMode": "Debit Card",
"cardScheme": "Visa",
"product3Description": "NA",
"cardToken": "4012 XXXX XXXX 1881",
"responseCode": "100",
"bank": "NA",
"bankid": "NA",
"doRedirect": "false",
"product1Description": "NA",
"product4Description": "NA",
"responseDescription": "The transaction was completed successfully. ",
"cardId": "bce8e4e1e66520cb0bc2bf3a0e760412d53273a844bf0931f2b3136a2ee0ada3~1",
"cardhashid": "CH101",
"paymentMethod": "401288",
"product2Description": "NA",
"pgTransTime": "08/21/2020 17:37:31",
"txnDate": "2020-08-21 17:37:31.891",
"productDescription": "NA",
"splitDetails": [
{
"merchantIdentifier": "b6415a6443604ec59644a70c8b25a0f6",
"merchantAmount": 0,
"subTransactionId": "ZP59360693d8168_1_1"
},
{
"merchantIdentifier": "b6415a6443604ec59644a70c8b25a0f6",
"merchantAmount": 1000,
"subTransactionId": "ZP59360693d8168_1_2"
},
{
"merchantIdentifier": "b6415a6443604ec59644a70c8b25a0f6",
"merchantAmount": 463,
"subTransactionId": "ZP59360693d8168_1_3"
}
]
}
]
}
{
"merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
"txns": [
{
"amount": "100",
"pgTransId": "ZP5ac485746a265",
"orderId": "ZP-TEST-15915973607990e",
"paymentMode": "unknown",
"cardScheme": "NA",
"cardToken": "NA",
"responseCode": "1021",
"bank": "NA",
"bankid": "NA",
"doRedirect": "false",
"responseDescription": "Minimum Transaction Limit is 9 Rupees ",
"cardId": "NA",
"cardhashid": "NA",
"paymentMethod": "Not Found",
"pgTransTime": "2020-07-08 17:29:45",
"txnDate": "2020-08-07 17:29:45.8",
"productDescription": "Testing Transact Basic"
}
]
}
Updated over 3 years ago