Skip to main content
POST
Calculate transaction fees
This route calculates fees server-side before launching a collection or disbursement. You can identify the service with serviceId, service_id, provider, serviceCode, or service_code. For a direct API application, the fee bearer comes from the authenticated application configuration or the internal X-SP-Fee-Bearer header. For a plugin, send origin: "PLUGIN" and provide feeBearer in the payload or query string. The payload has priority. When feeBearer is CUSTOMER, payableAmount includes fees. When feeBearer is MERCHANT, merchantNetAmount indicates the merchant net amount after fees. Send amount in major units by default: 4.01 for 4.01 USD/EUR. API clients that already send cents can set amount_unit: "MINOR" at the root of the JSON body, alongside amount and currency, rather than in metadata. Public responses return major units even when the request uses MINOR. See amounts and currencies. baseAmount, feeAmount, payableAmount, and merchantNetAmount are returned in major units. Keep their decimals when displaying or comparing them.

Authorizations

x-sp-auth-token
string
header
required

Bearer token obtained with the client_id and client_secret of the application created in SoleasPay. Format: Bearer <access_token>.

Query Parameters

feeBearer
enum<string>

Prioritaire seulement pour les flux plugin lorsque le payload ne fournit pas feeBearer.

Available options:
CUSTOMER,
MERCHANT

Body

application/json
amount
number
required

Amount in major units by default: 4.01 for 4.01 USD/EUR. With root-level amount_unit MINOR, send integer cents (401).

Example:

10000

currency
string
required
Example:

"XAF"

serviceId
integer
Example:

1

service_id
integer
Example:

1

provider
string
Example:

"mtn_cmr"

origin
enum<string>
Available options:
APPLICATION,
PLUGIN
Example:

"APPLICATION"

plugin
string
Example:

"CHECKOUT"

feeBearer
enum<string>
Available options:
CUSTOMER,
MERCHANT
Example:

"CUSTOMER"

customerPaysFees
boolean
deprecated
Example:

true

operation
enum<string>
Available options:
COLLECTION,
DISBURSEMENT
Example:

"COLLECTION"

amount_unit
enum<string>
default:MAJOR

Unit of request amounts. Optional, MAJOR by default. Put this field at the root of the JSON body, not in metadata. MINOR preserves amounts already expressed in the smallest unit.

Available options:
MAJOR,
MINOR
Example:

"MAJOR"

Response

Devis de fees

code
integer
Example:

200

success
boolean
Example:

true

data
object
locale
string
Example:

"fr"

message
string
Example:

"fees_quote"