Default Rates
Admin

Create new default rates

Create new default rates

post/api/v1/admin/default-rates

Request body

Example request

{
  "rates": [
    {
      "type": "domestic_percent_fee",
      "value": 1,
      "unit": "%",
      "base": "gross_amount",
      "notes": "Standard domestic percentage fee"
    },
    {
      "type": "fixed_transaction_fee",
      "value": 0.2,
      "unit": "currency",
      "base": "gbp",
      "notes": "Standard fixed GBP fee"
    },
    {
      "type": "fixed_transaction_fee",
      "value": 0.27,
      "unit": "currency",
      "base": "eur",
      "notes": "Standard fixed EUR fee"
    }
  ]
}

Response

Created

successboolean required

Indicates if the request was successful

Example response

{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174001",
    "version": "v1-2024-01-13T15:00:00Z",
    "is_active": true,
    "created_by": "system_seed",
    "created_at": "2024-03-19T12:00:00Z",
    "updated_at": "2024-03-19T12:00:00Z",
    "rates": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174001",
        "defaultRatesId": "123e4567-e89b-12d3-a456-426614174001",
        "merchantRatesId": "123e4567-e89b-12d3-a456-426614174001",
        "type": "domestic_percent_fee",
        "value": 1,
        "unit": "%",
        "base": "gross_amount",
        "conversion_currencies": {
          "source": "EUR",
          "destination": "GBP"
        },
        "notes": "Standard domestic fee"
      }
    ]
  }
}

Changes

Changed in 3 of the 8 revisions of this API.259

  • b372e7d5563d158See the full diff
    • the error/code response's property type/format changed from string/ to / for status 400

      response-property-type-changed

    • removed the optional property error/errors from the response with the 400 status

      response-optional-property-removed

    • added the new conversion_percent_fee enum value to the data/rates/items/type response property for the response status 201

      response-property-enum-value-added

    • added the new refund_conversion_percent_fee enum value to the data/rates/items/type response property for the response status 201

      response-property-enum-value-added

    • added the new refund_domestic_percent_fee enum value to the data/rates/items/type response property for the response status 201

      response-property-enum-value-added

    • added the new refund_fixed_transaction_fee enum value to the data/rates/items/type response property for the response status 201

      response-property-enum-value-added

    • added the new optional request property rates/items/conversion_currencies

      new-optional-request-property

    • added the new conversion_percent_fee enum value to the request property rates/items/type

      request-property-enum-value-added

    • added the new refund_conversion_percent_fee enum value to the request property rates/items/type

      request-property-enum-value-added

    • added the new refund_domestic_percent_fee enum value to the request property rates/items/type

      request-property-enum-value-added

    • added the new refund_fixed_transaction_fee enum value to the request property rates/items/type

      request-property-enum-value-added

    • added the optional property data/rates/items/conversion_currencies to the response with the 201 status

      response-optional-property-added

    • added the optional property error/metadata to the response with the 400 status

      response-optional-property-added

    • added subschema #1 subschema #2 to the error/code response property allOf list for the response status 400

      response-property-all-of-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 367 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog