Get Transaction QR Code API
Overview
Retrieve detailed information about a specific transaction QR code using its unique identifier. This API allows you to fetch complete QR code details including status, transaction information, and metadata.
API Details
- Method: GET
- URL: https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr/{id}
- 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/transaction_qr/{id}
Path Parameters
- id (string, required): Unique identifier of the QR code to retrieve
- Example:
"d0065c18d7494231ac9b7bd91ab0e5d7"
- Example:
Headers
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Content-Type: application/json
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjY2VmZTdhOTI2Zjg0NDNiOTBjYTNlNGU4Y2QwMjUzMCIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU4ODgzNTIzfQ.zVZYRtD2ZoIW6DUN842q8HpF8ycOoFgG0M90yVFMKlE
Request Body
No request body required for GET requests.
Response
{
"success": 1,
"error": [],
"data": {
"transaction_qr_code": {
"id": "d0065c18d7494231ac9b7bd91ab0e5d7",
"amount": 20.0,
"status": "PROCESSED",
"is_active": null,
"created_by": null,
"created_date": 1758498631,
"updated_by": "ccefe7a926f8443b90ca3e4e8cd02530",
"updated_date": 1758499086,
"qr_code_string": "R0FGQVFSMTc1ODQ5ODYzMWZiOGYwOTIxMGUwZjQ2YjdiNDI2MmQ3N2Y1YjZjMjczMjAuMA==",
"qr_code_number": "GAFAQR1758498631",
"generator_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"scanner_id": "ccefe7a926f8443b90ca3e4e8cd02530",
"txn_code": "CIC",
"expiry_at": 1758498691,
"txn_id": 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
- transaction_qr_code (object): Complete QR code transaction details
- id (string): Unique QR code identifier
- amount (number): Transaction amount
- status (string): Current status of the QR code
"GENERATED"= QR code has been generated"PROCESSED"= QR code has been processed"EXPIRED"= QR code has expired"CANCELLED"= QR code has been cancelled
- is_active (boolean, nullable): Whether the QR code is active
- created_by (string, nullable): User ID who created the QR code
- created_date (number): Unix timestamp when QR code was created
- updated_by (string): User ID who last updated the QR code
- updated_date (number): Unix timestamp when QR code was last updated
- qr_code_string (string): Base64 encoded QR code string
- qr_code_number (string): Human-readable QR code number
- generator_id (string): User ID who generated the QR code
- scanner_id (string): User ID who scanned the QR code
- txn_code (string): Transaction code
- expiry_at (number): Unix timestamp when QR code expires
- txn_id (string, nullable): Associated transaction ID if processed
- transaction_qr_code (object): Complete QR code transaction details
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr/d0065c18d7494231ac9b7bd91ab0e5d7' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjY2VmZTdhOTI2Zjg0NDNiOTBjYTNlNGU4Y2QwMjUzMCIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU4ODgzNTIzfQ.zVZYRtD2ZoIW6DUN842q8HpF8ycOoFgG0M90yVFMKlE' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=46E2E80001D55764685966F3C407654F'
Error Response
If the QR code ID is not found or invalid:
{
"success": 0,
"error": ["QR Code not found"],
"data": null
}
Notes
- The QR code ID must be a valid UUID format
- Only QR codes belonging to the authenticated user's company can be retrieved
- The response includes complete transaction history and metadata
- The
qr_code_stringcan be used to regenerate the QR code image - The
qr_code_numberprovides a human-readable reference - The
scanner_idfield indicates who last scanned the QR code - Expired QR codes will show
"EXPIRED"status but can still be retrieved - The
txn_idfield will be populated when the QR code is processed into an actual transaction