Get All Payment Requests API
Overview
Retrieve a list of all payment requests with their associated user and business information.
API Details
- Method: GET
- URL: https://api.gafapay.com:8443/gafapay/v3/user/payment_request
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
- Authorization: Token required
Endpoint
GET https://api.gafapay.com:8443/gafapay/v3/user/payment_request
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Query Parameters
Pagination Parameters
-
skip (
Integer, optional): Number of records to skip (pagination)- Default: 0
- Example: 0, 10, 20
-
limit (
Integer, optional): Maximum number of records to return (pagination)- Default: 10
- Example: 10, 25, 50
Filter Parameters
-
user_id (
String, optional): User ID filter- Format: UUID string
- Example: "fb8f09210e0f46b7b4262d77f5b6c273"
-
transaction_id (
String, optional): Transaction ID filter- Format: Transaction identifier string
- Can be null if not provided
-
user_type (
Integer, optional): Type of user2= Customer3= Merchant5= Agent- See Constants for more details
-
split_type (
Integer, optional): Split type filter1= SPLIT_EQUALLY2= SPLIT_UNEQUALLY- See Constants for more details
-
start_date (
Long, optional): Start date (epoch timestamp)- Format: Unix timestamp
- Example: 1756556000
-
end_date (
Long, optional): End date (epoch timestamp)- Format: Unix timestamp
- Example: 1756557000
-
sorting (
String, optional): Sorting JSON (e.g.{"field_name": "DESC"})- Format: JSON string
- Example:
{"created_date": "DESC"},{"total_amount": "ASC"}
-
query_filter (
String, optional): Custom query filter- Format: Custom filter string
- Example: Custom filter conditions
-
currency_id (
String, optional): Currency ID filter- Format: UUID string
- Example: "1f1519903ed240578f071aa45cb479f2"
Response
{
"success": 1,
"error": [],
"data": {
"payment_request": [
{
"id": "66d827aac12e41a4947af3735d6dce15",
"user_type": 2,
"user_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"split_type": 2,
"transaction_id": null,
"business_id": null,
"payment_request_type": 2,
"user_info": {
"first_name": "Suresh",
"last_name": "Raina",
"dial_code": "+221",
"phone_number": "968784529",
"email": "kushalpatel2930@gmail.com",
"image": null
},
"business_info": null,
"total_amount": 10.0,
"note": null,
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"group_info": null
}
]
}
}
Response Fields
- success (integer): Response status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- payment_request (array): Array of payment request objects
Payment Request Object Fields
-
id (string): Unique identifier for the payment request
- Format: UUID string
- Example: "66d827aac12e41a4947af3735d6dce15"
-
user_type (integer): Type of user who created the payment request
2= Customer3= Merchant5= Agent- See Constants for more details
-
user_id (string): ID of the user who created the payment request
- Format: UUID string
- Example: "fb8f09210e0f46b7b4262d77f5b6c273"
-
split_type (integer): Type of payment splitting
1= SPLIT_EQUALLY2= SPLIT_UNEQUALLY- See Constants for more details
-
transaction_id (string|null): Associated transaction ID
- Format: Transaction identifier string
- Can be null if not linked to a transaction
-
business_id (string|null): Associated business ID
- Format: Business identifier string
- Can be null if not business-related
-
payment_request_type (integer): Type of payment request
1= Split Payment Request2= Normal Payment Request
-
user_info (object): User information object
- first_name (string): User's first name
- last_name (string): User's last name
- dial_code (string): Country dial code
- phone_number (string): Phone number
- email (string|null): Email address
- image (string|null): Profile image URL
-
business_info (object|null): Business information if applicable
- Can be null if not business-related
-
total_amount (number): Total amount for the payment request
- Format: Decimal number
- Example: 10.0, 100.5, 1000.00
-
note (string|null): Additional notes for the payment request
- Format: Text string
- Can be null if no notes provided
-
currency_id (string): ID of the currency used
- Format: UUID string
- Example: "1f1519903ed240578f071aa45cb479f2"
-
group_info (object|null): Group information if applicable
- Can be null if not part of a group
Example Usage
Basic Request with Pagination
curl --location 'https://api.gafapay.com:8443/gafapay/v3/user/payment_request?skip=0&limit=1' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b'
Notes
- This API returns payment requests (not payment request users)
- Payment request type values can be referenced from the Constants page
- Split type values can be referenced from the Constants page
- User type values can be referenced from the Constants page
- The API supports pagination and various filtering options
- Business information may be null for non-business payment requests
- Group information may be null for individual payment requests