> For the complete documentation index, see [llms.txt](https://docs.twosided.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.twosided.io/api-reference/track-a-new-charge.md).

# 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 %}
