Skip to main content
PUT

Authorizations

x-api-key
string
header
required

Company API key for authentication

Path Parameters

id
string<uuid>
required

The ID of the fee policy to replace

Body

application/json

Fee policy replacement request. The final state of the policy will match exactly what is provided.

Concurrency protection:

  • Uses RepeatableRead isolation to prevent race conditions
  • No client-side tracking required

Rule handling:

  • Rules WITH id: Updated (id must exist, returns 400 if invalid)
  • Rules WITHOUT id: Created as new
  • Existing rules NOT in payload: Deleted
name
string
required

Policy name (alphanumeric, underscores, hyphens only)

Required string length: 1 - 100
Pattern: ^[a-zA-Z0-9_-]+$
Example:

"standard-card-fees"

is_active
boolean
required

Whether the policy is active

Example:

true

cashout_price
integer
required

Cashout price in cents (fixed fee for cashout operations)

Required range: x >= 0
Example:

350

automatic_anticipation_percentage
number
required

Monthly anticipation rate as a percentage (up to 4 decimal places)

Required range: 0 <= x <= 100Must be a multiple of 0.0001
Example:

2.4999

spot_anticipation_percentage
number
required

Monthly anticipation rate as a percentage (up to 4 decimal places)

Required range: 0 <= x <= 100Must be a multiple of 0.0001
Example:

2.4999

rules
object[]
required

Complete list of rules for the policy. Rules with IDs are updated, rules without IDs are created, and existing rules not in the payload are deleted.

Minimum array length: 1
description
string

Optional policy description

Maximum string length: 500
Example:

"Standard fee structure for card transactions"

Response

Fee policy replaced successfully

Fee policy response

id
string

Policy ID

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

name
string
Example:

"standard-card-fees"

description
string | null
Example:

"Standard fee structure for card transactions"

is_active
boolean
Example:

true

cashout_price
integer

Cashout price in cents (fixed fee for cashout operations)

Example:

350

automatic_anticipation_percentage
number

Monthly anticipation rate as a percentage (up to 4 decimal places)

Required range: 0 <= x <= 100Must be a multiple of 0.0001
Example:

2.4999

spot_anticipation_percentage
number

Monthly anticipation rate as a percentage (up to 4 decimal places)

Required range: 0 <= x <= 100Must be a multiple of 0.0001
Example:

2.4999

organization_id
string

Organization company ID

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2794"

rules
object[]
created_at
string<date-time>
updated_at
string<date-time>