> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://ixopay.ferndocs.com/developer-hub/api-reference/transaction-api/transaction/process-void/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ixopay.ferndocs.com/_mcp/server. # Process a void POST https://gateway.ixopay.com/api/v3/transaction/{apiKey}/void Content-Type: application/json Cancels a previously authorized Preauthorize. Reference: https://ixopay.ferndocs.com/developer-hub/api-reference/transaction-api/transaction/process-void ## Authentication - `Authorization` header (basic auth, required) — Basic authentication of the form `Basic `. ## Request ### Path parameters - `apiKey` (string, required) — API Key of Connector ### Body (application/json) This endpoint expects a Void. - `merchantTransactionId` (string, required) — Your own unique identifier for this void request. - `referenceUuid` (string, required) — UUID of the Preauthorize transaction to void. - `additionalId1` (string, optional) — Optional free-form identifier for your own reconciliation (e.g. order or invoice number). - `additionalId2` (string, optional) — A second optional free-form identifier for your own reconciliation. - `amount` (string, optional) — Amount to void. Omit to void the full originally authorized amount. - `currency` (enum, optional) — ISO 4217 three-letter currency code (e.g. EUR, USD, GBP). - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VES`, `VND`, `VUV`, `WST`, `XAD`, `XAF`, `XCD`, `XCG`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWG` - `extraData` (map from string to string, optional) - `pspPassthroughData` (map from string to string, optional) - `merchantMetaData` (string, optional) — Opaque metadata echoed back unchanged in callbacks and the transaction status response. - `description` (string, optional) — Free-text description of the void, shown to the customer or PSP where supported. ## Response ### 200 Transaction response - `success` (boolean, optional) — Whether the transaction was processed successfully. - `uuid` (string, optional) — IXOPAY's unique identifier for this transaction. Use this to reference the transaction in later calls (e.g. capture, void, refund). - `purchaseId` (string, optional) — IXOPAY's human-readable purchase identifier for this transaction. - `returnType` (enum, optional) — How to continue the transaction — a final result (FINISHED/ERROR), or that further customer interaction is required (REDIRECT/HTML/PENDING/PENDING_DCC). - Allowed values: `FINISHED`, `REDIRECT`, `HTML`, `PENDING`, `ERROR`, `PENDING_DCC` - `redirectType` (enum, optional) — When returnType is REDIRECT, how the customer should be sent to redirectUrl (full-page redirect, iframe, or a 3-D Secure challenge). - Allowed values: `iframe`, `fullpage`, `3ds` - `redirectUrl` (string, optional) — URL to send the customer to when further interaction is required. - `redirectQRCode` (string, optional) — DataUrl - `htmlContent` (string, optional) — Raw HTML to render to the customer when returnType is HTML. - `paymentDescriptor` (string, optional) — Short descriptor shown on the customer's statement for this transaction, where supported by the acquirer. - `paymentMethod` (string, optional) — Payment method used for this transaction (e.g. Creditcard, PayPal). - `adapterMerchantTransactionId` (string, optional) — Adapter/PSP-side merchant transaction identifier recorded for transaction matching and reconciliation. Omitted when unavailable. - `returnData` (ReturnData, optional) - `scheduleData` (ScheduleData, optional) - `customerProfileData` (CustomerProfileData, optional) - `riskCheckData` (TransactionResponseRiskCheckData, optional) - `errors` (list of TransactionResponseErrorsItems, optional) - `adapterMessage` (string, optional) — Raw error message returned by the underlying PSP/adapter for this transaction, where available. - `adapterCode` (string, optional) — Raw error code returned by the underlying PSP/adapter for this transaction, where available. - `extraData` (map from string to string, optional) - `dccData` (TransactionResponseDccData, optional) ## Types ### ReturnData ### ScheduleData - `scheduleId` (string, optional) - `scheduleStatus` (enum, optional) - Allowed values: `ACTIVE`, `PAUSED`, `CANCELLED`, `ERROR`, `CREATE-PENDING` - `scheduledAt` (string, optional) - `merchantMetaData` (string, optional) ### CustomerProfileData - `profileGuid` (string, optional) - `customerIdentification` (string, optional) - `paymentToken` (string, optional) - `markAsPreferred` (boolean, optional) ### TransactionResponseRiskCheckData - `riskCheckResult` (enum, optional) — Outcome of any configured fraud/risk check. - Allowed values: `APPROVED`, `DECLINED`, `REVIEW` - `riskScore` (double, optional) — Numeric risk score returned by the risk-check provider, where available. - `threeDSecureRequired` (boolean, optional) — Whether 3-D Secure authentication is required to complete this transaction. ### TransactionResponseErrorsItems - `errorMessage` (string, optional) — Human-readable error description. - `errorCode` (integer, optional) — IXOPAY's internal error code. - `adapterMessage` (string, optional) — Raw error message returned by the underlying PSP/adapter, where available. - `adapterCode` (string, optional) — Raw error code returned by the underlying PSP/adapter, where available. ### TransactionResponseDccData - `uuid` (string, optional) — Identifier for the DCC offer applied to this transaction. - `originalAmount` (string, optional) — Original amount before Dynamic Currency Conversion. - `originalCurrency` (enum, optional) — Original currency before Dynamic Currency Conversion. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VES`, `VND`, `VUV`, `WST`, `XAD`, `XAF`, `XCD`, `XCG`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWG` - `convertedAmount` (string, optional) — Amount the customer was actually charged after Dynamic Currency Conversion. - `convertedCurrency` (enum, optional) — Currency the customer was actually charged in after Dynamic Currency Conversion. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VES`, `VND`, `VUV`, `WST`, `XAD`, `XAF`, `XCD`, `XCG`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWG` - `conversionRate` (double, optional) - `disclaimer` (string, optional) ### ReturnCardData - `_TYPE` (string, optional) - `type` (string, optional) - `firstName` (string, optional) - `lastName` (string, optional) - `country` (string, optional) - `cardHolder` (string, optional) - `expiryMonth` (string, optional) - `expiryYear` (string, optional) - `binDigits` (string, optional) - `firstSixDigits` (string, optional) - `lastFourDigits` (string, optional) - `fingerprint` (string, optional) - `binBrand` (string, optional) - `binBank` (string, optional) - `binType` (string, optional) - `binLevel` (string, optional) - `binCountry` (string, optional) - `binSegment` (enum, optional) - Allowed values: `Consumer`, `Business`, `Commercial`, `Government`, `Unknown` - `binRawData` (ReturnCardDataBinRawData, optional) - `threeDSecure` (string, optional) - `eci` (string, optional) - `merchantAdviceCode` (string, optional) - `parsedMerchantAdviceCode` (string, optional) - `schemeTransactionIdentifier` (string, optional) - `schemeLifecycleIdentifier` (string, optional) - `referenceSchemeLifecycleIdentifier` (string, optional) - `cardUpdateStatus` (enum, optional) — Account updater transaction status - Allowed values: `updated`, `contact`, `new-expiry`, `closed` - `cardUpdatedAt` (date, optional) — Last run of the batch - `cardUpdatePausedUntil` (date, optional) — Updates paused until this date ### ReturnPhoneData - `_TYPE` (string, optional) - `phoneNumber` (string, optional) - `country` (string, optional) - `operator` (string, optional) ### ReturnIbanData - `_TYPE` (string, optional) - `accountOwner` (string, optional) - `iban` (string, optional) - `bic` (string, optional) - `mandateId` (string, optional) - `mandateDate` (string, optional) - `bankName` (string, optional) - `bankBranchName` (string, optional) - `country` (string, optional) ### ReturnWalletData - `_TYPE` (string, optional) - `walletReferenceId` (string, optional) - `walletOwner` (string, optional) - `walletType` (string, optional) ### ReturnCardDataBinRawData - `type` (string, optional) - `data` (map from string to any, optional) ## Examples ### finished **Response** ```json { "success": true, "uuid": "abcde12345abcde12345", "purchaseId": "20190927-abcde12345abcde12345", "returnType": "FINISHED", "paymentMethod": "Creditcard" } ``` **SDK Code** ```python finished import requests url = "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" response = requests.post(url, auth=("", "")) print(response.json()) ``` ```javascript finished const url = 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void'; const credentials = btoa(":"); const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go finished package main import ( "fmt" "net/http" "io" ) func main() { url := "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" req, _ := http.NewRequest("POST", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby finished require 'uri' require 'net/http' url = URI("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java finished import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") .basicAuth("", "") .asString(); ``` ```php finished request('POST', 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp finished using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://gateway.ixopay.com/api/v3/transaction/apiKey/void"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); IRestResponse response = client.Execute(request); ``` ```swift finished import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://gateway.ixopay.com/api/v3/transaction/apiKey/void")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### redirect **Response** ```json { "success": true, "uuid": "abcde12345abcde12345", "purchaseId": "20190927-abcde12345abcde12345", "returnType": "REDIRECT", "redirectUrl": "http://redirectComesUrlHere.com", "redirectQRCode": "data:image/png;base64,ABCDEFGHIJKLMNOPQRSTUVWXYZ", "paymentMethod": "Creditcard" } ``` **SDK Code** ```python redirect import requests url = "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" response = requests.post(url, auth=("", "")) print(response.json()) ``` ```javascript redirect const url = 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void'; const credentials = btoa(":"); const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go redirect package main import ( "fmt" "net/http" "io" ) func main() { url := "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" req, _ := http.NewRequest("POST", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby redirect require 'uri' require 'net/http' url = URI("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java redirect import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") .basicAuth("", "") .asString(); ``` ```php redirect request('POST', 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp redirect using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://gateway.ixopay.com/api/v3/transaction/apiKey/void"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); IRestResponse response = client.Execute(request); ``` ```swift redirect import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://gateway.ixopay.com/api/v3/transaction/apiKey/void")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### processing error **Response** ```json { "success": false, "uuid": "abcde12345abcde12345", "purchaseId": "20200924-abcde12345abcde12345", "returnType": "ERROR", "paymentMethod": "Dummy", "errors": [ { "errorMessage": "Dummy error", "errorCode": 1003, "adapterMessage": "Dummy adapter error" } ] } ``` **SDK Code** ```python processing error import requests url = "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" response = requests.post(url, auth=("", "")) print(response.json()) ``` ```javascript processing error const url = 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void'; const credentials = btoa(":"); const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go processing error package main import ( "fmt" "net/http" "io" ) func main() { url := "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" req, _ := http.NewRequest("POST", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby processing error require 'uri' require 'net/http' url = URI("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java processing error import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") .basicAuth("", "") .asString(); ``` ```php processing error request('POST', 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp processing error using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://gateway.ixopay.com/api/v3/transaction/apiKey/void"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); IRestResponse response = client.Execute(request); ``` ```swift processing error import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://gateway.ixopay.com/api/v3/transaction/apiKey/void")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### general error, e.g. duplicate **Response** ```json { "success": false } ``` **SDK Code** ```python general error, e.g. duplicate import requests url = "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" response = requests.post(url, auth=("", "")) print(response.json()) ``` ```javascript general error, e.g. duplicate const url = 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void'; const credentials = btoa(":"); const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go general error, e.g. duplicate package main import ( "fmt" "net/http" "io" ) func main() { url := "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" req, _ := http.NewRequest("POST", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby general error, e.g. duplicate require 'uri' require 'net/http' url = URI("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java general error, e.g. duplicate import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") .basicAuth("", "") .asString(); ``` ```php general error, e.g. duplicate request('POST', 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp general error, e.g. duplicate using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://gateway.ixopay.com/api/v3/transaction/apiKey/void"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); IRestResponse response = client.Execute(request); ``` ```swift general error, e.g. duplicate import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://gateway.ixopay.com/api/v3/transaction/apiKey/void")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### general error, e.g. validation **Response** ```json { "success": false } ``` **SDK Code** ```python general error, e.g. validation import requests url = "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" response = requests.post(url, auth=("", "")) print(response.json()) ``` ```javascript general error, e.g. validation const url = 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void'; const credentials = btoa(":"); const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go general error, e.g. validation package main import ( "fmt" "net/http" "io" ) func main() { url := "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" req, _ := http.NewRequest("POST", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby general error, e.g. validation require 'uri' require 'net/http' url = URI("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java general error, e.g. validation import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") .basicAuth("", "") .asString(); ``` ```php general error, e.g. validation request('POST', 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp general error, e.g. validation using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://gateway.ixopay.com/api/v3/transaction/apiKey/void"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); IRestResponse response = client.Execute(request); ``` ```swift general error, e.g. validation import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://gateway.ixopay.com/api/v3/transaction/apiKey/void")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### transaction_processVoid_example **Request** ```json { "merchantTransactionId": "2019-09-02-0004", "referenceUuid": "bcdef23456bcdef23456" } ``` **Response** ```json { "success": true, "uuid": "abcde12345abcde12345", "purchaseId": "20190927-abcde12345abcde12345", "returnType": "FINISHED", "paymentMethod": "Creditcard" } ``` **SDK Code** ```python transaction_processVoid_example import requests url = "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" payload = { "merchantTransactionId": "2019-09-02-0004", "referenceUuid": "bcdef23456bcdef23456" } headers = { "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers, auth=("", "")) print(response.json()) ``` ```javascript transaction_processVoid_example const url = 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void'; const credentials = btoa(":"); const options = { method: 'POST', headers: { Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json' }, body: '{"merchantTransactionId":"2019-09-02-0004","referenceUuid":"bcdef23456bcdef23456"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go transaction_processVoid_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://gateway.ixopay.com/api/v3/transaction/apiKey/void" payload := strings.NewReader("{\n \"merchantTransactionId\": \"2019-09-02-0004\",\n \"referenceUuid\": \"bcdef23456bcdef23456\"\n}") req, _ := http.NewRequest("POST", url, payload) req.SetBasicAuth("", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby transaction_processVoid_example require 'uri' require 'net/http' url = URI("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") request["Content-Type"] = 'application/json' request.body = "{\n \"merchantTransactionId\": \"2019-09-02-0004\",\n \"referenceUuid\": \"bcdef23456bcdef23456\"\n}" response = http.request(request) puts response.read_body ``` ```java transaction_processVoid_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://gateway.ixopay.com/api/v3/transaction/apiKey/void") .basicAuth("", "") .header("Content-Type", "application/json") .body("{\n \"merchantTransactionId\": \"2019-09-02-0004\",\n \"referenceUuid\": \"bcdef23456bcdef23456\"\n}") .asString(); ``` ```php transaction_processVoid_example request('POST', 'https://gateway.ixopay.com/api/v3/transaction/apiKey/void', [ 'body' => '{ "merchantTransactionId": "2019-09-02-0004", "referenceUuid": "bcdef23456bcdef23456" }', 'headers' => [ 'Content-Type' => 'application/json', ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp transaction_processVoid_example using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://gateway.ixopay.com/api/v3/transaction/apiKey/void"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"merchantTransactionId\": \"2019-09-02-0004\",\n \"referenceUuid\": \"bcdef23456bcdef23456\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift transaction_processVoid_example import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = [ "Authorization": "Basic \(credentials)", "Content-Type": "application/json" ] let parameters = [ "merchantTransactionId": "2019-09-02-0004", "referenceUuid": "bcdef23456bcdef23456" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://gateway.ixopay.com/api/v3/transaction/apiKey/void")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```