# Update fee

Updates an existing fee.

Endpoint: PUT /config/fees/{id}
Version: 4.0.0
Security: Bearer

## Security:

  - `Bearer` (unknown)
    apiKey in header Authorization

## Path parameters:

  - `id` (string, required)
    Provide the `feeId` of the fee you want to update.

## Request fields (application/json):

  - `value` (number, required)
    Value of the fee to apply.
Set the value of this parameter according to the fee type you are using:
| [fee_type](#operation/createFee!path=fee_type&t=request) | Corresponding value to use |
|  --- | --- |
| PERCENTAGE | `value` must be >`0` and <`100`. |
| FLAT_RATE | `value` can be negative. |

**Note**: The final amount of the fee is applied either as a percentage or a flat rate depending on the `value` you specify for the `fee_type` parameter.
    Example: 0.025

  - `currency_code` (string, required)
    Currency the fee is applied in. Ripple recommends using [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) currency codes, although no formal constraint is enforced.
    Example: USD

  - `role_type` (string, required)
    Role of the party to which the fee applies.
    Enum: "SENDING", "RECEIVING", "INSTITUTION_SENDING", "INSTITUTION_RECEIVING"

  - `payment_type` (string, required)
    Type of payment to which the fee applies.
    Enum: "REGULAR", "RETURN"

  - `node_type` (string, required)
    Fiat instance to which the fee applies.
    Enum: "INITIAL", "INTERMEDIATE", "TERMINAL"

  - `fee_type` (string, required)
    Type of fee to apply. This is used with fee [value](#operation/createFee!path=value&t=request) to calculate the fee.
    Enum: "PERCENTAGE", "FLAT_RATE"

  - `partner_name` (string)
    Owner of the account involved in the payment, in RippleNet Address format. For example, `rn.us.ca.san_francisco`.
    Example: rn.us.ca.san_francisco

  - `account_name` (string)
    Account to apply the fee to. Specify the account name. For example, `conct_usd_sf`. If specified, you must also specify a `partner_name` value.
    Example: conct_usd_sf

  - `upper_limit` (number)
    Maximum amount for the range of a slab-based fee. If specified, you must also specify a `lower_limit` value.
    Example: 1000

  - `lower_limit` (number)
    Minimum amount for the range of a slab-based fee. If specified, you must also specify an `upper_limit` value.
    Example: 0

  - `payout_method` (string)
    The payout method by which the receiving institution delivers the funds to the end customer.
    Example: LOCAL_RAILS

  - `fee_category` (string)
    Category that describes the purpose of the fee.
    Enum: "NONE", "OVERSEAS_DELIVERY_CHARGES", "BENEFICIARY_BANK_CHARGE", "PROCESSING_HANDLING_CHARGE", "LOCAL_GOVERNMENT_CHARGE", "OTHER"

  - `fee_description` (string)
    Optional free-form description for the fee.

## Response 200:

  - `200` (unknown)
    Successfully updated fee.

## Response 200 fields (application/json):

  - `value` (number, required)
    Value of the fee to be applied. fiat node uses this value and `fee_type` to calculate the fee.
    Example: 2

  - `currency_code` (string, required)
    Currency this fee applies to.
    Example: USD

  - `role_type` (string, required)
    Role of the party to which the fee applies.If set to `SENDING`, the fee is charged to the originator of the payment. If set to `RECEIVING`, the fee is charged to the beneficiary of the payment. If set to `INSTITUTION_SENDING`, the fee is charged to the financial institution that is sending the payment. If set to `INSTITUTION_RECEIVING`, the fee is charged to the financial institution that is receiving the payment.
    Enum: "SENDING", "RECEIVING", "INSTITUTION_SENDING", "INSTITUTION_RECEIVING"

  - `payment_type` (string, required)
    Payment type the fee applies to.
    Enum: "REGULAR", "RETURN"

  - `node_type` (string, required)
    Fiat node to which the fee applies.If set to `INITIAL`, the fee is charged to the first fiat instance in the payment chain. If set to `INTERMEDIATE`, the fee is charged to each fiat instance in the payment chain that is not the first or last fiat instance. If set to `TERMINAL`, the fee is charged to the last fiat instance in the payment chain.
    Enum: "INITIAL", "INTERMEDIATE", "TERMINAL"

  - `fee_type` (string, required)
    Method used to calculate the fee.
    Enum: "PERCENTAGE", "FLAT_RATE"

  - `partner_name` (string)
    Owner of the account involved in the payment, in RippleNet Address format. For example, `rn.us.ca.san_francisco`.
    Example: rn.us.ca.san_francisco

  - `account_name` (string)
    For a fee that applies to a specific account, provides the account name. Used in combination with the `partner_name` value.
    Example: conct_usd_sf

  - `upper_limit` (number)
    For a slab-based fee, provides the upper limit of the slab. Used in combination with the `lower_limit` value.
    Example: 1000

  - `lower_limit` (number)
    For a slab-based fee, provides the lower limit of the slab. Used in combination wtih the `upper_limit` value.
    Example: 0

  - `feeId` (string, required)
    Unique identifier of the fee.
    Example: 7740f31c-ca03-4414-b491-b285aef71eb1

  - `payout_method` (string)
    The payout method for this fee.
    Example: LOCAL_RAILS

  - `fee_category` (string)
    Category that describes the purpose of the fee.
    Enum: "NONE", "OVERSEAS_DELIVERY_CHARGES", "BENEFICIARY_BANK_CHARGE", "PROCESSING_HANDLING_CHARGE", "LOCAL_GOVERNMENT_CHARGE", "OTHER"

  - `fee_description` (string)
    Optional free-form description for the fee.

## Response 400:

  - `400` (unknown)
    Bad Request.

## Response 400 fields (application/json):

  - `type` (string)
    URL to the error documentation.
    Example: https://errors.ripplenet.ripple.com/error/json-processing-error

  - `title` (string)
    Summary of the returned problem.
    Example: Invalid Request Object

  - `detail` (string)
    Description of the returned problem.
    Example: The request parameter [account_id] is not in the correct format.

  - `status` (number)
    HTTP error code.
    Example: 400

  - `ripplenet_error_code` (string)
    RippleNet specific error code.
    Example: E0104

  - `finality` (string)
    Specifies if the request can be retried for a successful response.
    Example: PERMANENT

