1. Home
  2. Docs
  3. Documentation
  4. Cash APIs – V1
  5. API: Update Transaction

API: Update Transaction

The purpose of this API is to update transaction.

Request

URL https://your_account.modulus.biz/api/csh/v1/Transaction?token=YOUR_TOKEN
API Name Transaction
Method PATCH
Source Third Party Server
Recipient modulus® Server
Content Type application/json

Query String Parameters

Parameter Required Type Description
token Yes Text Your authentication token.

Payload Parameters

Parameter Required Type Description
transaction_id
Yes Text The id of the transaction want to be updated
transaction_number
Yes Text Number of the transaction want to be updated
void_date
No Text Date we want to void the transaction at.

Responses

HTTP Status result title message object
Success Responses        
200 OK true Success Transaction updated successfully. { "transaction_id": xxx, "transaction_number": "YYY_ZZZZ", "void_date": "yyy-mm-dd hh:MM:ss" }
Failure Responses        
400 Bad Request false Error Error message as elaborated here. { "error_code": xxx }
500 Internal Server Error false Error Error message as elaborated here. { "error_code": xxx }

Example 1

Requestcurl --request PATCH 'https://your_account.modulus.biz/api/csh/v1/Transaction?token=YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "transaction_id": "17", "transaction_number": "TSH-2024-0155", "void_date": "2024-02-01"}'
200 OK{ "result": true, "title": "Success", "message": "Transaction voided successfully" }

Example 2

Requestcurl --request PATCH 'https://your_account.modulus.biz/api/csh/v1/Transaction?token=YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "transaction_id": "12", "transaction_number": "RCT-2024-0055", "void_date": "2024-01-01"} }'
400 Bad Request{ "result": false, "title": "Error", "message": "The void date cannot be before the transaction date"}