> ## Documentation Index
> Fetch the complete documentation index at: https://lago-ftr-wallet-improvements.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a fee

> This endpoint is used for updating a specific fee that has been issued.

<RequestExample>
  ```bash cURL
  curl --location --request PUT "$LAGO_URL/api/v1/fees/1a901a90-1a90-1a90-1a90-1a901a901a90" \
    --header "Authorization: Bearer $API_KEY" \
    --header 'Content-Type: application/json' \
    --data-raw '{
      "fee": {
        "payment_status": "succeeded"
      }
    }'
  ```

  ```python Python
  from lago_python_client.models import Fee

  fee_update = Fee(
    payment_status="succeeded",
  )

  client.fees.update(fee_update, "1a901a90-1a90-1a90-1a90-1a901a901a90")
  ```

  ```ruby Ruby
  require 'lago-ruby-client'

  client.fees.update({
    lago_id: "1a901a90-1a90-1a90-1a90-1a901a901a90",
    payment_status: "succeeded",
  })
  ```

  ```js Javascript
  const feeObject = {
    payment_status: "succeeded" as FeeObject["payment_status"],
  };

  await client.fees.updateFee("1a901a90-1a90-1a90-1a90-1a901a901a90", {
    fee: feeObject,
  });
  ```

  ```go Go
  feeId, _ := uuid.Parse("1a901a90-1a90-1a90-1a90-1a901a901a90")
  feeInput := &lago.FeeInput{
  LagoID: invoiceId,
  PaymentStatus: lago.FeePaymentStatusSucceeded,
  }

  fee, err := lagoClient.Fee().Update(feeInput)
  if err != nil {
  panic(err)
  }

  // fee is *lago.Fee
  fmt.Println(fee)
  }
  ```

  ```csharp C#
  var apiInstance = new FeesApi(Configuration.Default);
  var id = "1a901a90-1a90-1a90-1a90-1a901a901a90";
  var feeInput = new FeeInput();

  try
  {
      Fee result = apiInstance.UpdateFee(id, feeInput);
  }
  catch (ApiException e)
  {
      Debug.Print("Exception when calling lago API: " + e.Message );
      Debug.Print("Status Code: "+ e.ErrorCode);
      Debug.Print(e.StackTrace);
  }
  ```

  ```php PHP
  $id = "1a901a90-1a90-1a90-1a90-1a901a901a90";
  $fee_input = new \OpenAPI\Client\Model\FeeInput();

  try {
      $result = $apiInstance->updateFee($id, $fee_input);
      print_r($result);
  } catch (Exception $e) {
      echo 'Exception when calling lago API: ', $e->getMessage(), PHP_EOL;
  }
  ```
</RequestExample>
