Merchants with marketplace integration can quickly transfer sub-merchants' payments to their iyzico wallets.
How is this process started?
The merchant triggers the "settlement to balance" process. For this, a link or button is displayed to the sub-merchant on the website. This link is taken from iyzico service with a request.
As soon as sub-merchant clicks the link, he/she is directed to the iyzico's consumer page and logs into(or register) the iyzico system by phone / email.
The sub-merchant must enter the sms code sent to the mobile phone during the login.
The sub-merchant confirms that the he/she will take the settlement to the iyzico account. At this stage, the sub-merechant can decide whether all future payments will be settled to iyzico account or not.
When sub-merchant completes the process, he/she is directed to the callbackUrl address sent during the request.
The parameters that should be sent to the service are as follows:
Parameter | Data Type | Mandatory | Description |
---|---|---|---|
locale | string | No | Language settings (default: tr) |
conversationId | String | No | If set, conversation ID to match request and response |
subMerchantKey | string | Yes | Unique key value of the sub-merchant |
callbackUrl | string | Yes | Redirection URL |
price | string | Yes | Amount to be transferred to the iyzico account of the sub-merchant |
The parameters returned from the service are as follows:
Parameter | Type | Description |
---|---|---|
token | string | A unique value for settlement to balance process. This is also sent to callBackUrl |
url | string | The iyzico link to be shown to submerchant |
isSettingsAllTime | boolean | Speicifies if settlement will be done to iyizico account one time or . |
status | String | Service response result (success / failure) |
errorCode | String | Error code if service response status is failure |
errorMessage | String | Error message if service response status is failure |
errorGroup | String | Error group if service response status is failure |
locale | String | Language (default: tr) |
systemTime | Integer | Response system timestamp value |
conversationId | String | If set, conversation ID to match request and response |
$request = new \Iyzipay\Request\CreateSettlementToBalanceRequest();
$request->setSubMerchantKey("11654127");
$request->setCallbackUrl("https://www.callback");
$request->setPrice("0.1");
$settlementToBalance = \Iyzipay\Model\SettlementToBalance::create($request, Config::options());
request = {
subMerchantKey: 'qGtxC8fgykhJlH2afdAcxT0M3ls=',
callbackUrl: 'https://merchantwebsite.com',
price: '10',
locale: 'tr',
conversationId: '123456'
}
settlement_to_balance = Iyzipay::Model::SettlementToBalance.new.create(request, @options)
//Request
{
"subMerchantKey": "qGtxC8fgykhJlH2afdAcxT0M3ls=",
"callbackUrl": "https://merchantwebsite.com",
"price": "10",
"locale": "tr",
"conversationId": "123456"
}
//Response
{
"status": "success",
"locale": "tr",
"systemTime": 1470730913791,
"conversationId": "123456",
"token": "1sx2345wesdfasaSA",
"url": "https://sandbox-consumer.iyzico.com/xyz",
"isSettingsAllTime": 1
}
Sample Codes