POST
/
v1
/
accounts
/
{account_number}
/
flush
curl --request POST \
  --url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts/{account_number}/flush \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'x-carbon-key: <x-carbon-key>' \
  --data '{
  "beneficiary": {
    "bank_code": "Provide bank code",
    "bank_name": "Provide bank name",
    "account_number": "Provide account number",
    "account_name": "Provide account name"
  },
  "reference": "Provide transaction reference"
}'
{
  "status": "success",
  "message": "payout was initiated successfully",
  "data": {
    "amount": 10000,
    "total": 10000,
    "fee": 0,
    "reference": "12323E2445567786989090",
    "payment_reference": "206184559544833",
    "beneficiary": {
      "bank_code": "565",
      "bank_name": "CARBON",
      "account_number": "2499384072",
      "account_name": "CARBON BUSINESS DEMO - TAX"
    }
  }
}

Overview

This endpoint flushes the balance of an account to another account.

Request

Method: POST
URL: /v1/accounts/{account_number}/flush

Parameters

NameInTypeRequiredDescription
x-carbon-keyHeaderstringYesAPI key for authentication.
account_numberPathintegerYesThe account number to flush.

Request Body

{
  "beneficiary": {
    "bank_code": "565",
    "bank_name": "CARBON",
    "account_number": "2499384072",
    "account_name": "CARBON BUSINESS DEMO - TAX"
  },
  "reference": "12323E2445567786989090"
}

Response

Status Code: 201 Created
Content-Type: application/json

Example Response

{
  "status": "success",
  "message": "Payout was initiated successfully",
  "data": {
    "amount": 10000,
    "total": 10000,
    "fee": 0,
    "reference": "12323E2445567786989090",
    "payment_reference": "206184559544833",
    "beneficiary": {
      "bank_code": "565",
      "bank_name": "CARBON",
      "account_number": "2499384072",
      "account_name": "CARBON BUSINESS DEMO - TAX"
    }
  }
}

Authorizations

apikey
string
header
required

Provide your API key in the 'apikey' header.

Headers

x-carbon-key
string
required

Path Parameters

account_number
integer
required

Body

application/json
Provide the required values for the request body.
beneficiary
object
required
reference
string
required

Provide transaction reference

Response

201 - application/json
Created

The response is of type object.