API Reference
API Reference for Paycrest. Explore endpoints, request/response formats, and integration details.
API Reference
Welcome to the Paycrest API Reference. Here you’ll find detailed documentation for all available endpoints, including request/response formats, authentication, and integration tips.
- For a quick start, see the Quickstart guide.
- For OpenAPI playground, see the interactive API explorer below (if available).
The Paycrest Aggregator API provides a comprehensive interface for interacting with the Paycrest protocol. This API enables senders to create payment orders, providers to fulfill orders, and general access to protocol information.
Base URL
Authentication
All API requests require authentication using an API key. Include your API key in the request header:
Getting Your API Key
- Register at app.paycrest.io
- Complete KYC verification (required for compliance)
- Generate API credentials in your dashboard
- Save your API key securely
Your API key should be kept secure and never shared publicly. It’s used to authenticate all API requests and identify your account.
API Endpoints
The Paycrest API is organized into three main categories:
Sender Endpoints
For entities that create payment orders:
POST /sender/orders
- Create a new payment orderGET /sender/orders
- List payment orders with filteringGET /sender/orders/{id}
- Get specific payment order detailsGET /sender/stats
- Get sender statistics
Provider Endpoints
For liquidity providers that fulfill orders:
GET /provider/orders
- List available orders for fulfillmentPOST /provider/orders/{id}/accept
- Accept an order for fulfillmentPOST /provider/orders/{id}/decline
- Decline an orderPOST /provider/orders/{id}/fulfill
- Fulfill an order with payment detailsPOST /provider/orders/{id}/cancel
- Cancel an order with reasonGET /provider/rates/{token}/{fiat}
- Get market ratesGET /provider/stats
- Get provider statisticsGET /provider/node-info
- Get node information
General Endpoints
For protocol information and utilities:
GET /currencies
- List supported fiat currenciesGET /institutions/{currency_code}
- List supported institutionsGET /tokens
- List supported tokensGET /rates/{token}/{amount}/{fiat}
- Get token ratesGET /pubkey
- Get aggregator public keyPOST /verify-account
- Verify bank account detailsGET /orders/{chain_id}/{id}
- Get lock payment order statusGET /reindex/{network}/{tx_hash}
- Reindex transactions
Request Format
All requests should include the following headers:
Example Request
Response Format
All API responses follow a consistent format:
Error Responses
Error responses include detailed information:
Rate Limiting
API requests are rate-limited to ensure fair usage:
- Unauthenticated requests: 20 requests per second
- Authenticated requests: 500 requests per second
Pagination
List endpoints support pagination with the following parameters:
page
- Page number (default: 1)pageSize
- Items per page (default: 20, max: 100)
Example
Response includes pagination metadata:
Webhooks
Set up webhooks to receive real-time updates:
Webhook Events
order.initiated
- Order initiated via API (before Gateway creation)order.pending
- Order awaiting provider assignmentorder.validated
- Order validated and ready for settlementorder.settled
- Order settled on blockchainorder.refunded
- Order refunded to senderorder.expired
- Order expired because no transfer was made to the receive address within the time limit
Webhook Payload
Error Codes
Code | Description |
---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
Testing
Paycrest supports very low minimum orders (as little as $0.50) and uses cost-effective EVM L2s, making it perfect for testing with real transactions. Start small and scale up as you gain confidence.
There is no sandbox environment at the moment. All testing should be done on production using small amounts.
Support
Need help with the API?
- Documentation: Browse our comprehensive guides
- Telegram: Join our community at t.me/+Stx-wLOdj49iNDM0
- GitHub: Report issues at github.com/paycrest
- Email: Contact support at [email protected]
Fee Model
All sender fees are paid by providers. Senders experience zero or minimal fees, maximizing their payout.