# Calculate a Mass Payout Cost

Request to calculate the total cost of mass payout.

<mark style="color:green;">POST</mark> [<mark style="color:$primary;">https://app.goodpayments.io/v1/api/payment/create</mark>](https://app.goodpayments.io/v1/api/payment/create)

### Headers&#x20;

| Name            | Type   | Description             | Example                                                          |
| --------------- | ------ | ----------------------- | ---------------------------------------------------------------- |
| Authorization\* | string | Unique Merchant API Key | 94a48138b1f41b9cdb3e12c2ff0c7cbe1c7a5f50a311a5054b903cad84215662 |

### Request Body

| Name              | Type   | Description                                                                                                  | Example |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------ | ------- |
| target\_wallets\* | object | An object containing a list of addresses and the amount to be sent to each address                           |         |
| currency\*        | string | <p>List of accepted tokens. Possible values:</p><ul><li><code>TRX</code></li><li><code>USDT</code></li></ul> | USDT    |

### **Request** **Example**

```yaml
curl -X 'POST' \
  'https://app.goodpayments.io/v1/api/payment/multiple_transfer/create' \
  -H 'accept: application/json' \
  -H 'Authorization: 94a48138b1f41b9cdb3e12c2ff0c7cbe1c7a5f50a311a5054b903cad84215662' \
  -H 'Content-Type: application/json' \
  -d '{
  "target_wallets": [
    {
      "address": "TLpMouAbUvAXTspcXviipKMvijGUczUuGw",
      "amount": 10
    },
    {
      "address": "TXWGCCTgKMYWXpSSfLzutMMfKgeaCgbfbe",
      "amount": 35.5
    }
  ],
  "currency": "USDT"
}'
}'
```

### Response Parameters

| Name             | Type    | Description                                                                                                  | Example |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------ | ------- |
| amount           | number  | Amount to be sent as specified in the invoice (in USD)                                                       | 1       |
| currency         | string  | <p>List of accepted tokens. Possible values:</p><ul><li><code>TRX</code></li><li><code>USDT</code></li></ul> | USDT    |
| target\_wallets  | object  | An object containing a list of addresses and the amount to be sent to each address                           |         |
| need\_energy     | integer | Amount of energy required to process the mass payout                                                         | 196000  |
| need\_bandwidth  | integer | Amount of bandwidth required to process the mass payout                                                      | 740     |
| cost             | number  | Total service fee for processing the mass payout                                                             | 6.5     |
| activation\_cost | number  | Activation cost for the temporary payout address                                                             | 1.1     |

### Response Example

{% tabs %}
{% tab title="200 Success" %}

```json
{
  "amount": 45.5,
  "currency": "USDT",
  "target_wallets": [
    {
      "address": "TLpMouAbUvAXTspcXviipKMvijGUczUuGw",
      "amount": 10
    },
    {
      "address": "TXWGCCTgKMYWXpSSfLzutMMfKgeaCgbfbe",
      "amount": 35.5
    }
  ],
  "need_energy": 196000,
  "need_bandwidth": 740,
  "cost": 19.5,
  "activation_cost": 1.1
}
```

{% endtab %}

{% tab title="403 Authentication credentials were not provided" %}

```json
{
  "detail": "Authentication credentials were not provided."
}
```

{% endtab %}

{% tab title="JSON parse error" %}

```json
{
  "detail":"JSON parse error - Expecting value: line 2 column 13 (char 14)"
}
```

{% endtab %}
{% endtabs %}

### **Possible Errors**

If the request does not contain a valid API key in the header or IP address is not in Whitelist, the server will return a **403** response.

If the request body contains invalid data, the server will return an error response indicating which field caused the error.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://goodpayments.gitbook.io/docs/api-reference/api-methods-overview-request-response-structure/calculate-a-mass-payout-cost.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
