Back to Documentation
Interactive Testing Guide
Welcome to the hands-on Sir Chargly testing guide! This page lets you interact with the API in real-time using test customers and see live responses.
Test Scenario 1: Standard Fee Calculation
The most common scenario - calculating a convenience fee for a standard transaction in Texas (no restrictions).
What to expect:
- ✅ Fee will be calculated at 2.9% + $0.30
- ✅
compliance.passedwill betrue - ✅ Total = Base Amount + Fee
Test Scenario 2: Blocked Region
What happens when you try to calculate a fee in a region where convenience fees are not permitted?
What to expect:
- ❌ Fee will be $0.00
- ⚠️
compliance.passedwill befalse - ⚠️
compliance.warningswill explain why
Test Scenario 3: Card Type Restrictions
California allows convenience fees on credit cards but NOT debit cards. Try both!
Credit Card (Allowed):
Debit Card (Blocked):
What to expect:
- Credit: ✅ Fee applied, compliance passes
- Debit: ❌ $0 fee, compliance fails with warning
Test Scenario 4: Fee Adjusted by Regulation
Colorado has a 2% maximum fee cap. Even though the merchant's rate is 2.9%, the fee is capped.
What to expect:
- ✅ Fee capped at 2.0% + $0.30 (not the full 2.9%)
- ✅
compliance.passedis stilltrue - ℹ️
fee.appliedRulesshows which rules were applied
Create a Real Charge
Now that you've calculated fees, let's create an actual charge with a convenience fee!
What happens:
- Sir Chargly calculates the fee based on the customer's location
- Creates a Stripe charge for (base amount + fee)
- Records the fee breakdown for reporting
- Returns the charge details
Complete Workflow Example
Here's how your integration would work in production:
Step 1: Show Estimate to Customer
Before charging, always show the customer what they'll pay:
Step 2: Create the Charge
Once the customer confirms, create the charge:
Testing Checklist
Use these scenarios to verify your integration:
- ✅ Standard fee calculation works
- ✅ Blocked regions return $0 fee with warning
- ✅ Card type restrictions are enforced
- ✅ Regional caps are applied correctly
- ✅ Error messages are clear and actionable
- ✅ Your UI shows fee breakdowns clearly
- ✅ Customers can see the total before confirming
Need Help?
- API Reference: View full API docs
- SDK Guide: SDK reference
- Support: support@sirchargly.com