> For the complete documentation index, see [llms.txt](https://edrus.gitbook.io/appgregator-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edrus.gitbook.io/appgregator-api-docs/appgregators/finance/flip-indonesia/sandbox/money-transfer/create-disbursement.md).

# Create disbursement

create a common disbursement transaction

### Attributes

<table><thead><tr><th>ATTRIBUTE</th><th>TYPE</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>account_number</td><td>Number</td><td>The account number of the recipient</td></tr><tr><td>bank_code</td><td>String</td><td>Bank code of the recipient bank . Example : bca (<mark style="color:blue;">case sensitive require</mark>)</td></tr><tr><td>amount</td><td>Number</td><td>The amount of money to be disbursed</td></tr><tr><td>remark</td><td>String</td><td>Remark to be included in the transfer made to the recipient. Usually will appear as <code>berita transfer</code> or <code>remark</code> in the transfer receipt. Max length for this attribute is <strong>18</strong> character</td></tr><tr><td>recipient_city</td><td>String (optional)</td><td>City code of the recipient city. Available value can be retrieved from <a href="https://doc.appgregator.co/appgregators/finance/flip-indonesia/sandbox/money-transfer/list-of-available-city">city list</a></td></tr><tr><td>beneficiary_email</td><td>String</td><td><p>List of the recipient emails (separated by comma). Example </p><pre><code>"test@mail.com,user@mail.com"
</code></pre><p> </p></td></tr><tr><td>idempotency_key</td><td>String</td><td>your key</td></tr></tbody></table>

<mark style="color:green;">`POST`</mark> `https://us-central1-appgregator.cloudfunctions.net/flipSandbox/disbursement/create/`

#### Query Parameters

| Name                                               | Type   | Description  |
| -------------------------------------------------- | ------ | ------------ |
| name<mark style="color:red;">\*</mark>             | String | ft-4         |
| connection\_name<mark style="color:red;">\*</mark> | String | flip-entre-1 |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | U2FsdGVk... |

{% tabs %}
{% tab title="201: Created Success" %}

```javascript
{
    "id": 42613,
    "user_id": 423304,
    "amount": 10000,
    "status": "PENDING",
    "reason": "",
    "timestamp": "2022-07-22 16:44:36",
    "bank_code": "bca",
    "account_number": "5465327020",
    "recipient_name": "",
    "sender_bank": "bca",
    "remark": "some remark",
    "receipt": "",
    "time_served": "(not set)",
    "bundle_id": 0,
    "company_id": 5770,
    "recipient_city": 391,
    "created_from": "API",
    "direction": "DOMESTIC_TRANSFER",
    "sender": null,
    "fee": 4000,
    "beneficiary_email": "test@mail.com,user@mail.com",
    "idempotency_key": "JYsyd..."
}
```

{% endtab %}

{% tab title="400: Bad Request Bad request" %}

```javascript
Request failed with status code 422
```

{% endtab %}
{% endtabs %}

<details>

<summary>Body JSON</summary>

```shell
{
    "account_number" : 4210343721,
    "bank_code" : "bca",
    "amount" : 20000,
    "remark" : "testing",
    "beneficiary_email" : "testing@gmail.com",
    "recipient_city" : "109",
    "idempotency_key" : "JYsyd..."
}
```

</details>

{% tabs %}
{% tab title="cURL" %}

```shell
curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/flipSandbox/disbursement/create?name=ft-4&connection_name=flip-entre-1' \
--header 'x-api-key: U2FsdGVk...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "account_number" : 4210343721,
    "bank_code" : "bca",
    "amount" : 20000,
    "remark" : "testing",
    "beneficiary_email" : "testing@gmail.com",
    "recipient_city" : "109",
    "idempotency_key" : "JYsyd5to..."
}'
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "account_number": 4210343721,
  "bank_code": "bca",
  "amount": 20000,
  "remark": "testing",
  "beneficiary_email": "testing@gmail.com",
  "recipient_city": "109",
  "idempotency_key": "JYsyd5to..."
});

var config = {
  method: 'post',
  url: 'https://us-central1-appgregator.cloudfunctions.net/flipSandbox/disbursement/create?name=ft-4&connection_name=flip-entre-1',
  headers: { 
    'x-api-key': 'U2FsdGVk...', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/flipSandbox/disbursement/create?name=ft-4&connection_name=flip-entre-1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "account_number" : 4210343721,
    "bank_code" : "bca",
    "amount" : 20000,
    "remark" : "testing",
    "beneficiary_email" : "testing@gmail.com",
    "recipient_city" : "109",
    "idempotency_key" : "JYsyd5to..."
}',
  CURLOPT_HTTPHEADER => array(
    'x-api-key: U2FsdGVk...',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}
