Skip to main content

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:
https://payrequest.app/api/v1

API Versioning

The API uses URL-based versioning. The current version is v1. We recommend always specifying the version in your requests to ensure compatibility.

Features

Quick Start

1. Create an API Token

  1. Go to SettingsAPI Tokens in your PayRequest dashboard
  2. Click Create New Token
  3. Give your token a name (e.g., “MCP Integration”)
  4. Select the required scopes (permissions)
  5. Copy and securely store your access token

2. Make Your First Request

curl -X GET "https://payrequest.app/api/v1/invoices" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json"

3. Handle the Response

{
  "success": true,
  "data": {
    "data": [...],
    "current_page": 1,
    "per_page": 25,
    "total": 150
  }
}

Available Endpoints

MethodEndpointDescriptionScope Required
GET/v1/invoicesList all invoicesbilling.read
GET/v1/invoices/{id}Get invoice detailsbilling.read
GET/v1/invoices/statsGet invoice statisticsbilling.read
GET/v1/invoices/overdueList overdue invoicesbilling.read
POST/v1/invoicesCreate a new invoicebilling.write
POST/v1/invoices/{id}/reminderSend payment reminderbilling.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)
Rate limit headers are included in all responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1706540400

Response Format

All API responses follow a consistent JSON format:

Success Response

{
  "success": true,
  "data": { ... },
  "message": "Optional success message"
}

Error Response

{
  "success": false,
  "error": "Error description",
  "errors": {
    "field_name": ["Validation error message"]
  }
}

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

Support

Need help with the API? Contact us at [email protected] or check our troubleshooting guide.