Skip to main content
PUT
/
api
/
v1
/
fee-settings
Update Fee Setting
curl --request PUT \
  --url https://api.example.com/api/v1/fee-settings \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transaction_type": "<string>",
  "party_type": "<string>",
  "fee_type": "<string>",
  "fee_value": 123,
  "debit_enabled": true,
  "credit_enabled": true
}
'

Update Fee Setting

Create or update a fee setting. Uses upsert - creates if not exists, updates if exists.

Endpoint

PUT /api/v1/fee-settings

Authentication

Authorization
string
required
Bearer token (Admin JWT)

Request Body

transaction_type
string
required
Transaction type
party_type
string
required
Party type: sender, recipient, agent, processor
fee_type
string
required
Fee calculation: percentage or flat
fee_value
number
required
Fee value (percentage 0-100 or flat amount in SLE)
debit_enabled
boolean
Apply fee on debit transactions
credit_enabled
boolean
Apply fee on credit transactions

Example

curl -X PUT "https://olive-gateway-a6ba.onrender.com/api/v1/fee-settings" \
  -H "Authorization: Bearer ADMIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_type": "transfer_p2p",
    "party_type": "sender",
    "fee_type": "percentage",
    "fee_value": 1.5,
    "debit_enabled": true
  }'

Validation

  • Percentage fee cannot exceed 100%
  • Fee value must be >= 0

Errors

CodeDescription
400Invalid request or percentage exceeds 100%
401Unauthorized
500Internal server error