-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
garotm edited this page Nov 29, 2024
·
1 revision
The fleXRP API provides a RESTful interface for integrating XRP payment processing into your applications. This reference documents all available endpoints, authentication methods, and example usage.
All API requests require authentication using Bearer tokens:
Authorization: Bearer your-api-tokenhttps://api.flexrp.com/v1
POST /payments/createRequest Body:
{
"amount": "100.00",
"currency": "XRP",
"description": "Payment for Order #1234",
"callback_url": "https://your-callback-url.com/webhook"
}Response:
{
"payment_id": "pay_123456789",
"xrp_address": "rN9...",
"amount": "100.00",
"status": "pending",
"expires_at": "2024-03-19T15:00:00Z"
}GET /payments/{payment_id}Response:
{
"payment_id": "pay_123456789",
"status": "completed",
"transaction_hash": "ABC123...",
"completed_at": "2024-03-19T14:30:00Z"
}GET /wallet/balanceResponse:
{
"balance": "1000.00",
"currency": "XRP",
"last_updated": "2024-03-19T14:00:00Z"
}GET /transactionsQuery Parameters:
-
limit(optional): Number of transactions to return (default: 20) -
offset(optional): Pagination offset (default: 0) -
status(optional): Filter by status (completed, pending, failed)
Response:
{
"transactions": [
{
"id": "tx_123",
"amount": "100.00",
"status": "completed",
"created_at": "2024-03-19T12:00:00Z"
}
],
"total": 50,
"has_more": true
}- 1000 requests per hour per API key
- Rate limit headers included in responses:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
-
400: Bad Request -
401: Unauthorized -
403: Forbidden -
404: Not Found -
429: Too Many Requests -
500: Internal Server Error
{
"error": {
"code": "invalid_request",
"message": "Detailed error message",
"request_id": "req_123456"
}
}payment.createdpayment.completedpayment.failedwallet.low_balance
{
"event": "payment.completed",
"data": {
"payment_id": "pay_123456789",
"amount": "100.00",
"status": "completed",
"transaction_hash": "ABC123..."
}
}- Python SDK: GitHub Repository
- JavaScript SDK: GitHub Repository
- Sandbox environment:
https://sandbox-api.flexrp.com/v1 - Test API keys available in dashboard
- Test XRP addresses and transactions provided
This documentation is maintained by the fleXRP team.