# Update Payment Status

**Usage Example**

In ZapSign’s Direct Reseller Partnership model, you can use this API to update the payment status of your customers. If a customer is behind on payments or in default, the API allows you to automatically suspend the benefits of their plan, ensuring that services are restricted until the payment is resolved.

#### **How to Configure**

To use this feature, make sure you have both the partner’s API token and the client’s API token whose payment status you want to update. These tokens are essential to make the necessary changes directly through the API, maintaining control over the client experience and the integrity of the services provided.

**How the Endpoint Works**

When using this endpoint, you must send us the `api_token` of the **client account**, along with the `payment_status` parameter, which can be either `"inadimplente"` (if the customer hasn't paid) or `"adimplente"` (if the customer is up to date).

Our system will validate whether the token used for authentication in the API belongs to the **parent account** of the account associated with the token sent in the request body (the client account). If this condition is met, the request will be accepted.

* If the status is `"inadimplente"` (if the customer hasn't paid):\
  The client’s active plan will be **blocked**, restricting access to benefits until payment is settled.
* If the status is `"adimplente"` (if the customer is up to date):\
  The client’s plan will be **unblocked**, restoring full access to services.

## **Update a Partner’s Payment Status**

<mark style="color:green;">`POST`</mark> `https://api.zapsign.com.br/api/v1/partner/update-payment-status/`

**Headers**

| Name                                            | Type   | Description                                                                                                                     |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | <p>API token preceded by the API token preceded by the word Bearer. </p><p>Example: Bearer c7f35c84-7893-4087-b4fb-d1f06c23</p> |

#### Request Body

| Name               | Type   | Description                                                                                                                       |
| ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------- |
| client\_api\_token | string | API token of the partner                                                                                                          |
| payment\_status    | string | payment\_status: "adimplente" (active plan) or "inadimplente" (inactive plan) – defines the desired status of the client account. |

{% tabs %}
{% tab title="Example payload:" %}

```json
{
    "client_api_token": "f44f44e-sve2-4d01-8753-9e8fdf825e44cfe41581-fc98-4f81-8f0f-b8a184046421",
    "payment_status": "inadimplente"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="200 OK – Update completed successfully" %}
{% code overflow="wrap" %}

```json
Status updated successfully
```

{% endcode %}
{% endtab %}
{% endtabs %}
