Payment Transactions
Payment Statistics
Retrieve aggregate statistics about your payment transactions
Overview
The Payment Statistics API provides aggregated metrics about your payment transactions across different statuses. This helps you monitor payment flows and track success/failure rates.
Authentication
All requests must include your API key in the Authorization header:
Response Fields
Payment statistics container object.
Examples
Basic Statistics Request
Success Response
Data Aggregation
The statistics endpoint aggregates payment data with the following characteristics:
- Updates in near real-time as payment statuses change
- Includes payments from the last 30 days by default
- Counts each payment exactly once based on its current status
- Excludes test mode payments from production statistics
Usage Examples
Monitor Payment Success Rate
Track Failed Payments
Best Practices
-
Caching
- Cache statistics for up to 5 minutes to reduce API load
- Implement stale-while-revalidate caching strategy
- Clear cache when receiving payment webhooks
-
Error Handling
- Implement exponential backoff for retries
- Handle network timeouts gracefully
- Log unusual statistical patterns
-
Monitoring
- Track success rate trends over time
- Set up alerts for unusual failure rates
- Monitor pending payment resolution times
Need Help?
For questions about payment statistics:
- Review our Error Handling guide
- Contact support@juicyway.com
- Join our Discord community