Split payment allows splitting of total processed amount between multiple accounts, or all processed amount to be domiciled in one account only. Bear in mind the instruction to SPLIT or not is sent from you to the WebPAY Service to execute.
The Total split amount should be equal to the transaction amount in the request and the primary account and sub-account should be specified using the split accounts JSON list. Please note the transaction amount will be removed from the primary account.
Request Message Description
Field # | Field name | Data type | Required | Description |
1 | site_redirect_url | String | Y | merchant’s website redirect url |
2 | pay_item_id | String | Y | payable_code |
3 | txn_ref | String | Y | transaction reference |
4 | amount | String | Y | amount |
5 | currency | String | Y | currency of transaction (Naira = 566, USD = 840) |
6 | cust_name | String | Y | merchant customer name |
7 | cust_id | String | N | merchant customer id |
8 | pay_item_name | String | Y | name of the item being paid for |
9 | merchant_code | String | N | merchant_code |
10 | split_account | String | Y | split accounts list |
a | alias | String | Y | alias of settlement account where transaction should be split to |
b | amount | String | Y* | amount to be split into this account. should be an empty string if percentage field is specified |
c | percentage | String | Y* | percentage of transaction amount to be split into account. should be empty string if item_amt field is specified |
d | primary | String | Y* | identifies account for fee deduction (can only be set to true on one account). |
e | description | String | N | a brief description for each split instruction |
Sample Post Form
<form method='post' action='https://sandbox.interswitchng.com/collections/w/pay'>
<input name='site_redirect_url' value='www.happysana.com/redirect/' />
<input name='pay_item_id' value='2674246' />
<input name='txn_ref' value='1559290858392' />
<input name='amount' value='10000' />
<input name='currency' value='566' />
<input name='cust_name' value='happysana' />
<input name='cust_id' value='0000000001' />
<input name='pay_item_name' value='AVASyn' />
<input name='display_mode' value='PAGE' />
<input name='merchant_code' value='WEBDEMO' />
<input name='split_accounts' value= '[{"alias":"WEB_SPLIT_1","percentage":"60","description":"tuition","isPrimary":"true"}, {"alias":"WEB_SPLIT_2","percentage":"30","description":"housing"},{"alias":"WEB_SPLIT_1","percentage":"10","description":"transport"}]' />
<input type='submit' value='Submit Form' />
</form>
Payment with SPLIT Instruction XML
Additional HTTP POST Fields
FIELD | DESCRIPTION | EXPECTED VALUE | FIELD |
---|---|---|---|
payment_params | For miscellaneous payment parameters | variable | alphanumeric |
xml_data | Any other data that needs to be sent will be packaged as xml and put in this field | variable | XML |
XML