Operation 2: Void
PUT https://{{domain}}/api/rest/version/{{collectionVersion}}/merchant/{{merchantId}}/order/{{orderIdForVoid}}/transaction/{{voidTranId}}
Create a request to void the payment.
Request Body
{"apiOperation"=>"VOID", "transaction"=>{"targetTransactionId"=>"{{voidTargetTransactionId}}", "reference"=>"{{voidTransactionReference}}"}}
RESPONSES
status: Created
{"authorizationResponse":{"cardSecurityCodeError":"M","commercialCard":"888","commercialCardIndicator":"3","financialNetworkCode":"777","posData":"0001100000600","posEntryMode":"012","processingCode":"003000","responseCode":"00","stan":"206201","transactionIdentifier":"123456789"},"gatewayEntryPoint":"WEB_SERVICES_API","merchant":"merchantId","order":{"amount":100.2,"chargeback":{"amount":0,"currency":"USD"},"creationTime":"2023-08-08T20:50:08.818Z","currency":"USD","id":"8c83849c-df87-4724-b1c5-2f9178b6ebf2","lastUpdatedTime":"2023-08-08T20:50:21.492Z","merchantAmount":100.2,"merchantCategoryCode":"4511","merchantCurrency":"USD","reference":"8c83849c-df87-4724-b1c5-2f9178b6ebf2","status":"CANCELLED","totalAuthorizedAmount":0,"totalCapturedAmount":0,"totalDisbursedAmount":0,"totalRefundedAmount":0},"response":{"acquirerCode":"00","acquirerMessage":"Approved","cardSecurityCode":{"acquirerCode":"M","gatewayCode":"MATCH"},"gatewayCode":"APPROVED"},"result":"SUCCESS","sourceOfFunds":{"provided":{"card":{"brand":"MASTERCARD","expiry":{"month":"1","year":"39"},"fundingMethod":"CREDIT","number":"512345xxxxxx0008","scheme":"MASTERCARD","storedOnFile":"NOT_STORED"}},"type":"CARD"},"timeOfLastUpdate":"2023-08-08T20:50:21.492Z","timeOfRecord":"2023-08-08T20:50:21.458Z","transaction":{"acquirer":{"batch":20230808,"date":"0808","id":"ARC_S2I","merchantId":"00090000266","settlementDate":"2023-08-08","timeZone":"-0400","transactionId":"123456789"},"amount":100.2,"authorizationCode":"207261","currency":"USD","id":"2b4ad268-4cf2-4b56-95e7-fbcc279d0864","receipt":"322020206201","reference":"4cff2178-c454-47b2-8e15-6ea346237bfb","source":"MOTO","stan":"207261","targetTransactionId":"e97f4902-86b0-4560-bf73-da110486b1eb","terminal":"1111","type":"VOID_PAYMENT"},"version":"70"}