Skip to main content

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

object
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

  1. Caching
    • Cache statistics for up to 5 minutes to reduce API load
    • Implement stale-while-revalidate caching strategy
    • Clear cache when receiving payment webhooks
  2. Error Handling
    • Implement exponential backoff for retries
    • Handle network timeouts gracefully
    • Log unusual statistical patterns
  3. 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: