List payment links
Lists payment links with filtering, pagination, and search. Features: - Filter by active status - Search by product name, description, or unit label - Filter by amount (equal, between, greater, less) - Filter by date (last period, equal, between, after, before) - Pagination support
Lists payment links with filtering, pagination, and search.
Features:
- Filter by active status
- Search by product name, description, or unit label
- Filter by amount (equal, between, greater, less)
- Filter by date (last period, equal, between, after, before)
- Pagination support
Authorization
api-key API key for merchant integrations. Send as Authorization: Bearer <your key>.
In: header
Query Parameters
Page number (1-based)
Number of items per page
Filter by active status (true/false)
Search by product name, description, or unitLabel in line items (supports comma-separated terms)
Amount filter condition (serialized string format: eq:100 or bt:10,100 or gt:50 or lt:200)
Date filter condition (serialized string format: last:7,days or between:2024-01-01,2024-12-31)
Timezone for date filtering
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/payment-links"{
"data": [
{
"id": "plink_abc123",
"merchantId": "mer_xyz789",
"active": true,
"expiresAt": "string",
"currency": "EGP",
"computedAmount": 100000,
"submitType": "PAY",
"afterCompletion": {},
"lineItems": [
{}
],
"createdAt": "string",
"updatedAt": "string"
}
],
"totalCount": 42
}{
"error": {
"type": "authentication_error",
"code": "authentication_required",
"message": "No valid API key provided.",
"doc_url": "https://docs.xpay.app/integrate/errors/api-error-codes#authentication_required"
},
"request_id": "req_abc123def456"
}{
"error": {
"type": "invalid_request_error",
"code": "permission_denied",
"message": "The API key does not have permission to perform this action.",
"doc_url": "https://docs.xpay.app/integrate/errors/api-error-codes#permission_denied"
},
"request_id": "req_abc123def456"
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected error occurred. Please try again or contact support.",
"doc_url": "https://docs.xpay.app/integrate/errors/api-error-codes#internal_error"
},
"request_id": "req_abc123def456"
}Get customer by ID GET
Retrieves customer lifecycle information (id, type, name, email, phone, address, metadata). Response shape is identical to the `customer.*` webhook payload. For transaction counts + payment methods, call `GET /customers/:id/stats`.
Create a payment link POST
Creates a new payment link — a shareable URL you can send to customers. Features: - Supports multiple line items with adjustable quantities - Custom fields for collecting additional customer information - After-completion settings (redirect or hosted confirmation) - Automatic amount calculation from line items - Validates currency consistency across line items