Custom Fee

The custom fee endpoint allows organizations to charge fees to a customer’s account. This is useful for collecting platform fees or service charges, e.t.c.

Create Custom Fee

You can create a custom fee by calling the /api/v1/fee/custom-fee and passing details such as the amount, description and the account to be charged.

💡

The amount charged with the custom fee endpoint gets settled in the Organization's REVENUE account.

MethodEndpoint
POST{{baseUrl}}/api/v1/fee/custom-fee

Below are sample request and response payloads.

curl --request POST \
  --url https://api.sandbox.getanchor.co/api/v1/fee/custom-fee \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-anchor-key: <API Key>' \
  --data '
{
  "data": {
    "type": "CustomerFee"
    "attributes": {
      "currency": "NGN",
      "amount": 1000,
      "description": "Platform fee"
    },
    "relationships": {
      "account": {
        "data": {
          "type": "DepositAccount",
          "id": "17145771745590-anc_acc"
        }
      }
    }
  }
}'
{
  "data": {
    "id": "17466058524700-anc_csf",
    "type": "CustomerFee",
    "attributes": {
      "amount": 1000,
      "feeType": "CUSTOM",
      "status": "PENDING"
    },
    "relationships": {
      "sourceAccount": {
        "data": {
          "id": "17145771745590-anc_acc",
          "type": "DepositAccount"
        }
      },
      "destinationAccount": {
        "data": {
          "id": "16922123761583-anc_acc",
          "type": "DepositAccount"
        }
      }
    }
  }
}


FieldDescription
typeType of the resource, i.e CustomerFee
amountAmount to be charged in the least denomination of the currency. Eg 1000 means N10 for Nigerian Naira
currencyCurrency of the fee (e.g., "NGN").
descriptionDescription of the fee being charged
account.idID of the account to be charged.
account.typeType of the account be charged. Eg DepositAccount

List All Fees

You can call the endpoint below to list all the fees charged by your organization.

MethodEndpoint
GET{{baseUrl}}/api/v1/fee//charged-by-organization/{customfeeId}

Fetch Specific Fee

To fetch a fee custom fee previously charged, call the below endpoint passing the custom fee ID:

MethodEndpoint
GET{{baseUrl}}/api/v1/fee/charged-by-organization/{customfeeId}