Fee Structure
How donation fees are calculated, what rates apply, and how the total charged amount is derived.
Source files: app/Services/FeeCalculator.php · config/fees.php
Fee Rates
| Fee | Maya | PayMongo |
|---|---|---|
| Convenience fee | 3.5% + ₱10 flat (card) | 3.5% + ₱15 flat (card) |
| System fee | 1% | 1% |
Maya — by payment type
| Payment type | Rate | Fixed |
|---|---|---|
| Card (vaulted) | 3.5% | ₱10.00 |
| Unknown / hosted checkout | 0% | — |
PayMongo — by payment type
| Payment type | Rate | Fixed |
|---|---|---|
| Card (saved-card charge) | 3.5% | ₱15.00 |
| Unknown / hosted checkout | 0% | — |
For PayMongo saved-card charges the MDR is passed through to the donor (card type). For hosted checkout the payment type is unknown at initiation, so the unknown type charges no convenience fee — the MDR is deducted from PayMongo's payout instead.
Environment Variables
# .env
APP_SERVICE_FEE_RATE=0.015 # platform system fee (1%)
MAYA_CARD_RATE=0.035
MAYA_CARD_FIXED=10.0
PAYMONGO_CARD_RATE=0.035
PAYMONGO_CARD_FIXED=15.0
Usage
// app/Services/FeeCalculator.php
$fees = FeeCalculator::calculate('maya', 1000.00, 'card');
// Returns:
// [
// 'convenience_fee' => 45.00, // 3.5% × 1000 + 10
// 'system_fee' => 10.00, // 1% × 1000
// 'total_amount' => 1055.00,
// ]
$fees = FeeCalculator::calculate('paymongo', 1000.00, 'card');
// Returns:
// [
// 'convenience_fee' => 50.00, // 3.5% × 1000 + 15
// 'system_fee' => 10.00, // 1% × 1000
// 'total_amount' => 1060.00,
// ]
// Hosted checkout uses the 'unknown' type — no convenience fee
$fees = FeeCalculator::calculate('paymongo', 1000.00, 'unknown');
// convenience_fee => 0.00, system_fee => 10.00, total_amount => 1010.00
Worked Examples
Maya — ₱1,000 donation (vaulted card)
| Component | Calculation | Amount |
|---|---|---|
| Base amount | — | ₱1,000.00 |
| Convenience fee | ₱1,000 × 3.5% + ₱10 | ₱45.00 |
| System fee | ₱1,000 × 1% | ₱10.00 |
| Total charged | ₱1,055.00 |
PayMongo — ₱1,000 donation (saved card)
| Component | Calculation | Amount |
|---|---|---|
| Base amount | — | ₱1,000.00 |
| Convenience fee | ₱1,000 × 3.5% + ₱15 | ₱50.00 |
| System fee | ₱1,000 × 1% | ₱10.00 |
| Total charged | ₱1,060.00 |
A PayMongo hosted checkout donation of ₱1,000 charges only the ₱10 system fee (convenience fee is 0 for the unknown type) — total ₱1,010.00.
What Gets Sent to the Gateway
Maya
The total_amount as a decimal is sent to the Maya Checkout or card charge API:
// Checkout
'totalAmount' => ['value' => $fees['total_amount'], 'currency' => 'PHP']
// Card charge
'totalAmount' => ['amount' => $fees['total_amount'], 'currency' => 'PHP']
PayMongo
The total_amount in integer centavos is sent inside the checkout line_items or on the payment intent:
'amount' => (int) round($fees['total_amount'] * 100), // e.g. 106000
Maya's checkout API uses totalAmount.value while the card payments API uses totalAmount.amount. This is an inconsistency in Maya's own API.
What Gets Credited to the Campaign
Campaign balances are incremented by the base donation amount only — fees are excluded:
$campaign->increment('raised_amount', $donation->amount); // base amount
$campaign->increment('available_amount', $donation->amount); // base amount
The convenience_fee and system_fee stored on the Donation record represent what the donor paid on top of their intended contribution.
Donation Record Fields
| Field | Value |
|---|---|
amount | Base donation (what the donor intended to give) |
convenience_fee | Gateway processing fee |
system_fee | Platform service fee |
total_amount | Sum of the above three — what is actually charged |