- Endpoints
- Introduction
-
processPOS
The processPOS method is used to create a POS purchase transaction for your physical terminal
-
refundPOS
The refundPOS method is used to create a POS refund transaction for your physical terminal
-
voidPOS
The voidPOS method is used to cancel a POS transaction (purchase or refund) that you have previously created
-
deregisterPOS
The deregisterPOS method is used to unlink a POS terminal from your Merchant Warrior account
Sandbox
POST
https://base.merchantwarrior.com/post/
Copy
Production
POST
https://api.merchantwarrior.com/post/
Copy
This POS API provides a mechanism for you to integrate your physical terminals into the Merchant Warrior platform and create a unified payments experience (eCommerce and Card Present) for your organization.
You will be able to use this API to create transactions from your POS system and have your physical terminals process the transactions in real-time.
Prior to being able to use this API you will need to link your physical terminal(s) to your account via the administration portal. You will be provided with instructions on how to do this during your onboarding.
The processPOS method is used to create a POS purchase transaction for your physical terminal
Headers
Header | Description |
---|---|
MW-MESSAGEHASH | The verification hash is a combination of your API Passphrase and the body of your request. See MW-MESSAGEHASH form hash if you are not submitting a JSON request or MW-MESSAGEHASH JSON hash for information on how to construct the hash correctly. |
Required Parameters
Parameter | Description |
---|---|
method | This field is case sensitive. |
merchantUUID | The value of this parameter is provided to you by Merchant Warrior. |
apiKey | The value of this parameter is provided to you by Merchant Warrior. |
posID | The ID associated with your physical terminal. You will be provided with this during your onboarding. |
transactionAmount | The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected. |
transactionCurrency | One of the following: AUD, CAD, EUR, GBP, JPY, NZD, SGD, USD. This is provider dependant. Please check with MW before attempting to process transactions in any currency other than AUD. This field is case insensitive. |
transactionProduct | A product (or sale) id or description. We recommend using an order/product id. This field’s primary purpose is to help the transaction be identifiable for reporting and accounting purposes. |
customerName | This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters. |
customerCountry | Two letter ISO 3166-1 alpha-2 country code. |
customerState | Freeform field, keep consistent for your records and reporting. |
customerCity | Freeform field, keep consistent for your records and reporting. |
customerAddress | Freeform field. |
customerPostCode | This can also accomodate ZIP/Post codes for international transactions. |
Optional Parameters
Parameter | Description |
---|---|
transactionReferenceID | This is a merchant’s unique reference ID for a transaction sent to Merchant Warrior. The main purpose of this ID is to verify the transaction via the queryCard method in the event a valid response is not received. |
customerPhone | Anything other than +,-, space and 0-9 will be stripped. |
customerEmail | Must be valid if present. Sending this optional parameter is highly recommended. |
storeID | The value of this field is the merchant's store name. Please note that you need to contact Merchant Warrior to enable the storeID feature before you can use this parameter. |
custom1 | Freeform field. Returned as |
custom2 | Freeform field. Returned as |
custom3 | Freeform field. Returned as |
addCard | This parameter is used to indicate if you want a cardID (see Token Payments) returned after a successful transaction. Its value must be 0 or 1. |
curl --location --request POST 'https://api.merchantwarrior.com/post/' \
--header 'MW-API-VERSION: 2.0' \
--form 'method="processPOS"' \
--form 'merchantUUID="4bf088da91079"' \
--form 'apiKey=""' \
--form 'posID="10050001"' \
--form 'transactionAmount="10.00"' \
--form 'transactionCurrency="AUD"' \
--form 'transactionProduct="123456789"' \
--form 'customerName="Bob Jones"' \
--form 'customerAddress="345 Ann St"' \
--form 'customerCity="Brisbane"' \
--form 'customerState="QLD"' \
--form 'customerPostCode="4000"' \
--form 'hash="447432c8c81f621336d143c1803864a5"'
curl --location --request POST 'https://api.merchantwarrior.com/post/' \
--header 'MW-API-VERSION: 2.0' \
--form 'method="processPOS"' \
--form 'merchantUUID="4bf088da91079"' \
--form 'apiKey=""' \
--form 'posID="10050001"' \
--form 'transactionAmount="10.00"' \
--form 'transactionCurrency="AUD"' \
--form 'transactionProduct="123456789"' \
--form 'customerName="Bob Jones"' \
--form 'customerAddress="345 Ann St"' \
--form 'customerCity="Brisbane"' \
--form 'customerState="QLD"' \
--form 'customerPostCode="4000"' \
--form 'hash="447432c8c81f621336d143c1803864a5"'require "uri"
require "net/http"
url = URI("https://api.merchantwarrior.com/post/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MW-API-VERSION"] = "2.0"
form_data = [['method', 'processPOS'],['merchantUUID', '4bf088da91079'],['apiKey', ''],['posID', '10050001'],['transactionAmount', '10.00'],['transactionCurrency', 'AUD'],['transactionProduct', '123456789'],['customerName', 'Bob Jones'],['customerAddress', '345 Ann St'],['customerCity', 'Brisbane'],['customerState', 'QLD'],['customerPostCode', '4000'],['hash', '447432c8c81f621336d143c1803864a5']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
require "uri"
require "net/http"
url = URI("https://api.merchantwarrior.com/post/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MW-API-VERSION"] = "2.0"
form_data = [['method', 'processPOS'],['merchantUUID', '4bf088da91079'],['apiKey', ''],['posID', '10050001'],['transactionAmount', '10.00'],['transactionCurrency', 'AUD'],['transactionProduct', '123456789'],['customerName', 'Bob Jones'],['customerAddress', '345 Ann St'],['customerCity', 'Brisbane'],['customerState', 'QLD'],['customerPostCode', '4000'],['hash', '447432c8c81f621336d143c1803864a5']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
import requests
url = "https://api.merchantwarrior.com/post/"
payload={'method': 'processPOS',
'merchantUUID': '4bf088da91079',
'apiKey': '',
'posID': '10050001',
'transactionAmount': '10.00',
'transactionCurrency': 'AUD',
'transactionProduct': '123456789',
'customerName': 'Bob Jones',
'customerAddress': '345 Ann St',
'customerCity': 'Brisbane',
'customerState': 'QLD',
'customerPostCode': '4000',
'hash': '447432c8c81f621336d143c1803864a5'}
files=[
]
headers = {
'MW-API-VERSION': '2.0'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.merchantwarrior.com/post/"
payload={'method': 'processPOS',
'merchantUUID': '4bf088da91079',
'apiKey': '',
'posID': '10050001',
'transactionAmount': '10.00',
'transactionCurrency': 'AUD',
'transactionProduct': '123456789',
'customerName': 'Bob Jones',
'customerAddress': '345 Ann St',
'customerCity': 'Brisbane',
'customerState': 'QLD',
'customerPostCode': '4000',
'hash': '447432c8c81f621336d143c1803864a5'}
files=[
]
headers = {
'MW-API-VERSION': '2.0'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.merchantwarrior.com/post/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => 'processPOS','merchantUUID' => '4bf088da91079','apiKey' => '','posID' => '10050001','transactionAmount' => '10.00','transactionCurrency' => 'AUD','transactionProduct' => '123456789','customerName' => 'Bob Jones','customerAddress' => '345 Ann St','customerCity' => 'Brisbane','customerState' => 'QLD','customerPostCode' => '4000','hash' => '447432c8c81f621336d143c1803864a5'),
CURLOPT_HTTPHEADER => array(
'MW-API-VERSION: 2.0'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
'https://api.merchantwarrior.com/post/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => 'processPOS','merchantUUID' => '4bf088da91079','apiKey' => '','posID' => '10050001','transactionAmount' => '10.00','transactionCurrency' => 'AUD','transactionProduct' => '123456789','customerName' => 'Bob Jones','customerAddress' => '345 Ann St','customerCity' => 'Brisbane','customerState' => 'QLD','customerPostCode' => '4000','hash' => '447432c8c81f621336d143c1803864a5'),
CURLOPT_HTTPHEADER => array(
'MW-API-VERSION: 2.0'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var client = new RestClient("https://api.merchantwarrior.com/post/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("MW-API-VERSION", "2.0");
request.AlwaysMultipartFormData = true;
request.AddParameter("method", "processPOS");
request.AddParameter("merchantUUID", "4bf088da91079");
request.AddParameter("apiKey", "");
request.AddParameter("posID", "10050001");
request.AddParameter("transactionAmount", "10.00");
request.AddParameter("transactionCurrency", "AUD");
request.AddParameter("transactionProduct", "123456789");
request.AddParameter("customerName", "Bob Jones");
request.AddParameter("customerAddress", "345 Ann St");
request.AddParameter("customerCity", "Brisbane");
request.AddParameter("customerState", "QLD");
request.AddParameter("customerPostCode", "4000");
request.AddParameter("hash", "447432c8c81f621336d143c1803864a5");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var client = new RestClient("https://api.merchantwarrior.com/post/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("MW-API-VERSION", "2.0");
request.AlwaysMultipartFormData = true;
request.AddParameter("method", "processPOS");
request.AddParameter("merchantUUID", "4bf088da91079");
request.AddParameter("apiKey", "");
request.AddParameter("posID", "10050001");
request.AddParameter("transactionAmount", "10.00");
request.AddParameter("transactionCurrency", "AUD");
request.AddParameter("transactionProduct", "123456789");
request.AddParameter("customerName", "Bob Jones");
request.AddParameter("customerAddress", "345 Ann St");
request.AddParameter("customerCity", "Brisbane");
request.AddParameter("customerState", "QLD");
request.AddParameter("customerPostCode", "4000");
request.AddParameter("hash", "447432c8c81f621336d143c1803864a5");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("method","processPOS")
.addFormDataPart("merchantUUID","4bf088da91079")
.addFormDataPart("apiKey","")
.addFormDataPart("posID","10050001")
.addFormDataPart("transactionAmount","10.00")
.addFormDataPart("transactionCurrency","AUD")
.addFormDataPart("transactionProduct","123456789")
.addFormDataPart("customerName","Bob Jones")
.addFormDataPart("customerAddress","345 Ann St")
.addFormDataPart("customerCity","Brisbane")
.addFormDataPart("customerState","QLD")
.addFormDataPart("customerPostCode","4000")
.addFormDataPart("hash","447432c8c81f621336d143c1803864a5")
.build();
Request request = new Request.Builder()
.url("https://api.merchantwarrior.com/post/")
.method("POST", body)
.addHeader("MW-API-VERSION", "2.0")
.build();
Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("method","processPOS")
.addFormDataPart("merchantUUID","4bf088da91079")
.addFormDataPart("apiKey","")
.addFormDataPart("posID","10050001")
.addFormDataPart("transactionAmount","10.00")
.addFormDataPart("transactionCurrency","AUD")
.addFormDataPart("transactionProduct","123456789")
.addFormDataPart("customerName","Bob Jones")
.addFormDataPart("customerAddress","345 Ann St")
.addFormDataPart("customerCity","Brisbane")
.addFormDataPart("customerState","QLD")
.addFormDataPart("customerPostCode","4000")
.addFormDataPart("hash","447432c8c81f621336d143c1803864a5")
.build();
Request request = new Request.Builder()
.url("https://api.merchantwarrior.com/post/")
.method("POST", body)
.addHeader("MW-API-VERSION", "2.0")
.build();
Response response = client.newCall(request).execute();No sample available
No sample available<?xml version="1.0"?>
<mwResponse>
<custom1/>
<custom2/>
<custom3/>
<responseMessage>Transaction pending</responseMessage>
<transactionReferenceID/>
<responseCode>10</responseCode>
<transactionAmount>10.00</transactionAmount>
<authResponseCode>0</authResponseCode>
<transactionID>52-411a322c-b4b5-11ec-abd4-005056b209e0</transactionID>
<feeAmount>0.00</feeAmount>
<customHash>4a560d5ee831c2fc486f7c0fa639e46e</customHash>
<authMessage>POS Transaction GQ5m6jm9(10050001) for 1000 received</authMessage>
</mwResponse>
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Transaction pending",
"transactionReferenceID": [],
"responseCode": "10",
"transactionAmount": "10.00",
"authResponseCode": "0",
"transactionID": "52-411a322c-b4b5-11ec-abd4-005056b209e0",
"feeAmount": "0.00",
"customHash": "4a560d5ee831c2fc486f7c0fa639e46e",
"authMessage": "POS Transaction GQ5m6jm9(10050001) for 1000 received"
}
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Transaction pending",
"transactionReferenceID": [],
"responseCode": "10",
"transactionAmount": "10.00",
"authResponseCode": "0",
"transactionID": "52-411a322c-b4b5-11ec-abd4-005056b209e0",
"feeAmount": "0.00",
"customHash": "4a560d5ee831c2fc486f7c0fa639e46e",
"authMessage": "POS Transaction GQ5m6jm9(10050001) for 1000 received"
}
The refundPOS method is used to create a POS refund transaction for your physical terminal
Headers
Header | Description |
---|---|
MW-MESSAGEHASH | The verification hash is a combination of your API Passphrase and the body of your request. See MW-MESSAGEHASH form hash if you are not submitting a JSON request or MW-MESSAGEHASH JSON hash for information on how to construct the hash correctly. |
Required Parameters
Parameter | Description |
---|---|
method | This field is case sensitive. |
merchantUUID | The value of this parameter is provided to you by Merchant Warrior. |
apiKey | The value of this parameter is provided to you by Merchant Warrior. |
posID | The ID associated with your physical terminal. You will be provided with this during your onboarding. |
transactionAmount | The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected. |
transactionCurrency | One of the following: AUD, CAD, EUR, GBP, JPY, NZD, SGD, USD. This is provider dependant. Please check with MW before attempting to process transactions in any currency other than AUD. This field is case insensitive. |
transactionProduct | A product (or sale) id or description. We recommend using an order/product id. This field’s primary purpose is to help the transaction be identifiable for reporting and accounting purposes. |
customerName | This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters. |
customerCountry | Two letter ISO 3166-1 alpha-2 country code. |
customerState | Freeform field, keep consistent for your records and reporting. |
customerCity | Freeform field, keep consistent for your records and reporting. |
customerAddress | Freeform field. |
customerPostCode | This can also accomodate ZIP/Post codes for international transactions. |
Optional Parameters
Parameter | Description |
---|---|
transactionReferenceID | This is a merchant’s unique reference ID for a transaction sent to Merchant Warrior. The main purpose of this ID is to verify the transaction via the queryCard method in the event a valid response is not received. |
customerPhone | Anything other than +,-, space and 0-9 will be stripped. |
customerEmail | Must be valid if present. Sending this optional parameter is highly recommended. |
storeID | The value of this field is the merchant's store name. Please note that you need to contact Merchant Warrior to enable the storeID feature before you can use this parameter. |
custom1 | Freeform field. Returned as |
custom2 | Freeform field. Returned as |
custom3 | Freeform field. Returned as |
curl --location --request POST 'https://api.merchantwarrior.com/post/' \
--header 'MW-API-VERSION: 2.0' \
--form 'method="refundPOS"' \
--form 'merchantUUID="4bf088da91079"' \
--form 'apiKey=""' \
--form 'posID="10050001"' \
--form 'transactionAmount="10.00"' \
--form 'transactionCurrency="AUD"' \
--form 'transactionProduct="123456789"' \
--form 'customerName="Bob Jones"' \
--form 'customerAddress="345 Ann St"' \
--form 'customerCity="Brisbane"' \
--form 'customerState="QLD"' \
--form 'customerPostCode="4000"' \
--form 'hash="447432c8c81f621336d143c1803864a5"'
curl --location --request POST 'https://api.merchantwarrior.com/post/' \
--header 'MW-API-VERSION: 2.0' \
--form 'method="refundPOS"' \
--form 'merchantUUID="4bf088da91079"' \
--form 'apiKey=""' \
--form 'posID="10050001"' \
--form 'transactionAmount="10.00"' \
--form 'transactionCurrency="AUD"' \
--form 'transactionProduct="123456789"' \
--form 'customerName="Bob Jones"' \
--form 'customerAddress="345 Ann St"' \
--form 'customerCity="Brisbane"' \
--form 'customerState="QLD"' \
--form 'customerPostCode="4000"' \
--form 'hash="447432c8c81f621336d143c1803864a5"'require "uri"
require "net/http"
url = URI("https://api.merchantwarrior.com/post/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MW-API-VERSION"] = "2.0"
form_data = [['method', 'refundPOS'],['merchantUUID', '4bf088da91079'],['apiKey', ''],['posID', '10050001'],['transactionAmount', '10.00'],['transactionCurrency', 'AUD'],['transactionProduct', '123456789'],['customerName', 'Bob Jones'],['customerAddress', '345 Ann St'],['customerCity', 'Brisbane'],['customerState', 'QLD'],['customerPostCode', '4000'],['hash', '447432c8c81f621336d143c1803864a5']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
require "uri"
require "net/http"
url = URI("https://api.merchantwarrior.com/post/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MW-API-VERSION"] = "2.0"
form_data = [['method', 'refundPOS'],['merchantUUID', '4bf088da91079'],['apiKey', ''],['posID', '10050001'],['transactionAmount', '10.00'],['transactionCurrency', 'AUD'],['transactionProduct', '123456789'],['customerName', 'Bob Jones'],['customerAddress', '345 Ann St'],['customerCity', 'Brisbane'],['customerState', 'QLD'],['customerPostCode', '4000'],['hash', '447432c8c81f621336d143c1803864a5']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
import requests
url = "https://api.merchantwarrior.com/post/"
payload={'method': 'refundPOS',
'merchantUUID': '4bf088da91079',
'apiKey': '',
'posID': '10050001',
'transactionAmount': '10.00',
'transactionCurrency': 'AUD',
'transactionProduct': '123456789',
'customerName': 'Bob Jones',
'customerAddress': '345 Ann St',
'customerCity': 'Brisbane',
'customerState': 'QLD',
'customerPostCode': '4000',
'hash': '447432c8c81f621336d143c1803864a5'}
files=[
]
headers = {
'MW-API-VERSION': '2.0'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.merchantwarrior.com/post/"
payload={'method': 'refundPOS',
'merchantUUID': '4bf088da91079',
'apiKey': '',
'posID': '10050001',
'transactionAmount': '10.00',
'transactionCurrency': 'AUD',
'transactionProduct': '123456789',
'customerName': 'Bob Jones',
'customerAddress': '345 Ann St',
'customerCity': 'Brisbane',
'customerState': 'QLD',
'customerPostCode': '4000',
'hash': '447432c8c81f621336d143c1803864a5'}
files=[
]
headers = {
'MW-API-VERSION': '2.0'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.merchantwarrior.com/post/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => 'refundPOS','merchantUUID' => '4bf088da91079','apiKey' => '','posID' => '10050001','transactionAmount' => '10.00','transactionCurrency' => 'AUD','transactionProduct' => '123456789','customerName' => 'Bob Jones','customerAddress' => '345 Ann St','customerCity' => 'Brisbane','customerState' => 'QLD','customerPostCode' => '4000','hash' => '447432c8c81f621336d143c1803864a5'),
CURLOPT_HTTPHEADER => array(
'MW-API-VERSION: 2.0'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
'https://api.merchantwarrior.com/post/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => 'refundPOS','merchantUUID' => '4bf088da91079','apiKey' => '','posID' => '10050001','transactionAmount' => '10.00','transactionCurrency' => 'AUD','transactionProduct' => '123456789','customerName' => 'Bob Jones','customerAddress' => '345 Ann St','customerCity' => 'Brisbane','customerState' => 'QLD','customerPostCode' => '4000','hash' => '447432c8c81f621336d143c1803864a5'),
CURLOPT_HTTPHEADER => array(
'MW-API-VERSION: 2.0'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var client = new RestClient("https://api.merchantwarrior.com/post/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("MW-API-VERSION", "2.0");
request.AlwaysMultipartFormData = true;
request.AddParameter("method", "refundPOS");
request.AddParameter("merchantUUID", "4bf088da91079");
request.AddParameter("apiKey", "");
request.AddParameter("posID", "10050001");
request.AddParameter("transactionAmount", "10.00");
request.AddParameter("transactionCurrency", "AUD");
request.AddParameter("transactionProduct", "123456789");
request.AddParameter("customerName", "Bob Jones");
request.AddParameter("customerAddress", "345 Ann St");
request.AddParameter("customerCity", "Brisbane");
request.AddParameter("customerState", "QLD");
request.AddParameter("customerPostCode", "4000");
request.AddParameter("hash", "447432c8c81f621336d143c1803864a5");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var client = new RestClient("https://api.merchantwarrior.com/post/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("MW-API-VERSION", "2.0");
request.AlwaysMultipartFormData = true;
request.AddParameter("method", "refundPOS");
request.AddParameter("merchantUUID", "4bf088da91079");
request.AddParameter("apiKey", "");
request.AddParameter("posID", "10050001");
request.AddParameter("transactionAmount", "10.00");
request.AddParameter("transactionCurrency", "AUD");
request.AddParameter("transactionProduct", "123456789");
request.AddParameter("customerName", "Bob Jones");
request.AddParameter("customerAddress", "345 Ann St");
request.AddParameter("customerCity", "Brisbane");
request.AddParameter("customerState", "QLD");
request.AddParameter("customerPostCode", "4000");
request.AddParameter("hash", "447432c8c81f621336d143c1803864a5");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("method","refundPOS")
.addFormDataPart("merchantUUID","4bf088da91079")
.addFormDataPart("apiKey","")
.addFormDataPart("posID","10050001")
.addFormDataPart("transactionAmount","10.00")
.addFormDataPart("transactionCurrency","AUD")
.addFormDataPart("transactionProduct","123456789")
.addFormDataPart("customerName","Bob Jones")
.addFormDataPart("customerAddress","345 Ann St")
.addFormDataPart("customerCity","Brisbane")
.addFormDataPart("customerState","QLD")
.addFormDataPart("customerPostCode","4000")
.addFormDataPart("hash","447432c8c81f621336d143c1803864a5")
.build();
Request request = new Request.Builder()
.url("https://api.merchantwarrior.com/post/")
.method("POST", body)
.addHeader("MW-API-VERSION", "2.0")
.build();
Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("method","refundPOS")
.addFormDataPart("merchantUUID","4bf088da91079")
.addFormDataPart("apiKey","")
.addFormDataPart("posID","10050001")
.addFormDataPart("transactionAmount","10.00")
.addFormDataPart("transactionCurrency","AUD")
.addFormDataPart("transactionProduct","123456789")
.addFormDataPart("customerName","Bob Jones")
.addFormDataPart("customerAddress","345 Ann St")
.addFormDataPart("customerCity","Brisbane")
.addFormDataPart("customerState","QLD")
.addFormDataPart("customerPostCode","4000")
.addFormDataPart("hash","447432c8c81f621336d143c1803864a5")
.build();
Request request = new Request.Builder()
.url("https://api.merchantwarrior.com/post/")
.method("POST", body)
.addHeader("MW-API-VERSION", "2.0")
.build();
Response response = client.newCall(request).execute();No sample available
No sample available<?xml version="1.0"?>
<mwResponse>
<custom1/>
<custom2/>
<custom3/>
<responseMessage>Transaction pending</responseMessage>
<transactionReferenceID/>
<responseCode>10</responseCode>
<authResponseCode>0</authResponseCode>
<transactionID>52-7536f3bb-b4b5-11ec-abd4-005056b209e0</transactionID>
<feeAmount>0.00</feeAmount>
<customHash>4a560d5ee831c2fc486f7c0fa639e46e</customHash>
<authMessage>POS Transaction DlPp7j5k(10050001) for 1000 received</authMessage>
</mwResponse>
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Transaction pending",
"transactionReferenceID": [],
"responseCode": "10",
"authResponseCode": "0",
"transactionID": "52-7536f3bb-b4b5-11ec-abd4-005056b209e0",
"feeAmount": "0.00",
"customHash": "4a560d5ee831c2fc486f7c0fa639e46e",
"authMessage": "POS Transaction DlPp7j5k(10050001) for 1000 received"
}
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Transaction pending",
"transactionReferenceID": [],
"responseCode": "10",
"authResponseCode": "0",
"transactionID": "52-7536f3bb-b4b5-11ec-abd4-005056b209e0",
"feeAmount": "0.00",
"customHash": "4a560d5ee831c2fc486f7c0fa639e46e",
"authMessage": "POS Transaction DlPp7j5k(10050001) for 1000 received"
}
The voidPOS method is used to cancel a POS transaction (purchase or refund) that you have previously created
Headers
Header | Description |
---|---|
MW-MESSAGEHASH | The verification hash is a combination of your API Passphrase and the body of your request. See MW-MESSAGEHASH form hash if you are not submitting a JSON request or MW-MESSAGEHASH JSON hash for information on how to construct the hash correctly. |
Required Parameters
Parameter | Description |
---|---|
method | This field is case sensitive. |
merchantUUID | The value of this parameter is provided to you by Merchant Warrior. |
apiKey | The value of this parameter is provided to you by Merchant Warrior. |
transactionID* | The |
Optional Parameters
Parameter | Description |
---|---|
originalTransactionReferenceID | This is a merchant’s unique reference ID for the original transaction sent to Merchant Warrior and can be used in place of the transactionID. |
transactionReferenceID | This is a merchant’s unique reference ID for a transaction sent to Merchant Warrior. The main purpose of this ID is to verify the transaction via the queryCard method in the event a valid response is not received. |
storeID | The value of this field is the merchant's store name. Please note that you need to contact Merchant Warrior to enable the storeID feature before you can use this parameter. |
curl --location --request POST 'https://api.merchantwarrior.com/post/' \
--header 'MW-API-VERSION: 2.0' \
--form 'method="voidPOS"' \
--form 'merchantUUID="4bf088da91079"' \
--form 'apiKey=""' \
--form 'transactionID="52-7536f3bb-b4b5-11ec-abd4-005056b209e0"' \
--form 'hash="447432c8c81f621336d143c1803864a5"'
curl --location --request POST 'https://api.merchantwarrior.com/post/' \
--header 'MW-API-VERSION: 2.0' \
--form 'method="voidPOS"' \
--form 'merchantUUID="4bf088da91079"' \
--form 'apiKey=""' \
--form 'transactionID="52-7536f3bb-b4b5-11ec-abd4-005056b209e0"' \
--form 'hash="447432c8c81f621336d143c1803864a5"'require "uri"
require "net/http"
url = URI("https://api.merchantwarrior.com/post/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MW-API-VERSION"] = "2.0"
form_data = [['method', 'voidPOS'],['merchantUUID', '4bf088da91079'],['apiKey', ''],['transactionID', '52-7536f3bb-b4b5-11ec-abd4-005056b209e0'],['hash', '447432c8c81f621336d143c1803864a5']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
require "uri"
require "net/http"
url = URI("https://api.merchantwarrior.com/post/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MW-API-VERSION"] = "2.0"
form_data = [['method', 'voidPOS'],['merchantUUID', '4bf088da91079'],['apiKey', ''],['transactionID', '52-7536f3bb-b4b5-11ec-abd4-005056b209e0'],['hash', '447432c8c81f621336d143c1803864a5']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
import requests
url = "https://api.merchantwarrior.com/post/"
payload={'method': 'voidPOS',
'merchantUUID': '4bf088da91079',
'apiKey': '',
'transactionID': '52-7536f3bb-b4b5-11ec-abd4-005056b209e0',
'hash': '447432c8c81f621336d143c1803864a5'}
files=[
]
headers = {
'MW-API-VERSION': '2.0'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.merchantwarrior.com/post/"
payload={'method': 'voidPOS',
'merchantUUID': '4bf088da91079',
'apiKey': '',
'transactionID': '52-7536f3bb-b4b5-11ec-abd4-005056b209e0',
'hash': '447432c8c81f621336d143c1803864a5'}
files=[
]
headers = {
'MW-API-VERSION': '2.0'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.merchantwarrior.com/post/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => 'voidPOS','merchantUUID' => '4bf088da91079','apiKey' => '','transactionID' => '52-7536f3bb-b4b5-11ec-abd4-005056b209e0','hash' => '447432c8c81f621336d143c1803864a5'),
CURLOPT_HTTPHEADER => array(
'MW-API-VERSION: 2.0'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
'https://api.merchantwarrior.com/post/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('method' => 'voidPOS','merchantUUID' => '4bf088da91079','apiKey' => '','transactionID' => '52-7536f3bb-b4b5-11ec-abd4-005056b209e0','hash' => '447432c8c81f621336d143c1803864a5'),
CURLOPT_HTTPHEADER => array(
'MW-API-VERSION: 2.0'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var client = new RestClient("https://api.merchantwarrior.com/post/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("MW-API-VERSION", "2.0");
request.AlwaysMultipartFormData = true;
request.AddParameter("method", "voidPOS");
request.AddParameter("merchantUUID", "4bf088da91079");
request.AddParameter("apiKey", "");
request.AddParameter("transactionID", "52-7536f3bb-b4b5-11ec-abd4-005056b209e0");
request.AddParameter("hash", "447432c8c81f621336d143c1803864a5");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var client = new RestClient("https://api.merchantwarrior.com/post/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("MW-API-VERSION", "2.0");
request.AlwaysMultipartFormData = true;
request.AddParameter("method", "voidPOS");
request.AddParameter("merchantUUID", "4bf088da91079");
request.AddParameter("apiKey", "");
request.AddParameter("transactionID", "52-7536f3bb-b4b5-11ec-abd4-005056b209e0");
request.AddParameter("hash", "447432c8c81f621336d143c1803864a5");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("method","voidPOS")
.addFormDataPart("merchantUUID","4bf088da91079")
.addFormDataPart("apiKey","")
.addFormDataPart("transactionID","52-7536f3bb-b4b5-11ec-abd4-005056b209e0")
.addFormDataPart("hash","447432c8c81f621336d143c1803864a5")
.build();
Request request = new Request.Builder()
.url("https://api.merchantwarrior.com/post/")
.method("POST", body)
.addHeader("MW-API-VERSION", "2.0")
.build();
Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("method","voidPOS")
.addFormDataPart("merchantUUID","4bf088da91079")
.addFormDataPart("apiKey","")
.addFormDataPart("transactionID","52-7536f3bb-b4b5-11ec-abd4-005056b209e0")
.addFormDataPart("hash","447432c8c81f621336d143c1803864a5")
.build();
Request request = new Request.Builder()
.url("https://api.merchantwarrior.com/post/")
.method("POST", body)
.addHeader("MW-API-VERSION", "2.0")
.build();
Response response = client.newCall(request).execute();No sample available
No sample available<?xml version="1.0"?>
<mwResponse>
<custom1/>
<custom2/>
<custom3/>
<responseMessage>Operation successful</responseMessage>
<transactionReferenceID/>
<responseCode>0</responseCode>
<authResponseCode>0</authResponseCode>
<transactionID>52-7536f3bb-b4b5-11ec-abd4-005056b209e0</transactionID>
<customHash>4a560d5ee831c2fc486f7c0fa639e46e</customHash>
<authMessage>Transaction DlPp7j5k cancelled.</authMessage>
</mwResponse>
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Operation successful",
"transactionReferenceID": [],
"responseCode": "0",
"authResponseCode": "0",
"transactionID": "52-7536f3bb-b4b5-11ec-abd4-005056b209e0",
"customHash": "4a560d5ee831c2fc486f7c0fa639e46e",
"authMessage": "Transaction DlPp7j5k cancelled."
}
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Operation successful",
"transactionReferenceID": [],
"responseCode": "0",
"authResponseCode": "0",
"transactionID": "52-7536f3bb-b4b5-11ec-abd4-005056b209e0",
"customHash": "4a560d5ee831c2fc486f7c0fa639e46e",
"authMessage": "Transaction DlPp7j5k cancelled."
}
The deregisterPOS method is used to unlink a POS terminal from your Merchant Warrior account
Headers
Header | Description |
---|---|
MW-MESSAGEHASH | The verification hash is a combination of your API Passphrase and the body of your request. See MW-MESSAGEHASH form hash if you are not submitting a JSON request or MW-MESSAGEHASH JSON hash for information on how to construct the hash correctly. |
Required Parameters
Parameter | Description |
---|---|
method | This field is case sensitive. |
merchantUUID | The value of this parameter is provided to you by Merchant Warrior. |
apiKey | The value of this parameter is provided to you by Merchant Warrior. |
posID | The ID associated with your physical terminal. You will be provided with this during your onboarding. |