# Make your first API request

## Create a charge.

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

To create a charge, following information should be included in payload request&#x20;

More details at [Create a charge](https://pay-apidocs.fizen.io/reference/api-reference/charges/create-a-charge)

#### Request Body

| Name                                          | Type   | Description                                            |
| --------------------------------------------- | ------ | ------------------------------------------------------ |
| name<mark style="color:red;">\*</mark>        | string | Name of the charge                                     |
| description                                   | string | Description of the charge                              |
| logoUrl                                       | string | Charge image URL                                       |
| metadata                                      | string | Metadata associated with the charge                    |
| localPrice<mark style="color:red;">\*</mark>  | object | amount: Charge amount, currency: Charge local currency |
| redirectUrl<mark style="color:red;">\*</mark> | string | Redirect URL when charge payment is completed          |
| cancelUrl<mark style="color:red;">\*</mark>   | string | Cancel URL                                             |

{% tabs %}
{% tab title="201: Created Charge successfully created" %}

```javascript
{
    "statusCode": 201,
    "time": "2022-03-09T09:27:14.456Z",
    "data": {
    // Charge data come here
    },
    "total": 0
}
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
For testing purpose, after create a charge, you can still cancel the charge by using [Cancel a charge](https://pay-apidocs.fizen.io/reference/api-reference/charges/cancel-a-charge) API. Prefer full API documents in the next sections.
{% endhint %}
