Skip to main content
Version: 1.00

Calculate price

GET /client/1.00/calculate-price

Calculate the final price of a product after fees. Recommended to call before attempting a pay out.

Parameters

ParameterTypeRequiredDefaultDescription
slugStringYes-Slug of the product. For more information see this page
currencyStringYes-Currency of the product. For more information see this page
amountDecimalYes-Amount you’re trying to send (before taxes)

Example Request

curl -X GET api.rewarble.com/client/1.00/calculate-price?slug=paypal-topup-gbp&currency=gbp&amount=20 \
-H "Authorization: Bearer <api key>"

Example Response

{
"productDetails": {
"productSlug": "paypal-topup-gbp",
"productCurrency": "gbp",
"maxPayoutAmountInProductCurrency": 250.00,
"minPayoutAmountInProductCurrency": 1.00,
"payOutAmountInProductCurrency": 20.00
},
"priceDetails": {
"subTotalPrice": 23.43,
"fees": 2.55,
"totalPrice": 25.98,
"currency": "eur"
}
}

Response Fields

Field nameField typeField description
productDetailsObjectProduct object
priceDetailsObjectPrice object
productSlugStringThe slug of the product
productCurrencyStringThe currency of the product
maxPayoutAmountInProductCurrencyDecimalMaximum amount allowed to be sent in product’s currency
minPayoutAmountInProductCurrencyDecimalMinimal amount allowed to be sent in product’s currency
payOutAmountInProductCurrencyDecimalPayout amount in product currency
subTotalPriceDecimalPrice before fees
feesDecimalFees amount
totalPriceDecimalTotal price of payout
currencyStringCurrency of fees (will always be your account currency)

Errors

Http status codeHttps statusMessageReason
404NOT_FOUNDPRODUCT_NOT_FOUNDProduct cannot be found
400BAD_REQUESTINVALID_CURRENCYCurrency does not match product currency

Notes

note
  • Fees will always be calculated in the default currency of the connected account. To change your default currency, click here