Fees Preview
- Method:
GET - Path:
/api/v1/cp/psp/finitic-pay/fees-preview - Auth: API Key (HMAC)
This endpoint previews the expected fees for a checkout request before you create the hosted payment page.
Signing notes
- The request body is empty.
- The signature payload must use an empty string body.
- The
merchantvalue may be implied from the API key when that mapping is configured on the Cyrafa side.
Example request
curl -X GET "https://<HOST>/api/v1/cp/psp/finitic-pay/fees-preview?amount=149.99¤cy=USD" \
-H "api-key: <YOUR_API_KEY>" \
-H "timestamp: 1712668800" \
-H "signature: <HMAC_SIGNATURE>"Pre-request script
Use this Postman pre-request script to generate and inject the api-key, timestamp, and signature headers.
const apiKey = '<YOUR_API_KEY>';
const apiSecret = '<YOUR_API_SECRET_KEY>';
const timestamp = Math.floor(Date.now() / 1000).toString();
let body = '';
if (pm.request.body && pm.request.body.mode === 'raw') {
const raw = pm.request.body.raw?.trim();
if (raw) {
body = JSON.stringify(JSON.parse(raw));
}
}
const payload = `${timestamp}.${body}`;
const signature = CryptoJS.HmacSHA256(payload, apiSecret).toString(CryptoJS.enc.Hex);
pm.request.headers.upsert({ key: 'api-key', value: apiKey });
pm.request.headers.upsert({ key: 'timestamp', value: timestamp });
pm.request.headers.upsert({ key: 'signature', value: signature });Access
You must also access this endpoint with a Bearer token.
Authorization: Bearer <YOUR_BEARER_TOKEN>Sample response
{
"status": true,
"message": "Data created succesfull",
"result": {
"isPercentage": true,
"value": 0.0035,
"minValue": 1,
"onChainFee": 5,
"currency": "USDT",
"originalCurrency": "USDT"
},
"isSuccess": true
}Last updated on