Calculate price
GET
/client/1.00/calculate-priceCalculate the final price of a product after fees. Recommended to call before attempting a pay out.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| slug | String | Yes | - | Slug of the product. For more information see this page |
| currency | String | Yes | - | Currency of the product. For more information see this page |
| amount | Decimal | Yes | - | 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¤cy=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 name | Field type | Field description |
|---|---|---|
| productDetails | Object | Product object |
| priceDetails | Object | Price object |
| productSlug | String | The slug of the product |
| productCurrency | String | The currency of the product |
| maxPayoutAmountInProductCurrency | Decimal | Maximum amount allowed to be sent in product’s currency |
| minPayoutAmountInProductCurrency | Decimal | Minimal amount allowed to be sent in product’s currency |
| payOutAmountInProductCurrency | Decimal | Payout amount in product currency |
| subTotalPrice | Decimal | Price before fees |
| fees | Decimal | Fees amount |
| totalPrice | Decimal | Total price of payout |
| currency | String | Currency of fees (will always be your account currency) |
Errors
| Http status code | Https status | Message | Reason |
|---|---|---|---|
| 404 | NOT_FOUND | PRODUCT_NOT_FOUND | Product cannot be found |
| 400 | BAD_REQUEST | INVALID_CURRENCY | Currency 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