Payout

Payout API is divided into an API that manages sub-mall information and an API that is used to remittance to a registered sub-mall. Register the sub-mall information and request Payout API to send the amount to the sub-mall.

Payout API is available after a separate contract.

Register for sub-mall

Register for sub-mall by using sub-mall registration API. You need to request sub-mall information with bank account.

request
                  
curl -X POST --location "https://api2-stg.eximbay.com/v1/payouts/submalls" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Basic dGVzdF8xODQ5NzA1QzY0MkMyMTdFMEIyRDo=" \
-d "{
        \"submall_id\" : \"36\",
        \"submall_type\" : \"COMPANY\",
        \"country_code\" : \"KR\",
        \"submall_name\" : \"Test\",
        \"business_id\"  : \"354\",
        \"representative\" : \"Tester\",
        \"bank_account\" : [
            {
                \"currency\" : \"KRW\",
                \"country_code\" : \"KR\",
                \"bank_code\" : \"003\",
                \"bank_name\" : \"woori\",
                \"account_number\" : \"123\",
                \"depositor\" : \"tester\"
            }
        ],
        \"metadata\" : \"test\"
    }"
                  
                

Also, you can modify or delete sub-mall information with adding submall_id in the Path parameter. For more information about modify or delete sub-mall information, refer to Payout API.

Send money to sub-malls

You can check the balance before request payout by using retrieve balance API. The balance must be bigger than the amount requested for payout.

request
                  
curl -X POST --location "https://api2.eximbay.com/v1/payouts/" 
-H "accept: application/json" 
-H "Content-Type: application/json" 
-H "Authorization: Basic dGVzdF8xODQ5NzA1QzY0MkMyMTdFMEIyRDo=" 
-d "{
      \"submall_id\": 35,
      \"bank_account_id\": 5,
      \"payout_dt\": \"20220930\",
      \"currency\" : \"KRW\",
      \"amount\" : \"10000\"
    }"
                  
                

If request of payout is successful, an array containing Payout objects is returned with response code 0000 as shown below. Cancellation of requested payout is possible until midnight one day before payout_dt.

response
                  
{
  "code": "0000",
  "message": "Success",
  "response": {
    "transaction_id": "test2022092800105942001",
    "bank_name": "woori",
    "account_number": "123",
    "depositor": "tester",
    "transaction_dt": null,
    "cancellable_dt": "2022-09-29 23:59:59",
    "fee": null,
    "status": "REQUESTED",
    "payout": {
      "submall_id": "35",
      "bank_account_id": 5,
      "payout_dt": "2022-09-30 11:00:00",
      "currency": "KRW",
      "amount": 10000,
      "statement_descriptor": null,
      "callback_url": null,
      "description": null,
    }
	}
}