Withdraw-Fee-v6

From Barion Documentation
Revision as of 19:03, 28 May 2026 by [email protected] (talk | contribs) (add v6 withdraw fee endpoint)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

POST v6/withdraw/fee

Calculates the bank transfer withdrawal fee for a payout method and amount.

Request

Field name Type Required Restrictions Location Description
Accept-Language string false Example: en-US, hu-HU; standard HTTP language priority values are accepted Accept-Language header Used for localized response text, for example EstimatedArrival. Look at the Localization section.
access token JWT either access token or wallet key is required issued by id.*.barion.com and contains login scope Authorization header access token used for AuthN and AuthZ purposes
wallet key string either access token or wallet key is required x-api-key header wallet key used for AuthN and AuthZ purposes
<root> object yes body
PayoutMethodId string yes pout_<ordered-base64-ulid> body Id of an existing payout method connected to the opened wallet
Amount decimal yes greater than 0; precision depends on currency body Amount for which the withdrawal fee is calculated. Currency is not required here since the payout method specifies it.

Response

200 OK

Field name Type Restrictions Description
Content-Language string Response header The language the endpoint uses to localize the EstimatedArrival
<root> object
fee object nullable when the request fails Calculated withdrawal fee
fee.value decimal Fee amount
fee.currency string HUF, EUR, USD, CZK, PLN, RON Fee currency
estimatedArrival EstimatedArrival object Carries information about the estimated arrival of the withdrawal
isInternalTransfer bool True when the target account belongs to another Barion wallet and the transfer is internal
errors object array empty on success Standard Barion API error list

This endpoint does not validate whether the wallet has enough funds for the specified amount. It only calculates the fee for that amount.

EstimatedArrival object

Field name Type Restrictions Description
code string in_a_minute, today, business_days The code for the expected arrival of fund to the target bank account. If business_days then look into the businessDays property for the value
message string a localized string that describes the arrival time according to the Accept-Language request
businessDays int nullable, null if the code is not business_days The number of business days that the withdrawal will take up. If the customer has a withdrawal delay set, this number is extended with that value.

Error response

See Calling the API - Barion Documentation.

Possible error messages

Condition Error Code HTTP status code
Authentication fails AuthenticationFailed 401
Invalid input data ModelValidationError 400
Payout method is not found or is not connected to the opened wallet PayoutMethodNotFound 404

Localization

The endpoint has a message for the estimated arrival time. The language of this message is based on the request's Accept-Language header. This header expects the standard Accept-Language values.

This header accepts just languages in a short form as well. Eg: en, instead of en-US, cs, instead of cs-CZ.

In case the system supports one of the requested languages, the value of the estimatedArrival.message property will be translated to that language. The selected language is specified in the Content-Language response header.

The fallback locale is en-US.

Examples

Successful example

POST /v6/withdraw/fee HTTP/1.1
Host: api.barion.com
Authorization: Bearer <JWT>
Accept-Language: en-US
Content-Type: application/json

{
  "PayoutMethodId": "pout_<ordered-base64-ulid>",
  "Amount": 1000
}
RESPONSE
Content-Language: "en-US"
Content-Type: application/json; charset=utf-8

{
  "fee": {
    "value": 70.00,
    "currency": "HUF"
  },
  "estimatedArrival": {
    "code": "in_a_minute",
    "message": "In a minute",
    "businessDays": null
  },
  "isInternalTransfer": false
}