calculate_surcharge
Calculate the credit-card surcharge for a payment using amount cents and optional card type. Determines the convenience fee to charge.
Instructions
Calculate the surcharge (credit-card convenience fee) for a payment.
Args:
amount_cents: Payment amount in cents (e.g. 12500 = $125.00).
card_type: Optional card-type slug (e.g. "visa"). Some
facilities surcharge differently per brand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card_type | No | ||
| facility_id | No | ||
| amount_cents | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |