# Track a new charge

<mark style="color:green;">`POST`</mark> `/charge`

Track a new charge

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name           | Type                                                          | Description                                    |
| -------------- | ------------------------------------------------------------- | ---------------------------------------------- |
| `customer*`    | string \| [Customer](/api-reference/create-a-new-customer.md) | Can be external ID, or full customer object    |
| `supplier*`    | string \| [Supplier](/api-reference/create-a-new-supplier.md) | Can be external ID, or full supplier object    |
| `description*` | string                                                        |                                                |
| `amount*`      | float                                                         | USD amount of entire charge                    |
| `commission*`  | float                                                         | USD amount that was passed to platform         |
| `charge_id`    | string                                                        | Charge ID in external system                   |
| `created`      | timestamp                                                     | Unix timestamp in ms, defaults to current time |

**Response**

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

```json
{
  "status": "ok",
  "internal_id": "<id:string>"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.twosided.io/api-reference/track-a-new-charge.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.
