# 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](/reference/api-reference/charges/create-a-charge.md)

#### 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](/reference/api-reference/charges/cancel-a-charge.md) API. Prefer full API documents in the next sections.
{% endhint %}


---

# 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://pay-apidocs.fizen.io/getting-started/make-your-first-api-request.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.
