Update Transaction PIN API
Overview
Update an existing transaction PIN for a user to change their transaction authorization code.
API Details
- Method: PUT
- URL: https://api.gafapay.com:8443/gafapay/v3/auth/transaction_pin
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
- Authorization: Token required
Endpoint
PUT https://api.gafapay.com:8443/gafapay/v3/auth/transaction_pin
Request Body
{
"transaction_pin": "1111",
"user_id": "b52aef3999ea4545a868a772377699a3"
}
Request Parameters
- transaction_pin (String, required): The new transaction PIN to be set for the user
- Example:
"1111"
- Example:
- user_id (String, required): The unique identifier of the user whose PIN is being updated
- Example:
"b52aef3999ea4545a868a772377699a3"
- Example:
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiNTJhZWYzOTk5ZWE0NTQ1YTg2OGE3NzIzNzc2OTlhMyIsInJvbGVzIjpbIlJPTEVfTUVSQ0hBTlQiXSwiZXhwIjoxNzU3MjI3MjA1fQ.shraUdMTOm27muCvBsPnZz8d0E5HeTuwxtHBxjksNm0
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Response
{
"success": 1,
"error": [],
"data": {
"message": "AUTH_TRANSACTION_PIN_SUCCESSFULLY_SET"
}
}
Response Fields
- success (integer): Response status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- message (string): Success message indicating transaction PIN was successfully updated
Example Usage
curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/auth/transaction_pin' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiNTJhZWYzOTk5ZWE0NTQ1YTg2OGE3NzIzNzc2OTlhMyIsInJvbGVzIjpbIlJPTEVfTUVSQ0hBTlQiXSwiZXhwIjoxNzU3MjI3MjA1fQ.shraUdMTOm27muCvBsPnZz8d0E5HeTuwxtHBxjksNm0' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b' \
--header 'Content-Type: application/json' \
--data '{
"transaction_pin": "1111",
"user_id": "b52aef3999ea4545a868a772377699a3"
}'
Notes
- This API updates an existing transaction PIN to a new value
- The user_id parameter is required to specify which user's PIN is being updated
- The new transaction PIN should be a secure 4-6 digit combination
- Users must have proper authorization to update transaction PINs
- The transaction PIN is separate from the login PIN and serves different security purposes
- After updating, the old transaction PIN will no longer be valid