Skip to main content

Update Transaction QR Code API

Overview

Update the status or other properties of an existing transaction QR code. This API allows you to modify QR code details such as status, typically used to mark QR codes as processed or update other relevant information.

API Details

Endpoint

PUT https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr

Headers

companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Content-Type: application/json
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjY2VmZTdhOTI2Zjg0NDNiOTBjYTNlNGU4Y2QwMjUzMCIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU4ODgzNTIzfQ.zVZYRtD2ZoIW6DUN842q8HpF8ycOoFgG0M90yVFMKlE

Request Body

{
"id": "d0065c18d7494231ac9b7bd91ab0e5d7",
"status": "PROCESSED",
}

Request Parameters

  • id (string, required): Unique identifier of the QR code to update
    • Example: "d0065c18d7494231ac9b7bd91ab0e5d7"
  • status (string, optional): New status for the QR code
    • Example: "PROCESSED"
    • Possible values:
      • "GENERATED" = QR code has been generated
      • "PROCESSED" = QR code has been processed
      • "EXPIRED" = QR code has expired
      • "CANCELLED" = QR code has been cancelled

Additional Updateable Fields

The following fields can also be updated in the request body:

  • amount (number): Update the transaction amount
  • txn_code (string): Update the transaction code
  • expiry_at (number): Update the expiry timestamp
  • txn_id (string): Associate a transaction ID with the QR code

Response

{
"success": 1,
"error": [],
"data": {
"message": "QR Code data updated successfully"
}
}

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
    • message (string): Success message confirming the update

Example Usage

curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr' \
--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 '{
"id": "d0065c18d7494231ac9b7bd91ab0e5d7",
"status": "PROCESSED"
}'

Example: Update Multiple Fields

curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/user/transaction_qr' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjY2VmZTdhOTI2Zjg0NDNiOTBjYTNlNGU4Y2QwMjUzMCIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU4ODgzNTIzfQ.zVZYRtD2ZoIW6DUN842q8HpF8ycOoFgG0M90yVFMKlE' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b' \
--header 'Content-Type: application/json' \
--data '{
"id": "d0065c18d7494231ac9b7bd91ab0e5d7",
"status": "PROCESSED",
"txn_id": "txn_123456789",
"is_active": false
}'

Notes

  • The id field is required to identify which QR code to update
  • Only valid QR code IDs can be updated
  • Status updates are typically used to track the lifecycle of QR codes
  • The txn_id field is used to link the QR code to an actual transaction
  • The API will return an error if the QR code ID is not found