Scan Transaction QR Code API
Overview
Scan and retrieve details of a transaction QR code that was previously generated. This API allows users to scan QR codes and get the associated transaction information including amount, status, and transaction details.
API Details
- Method: POST
- URL: https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr/scan
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
- Authorization: Token required
Endpoint
POST https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr/scan
Headers
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Content-Type: application/json
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjY2VmZTdhOTI2Zjg0NDNiOTBjYTNlNGU4Y2QwMjUzMCIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU4ODgzNTIzfQ.zVZYRtD2ZoIW6DUN842q8HpF8ycOoFgG0M90yVFMKlE
Request Body
{
"qr_code_string": "R0FGQVFSMTc1ODQ5ODYzMWZiOGYwOTIxMGUwZjQ2YjdiNDI2MmQ3N2Y1YjZjMjczMjAuMA=="
}
Request Parameters
- qr_code_string (string, required): Base64 encoded QR code string to scan
- Example:
"R0FGQVFSMTc1ODQ5ODYzMWZiOGYwOTIxMGUwZjQ2YjdiNDI2MmQ3N2Y1YjZjMjczMjAuMA=="
- Example:
Response
{
"success": 1,
"error": [],
"data": {
"transaction_qr_code": {
"id": "d0065c18d7494231ac9b7bd91ab0e5d7",
"amount": 20.0,
"status": "GENERATED",
"is_active": null,
"created_by": null,
"created_date": 1758498631,
"updated_by": "ccefe7a926f8443b90ca3e4e8cd02530",
"updated_date": 1758498791,
"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): 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
- 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): QR code transaction details
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr/scan' \
--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' \
--data '{
"qr_code_string": "R0FGQVFSMTc1ODQ5ODYzMWZiOGYwOTIxMGUwZjQ2YjdiNDI2MmQ3N2Y1YjZjMjczMjAuMA=="
}'
Notes
- The QR code string must be a valid Base64 encoded string generated by the generate API
- Scanning a QR code will update the
scanner_idandupdated_datefields - The
txn_idfield will be populated when the QR code is processed into an actual transaction