authorizePendingTransactions

The authorizePendingTransactions method processes and finalizes all transactions that are currently in a pending state.

This method is essential for merchants who use deferred payment transactions. It allows them to finalize multiple pending transactions in a single batch operation and retrieve a summary of which transactions were approved or declined.

Request

📘

JSON-RPC 2.0

All methods in TweezerComm follow a JSON-RPC 2.0 structure. See Get Startedfor more details on how the requests are structured and sent.

In the request, ensure to configure the following:

  • The method field needs to be set to.authorizePendingTransactions.
  • The service must be set to ashrait in the params.
{
   "jsonrpc":"2.0",
   "method":"authorizePendingTransactions",
   "params":[
      "ashrait",
      {}
   ],
   "id":1
}

This method does not require any parameters in the params object.

Response

A successful request will return a response similar to the one in the code block below:

{
   "jsonrpc": "2.0",
   "id": "1",
   "result": {
       "statusCode": 0,
       "approvedTransactions": [
           "25102113483608830127760"
       ],
       "declinedTransactions": [],
       "totalAmount": 100,
       "totalCount": 1
   }
}

Response Parameters

Below is a table with all the possible response parameters and their description:

NameTypeDescription
statusCodeintegerThe overall status of the batch operation. A value of 0 indicates the batch was processed successfully.
approvedTransactionsarray of stringsA list of transaction unique identifiers (UIDs) that were successfully authorized and captured.
declinedTransactionsarray of stringsA list of transaction unique identifiers (UIDs) that were declined during the authorization attempt.
totalAmountintegerThe total amount (in cents) of all transactions that were approved in this batch.
totalCountintegerThe total number of transactions that were approved in this batch.