Approve Payment Transaction

URL

The endpoint and http method information to approve a payment transaction are stated below.

HTTP Method URL
POST /payment/v1/payment-transactions/approve

Request Parameters

The parameters expected to be sent in the requests to be made to approve the payment transaction are listed under the table and subheadings below;

Parameter Name Type Required Description
paymentTransactionIds number[] Yes List of payment transaction id
isTransactional boolean No Set this parameter true if you want payment transactions to be approved in a single transaction otherwise system only approves a transaction what it can

Response Parameters

The parameters returned as a result of the payment are also subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

Parameter Name Type Description
size number Size of the payment transaction id list
items PaymentTransactionApproval[] See: Payment Transaction Approval Information

Payment Transaction Approval Information

Payment transaction is the object that contains information about the transaction and payment transaction in the return object while making the approval and withdrawal of the approval request.

Parameter Name Type Description
paymentTransactionId number ID of the payment transaction
approvalStatus string Returns SUCCESS and FAILURE regarding to the status of the operation
failedReason string Contains error information if an error occurred when approval operation is failed

Sample Codes

You can review the sample codes in the open source Craftgate API clients.