# Resolve a charge

{% hint style="info" %}
**Note**: Only unresolved charges can be successfully resolved. For more on unresolved charges, check out at [Charge timeline](/reference/api-reference/charges.md#charge-resource)
{% endhint %}

## Resolve an unresolved charge

<mark style="color:green;">`POST`</mark> `/charges/{chargeCode}/resolve/`

#### Path Parameters

| Name                                         | Type   | Description |
| -------------------------------------------- | ------ | ----------- |
| chargeCode<mark style="color:red;">\*</mark> | string | Charge code |

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

```javascript
{
    "statusCode": 201,
    "time": "2022-03-12T18:12:59.255Z",
    "total": 0
}
```

{% endtab %}

{% tab title="401: Unauthorized Request is unauthorized" %}

```javascript
{
    "statusCode": 401,
    "message": "Unauthorized"
}
```

{% endtab %}
{% endtabs %}

#### Example request

```
curl --location --request POST 'https://pay-api.fizen.io/api/integration/v1/charges/code/OST1FNY35QDL/resolve' \
--header 'X-FP-API-KEY: 7abd3993-daf7-4322-84c6-c86e04b3d884'
```

#### Example response

```
{
    "statusCode": 201,
    "time": "2022-03-12T18:17:58.957Z",
    "total": 0
}
```


---

# 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/reference/api-reference/charges/resolve-a-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.
