Get Payment Link API
Overview
Retrieve detailed information about a specific payment link by its ID.
API Details
- Method: GET
- URL: https://api.gafapay.com/gafapay/v3/user/payment_link/{id}
- Content-Type: application/json
- companyid: b760d21412dd473999e374053fb95031
- requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
- Authorization: Token required
Endpoint
GET https://api.gafapay.com/gafapay/v3/user/payment_link/{id}
Path Parameters
- id (String, required): The unique identifier of the payment link to retrieve
- Example:
a1b2c3d4e5f6g7h8i9j0
- Example:
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU
companyid: b760d21412dd473999e374053fb95031
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Response (Success)
{
"success": 1,
"error": [],
"data": {
"payment_link": {
"id": "a1b2c3d4e5f6g7h8i9j0",
"link_number": "PL_123456",
"user_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"user_type": 2,
"business_id": "biz_abc123",
"payment_link": "https://pay.gafapay.com/link/xyz",
"target_user_id": null,
"target_user_type": null,
"target_user_info": null,
"amount": 100.50,
"note": "Payment for services",
"expiry_date": 1756656000,
"status": 1,
"link_name": "Invoice #001",
"link_description": "Payment link for invoice",
"charges_info": null,
"created_by": "fb8f09210e0f46b7b4262d77f5b6c273",
"created_date": 1756551924,
"updated_by": null,
"updated_date": 1756551924,
"is_active": true
}
}
}
Response Fields
- success (integer): Response status indicator (1 = Success, 0 = Failure)
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- payment_link (object): Payment link detail object
Payment Link Object Fields
- id (string): Unique identifier for the payment link
- link_number (string): Link number/code
- user_id (string): Creator user ID
- user_type (integer): Creator user type (2=Customer, 3=Merchant, 5=Agent)
- business_id (string|null): Associated business ID
- payment_link (string): Payment link URL or identifier
- target_user_id (string|null): Target user ID
- target_user_type (integer|null): Target user type
- target_user_info (object|null): Target user information map
- amount (number): Payment amount
- note (string|null): Note/description
- expiry_date (long): Expiry timestamp (epoch seconds)
- status (integer): Link status (1=Created, 2=Expired, 3=Completed, 4=Cancelled)
- link_name (string|null): Display name for the link
- link_description (string|null): Link description
- charges_info (object|null): Charges/fee information
- created_by (string): Creator user ID
- created_date (long): Creation timestamp
- updated_by (string|null): Last updater user ID
- updated_date (long): Last update timestamp
- is_active (boolean): Whether the link is active
Response (Not Found / Validation Error)
{
"success": 0,
"error": [],
"data": {
"check_validation_failed": true,
"validation_message": "USER_PAYMENT_LINK_DATA_NOT_FOUND"
}
}
Example Usage
curl --location 'https://api.gafapay.com/gafapay/v3/user/payment_link/a1b2c3d4e5f6g7h8i9j0' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...' \
--header 'companyid: b760d21412dd473999e374053fb95031' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b'
Notes
company_id(viacompanyidheader) is required for the request.- If the payment link is not found, the API returns
USER_PAYMENT_LINK_DATA_NOT_FOUNDwithcheck_validation_failed: true. - Payment link status values can be referenced from the Constants page.