# Charge Token

## /payments/charge-token

<mark style="color:green;">`POST`</mark> `https://seerbitapi.com/api/v2/payments/charge-token`

This endpoint allows you to charge a customer using the authorizationCode

#### Headers

| Name                                            | Type   | Description                                             |
| ----------------------------------------------- | ------ | ------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | [Bearer Token](https://apis.seerbit.com/authentication) |

#### Request Body

| Name                                                | Type   | Description                         |
| --------------------------------------------------- | ------ | ----------------------------------- |
| authorizationCode<mark style="color:red;">\*</mark> | String | code to charge                      |
| paymentReference<mark style="color:red;">\*</mark>  | String | unique payment reference for charge |
| publicKey<mark style="color:red;">\*</mark>         | String | merchant publickey                  |
| amount<mark style="color:red;">\*</mark>            | String | amount you want to charge           |

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

```javascript
curl --location 'https://seerbitapi.com/api/v2/payments/charge-token' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ENCRYPTED_KEY' \
--data '{
    "publicKey": "YOUR_PUBLIC_KEY",
    "amount": "110",
    "paymentReference": "charge_test_3451",
    "authorizationCode": "ye773838jje8837abe"
}'
```

{% endtab %}

{% tab title="200: OK Successful" %}

```javascript
{
    "status": "SUCCESS",
    "data": {
        "code": "00",
        "message": "APPROVED",
        "payments": {
            "paymentReference": "9288383999393",
            "linkingReference": "SEERBIT43376378378377720196"
        }
    }
}
```

{% endtab %}
{% endtabs %}
