PayRequest API
The PayRequest API allows you to programmatically access your billing data, create invoices, and automate your billing workflows. It’s designed for integrations with external tools, MCP servers, and custom applications.Base URL
All API requests should be made to:API Versioning
The API uses URL-based versioning. The current version isv1. We recommend always specifying the version in your requests to ensure compatibility.
Features
Invoice Management
List, create, and manage invoices programmatically
OAuth2 Authentication
Secure token-based authentication using OAuth2
Billing Statistics
Get real-time insights into your billing data
Payment Reminders
Automate follow-ups for overdue invoices
Quick Start
1. Create an API Token
- Go to Settings → API Tokens in your PayRequest dashboard
- Click Create New Token
- Give your token a name (e.g., “MCP Integration”)
- Select the required scopes (permissions)
- Copy and securely store your access token
2. Make Your First Request
3. Handle the Response
Available Endpoints
| Method | Endpoint | Description | Scope Required |
|---|---|---|---|
| GET | /v1/invoices | List all invoices | billing.read |
| GET | /v1/invoices/{id} | Get invoice details | billing.read |
| GET | /v1/invoices/stats | Get invoice statistics | billing.read |
| GET | /v1/invoices/overdue | List overdue invoices | billing.read |
| POST | /v1/invoices | Create a new invoice | billing.write |
| POST | /v1/invoices/{id}/reminder | Send payment reminder | billing.write |
Rate Limiting
API requests are rate limited to ensure fair usage:- Standard limit: 60 requests per minute
- Burst limit: 100 requests per minute (temporary)
Response Format
All API responses follow a consistent JSON format:Success Response
Error Response
SDKs and Libraries
While we don’t currently offer official SDKs, the API works seamlessly with:- MCP (Model Context Protocol) servers for AI assistants
- Standard HTTP libraries in any programming language
- Tools like Postman, Insomnia, or cURL