Overview
The Lola Fee Calc node calculates a fee based on a provided user phone number and an amount. It is useful in workflows where you need to determine transaction or service fees dynamically, for example, when processing payments or quoting costs to users based on their input.
Practical examples:
- Calculating transaction fees before charging a customer.
- Estimating service charges for a given amount and user.
- Integrating with payment or billing systems to show users the exact fee breakdown.
Properties
| Name | Meaning |
|---|---|
| User Phone | This is the phone number of the user. Used as an identifier for whom the fee is calculated. |
| Amount | Amount to calculate fee. The value for which the fee will be determined. |
Output
The node adds a field named fees to the output item's json object.
- fees: Contains the result of the fee calculation for the provided amount and user phone. The structure of this field depends on the implementation of the underlying fee calculation function, but it typically includes details such as the calculated fee amount and possibly other related metadata.
Dependencies
- May require a credential named lolaKeyApi, but it is not strictly required.
- Relies on an internal helper function for fee calculation.
Troubleshooting
Common issues:
- Missing Required Fields: If "User Phone" or "Amount" are not provided, the node may throw validation errors.
- Invalid Input Types: Supplying non-numeric values for "Amount" or an improperly formatted phone number may cause errors.
- Fee Calculation Errors: If the fee calculation function fails (e.g., due to network issues or invalid parameters), the node may return an error message indicating the failure.
Error messages and resolutions:
- "Parameter 'userPhone' is required" – Ensure you provide a valid phone number.
- "Parameter 'amount' is required" – Enter a numeric value for the amount.
- "Fee calculation failed" – Check your input values and any required credentials.