POS
  • 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

Endpoints

Sandbox
POST https://base.merchantwarrior.com/post/ Copy

Production
POST https://api.merchantwarrior.com/post/ Copy

Introduction

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.

processPOS

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.
Example: 9ae6750528916c7a6acc249b605f5a54a2c03afd63e436a1d2818440d56540fc

Required Parameters

Parameter Description
method

This field is case sensitive.
Example: processCard

merchantUUID

The value of this parameter is provided to you by Merchant Warrior.
Example: 123456789abcd

apiKey

The value of this parameter is provided to you by Merchant Warrior.
Example: 1a3b5c

posID

The ID associated with your physical terminal. You will be provided with this during your onboarding.
Example: 5612478

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.
Example: 10.00

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.
Example: AUD

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.
Example: ABC4321
Valid length: Up to 255 characters. Some Acquirers limit this field to 40 characters.

customerName

This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters.
Example: Mr. Example Person
Valid length: Between 2 and 255 characters

customerCountry

Two letter ISO 3166-1 alpha-2 country code.
Example: AU
Valid length: 2 characters

customerState

Freeform field, keep consistent for your records and reporting.
Example: Queensland
Valid length: Up to 75 characters

customerCity

Freeform field, keep consistent for your records and reporting.
Example: Brisbane
Valid length: Up to 75 characters

customerAddress

Freeform field.
Example: 123 Test Street
Valid length: Up to 255 characters

customerPostCode

This can also accomodate ZIP/Post codes for international transactions.
Example: 4000
Valid length: Between 4 and 10 characters

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.
Example: A257240023321
Valid length: Up to 40 characters

customerPhone

Anything other than +,-, space and 0-9 will be stripped.
Example: 0401234567 or 61731234567
Valid length: Up to 25 characters

customerEmail

Must be valid if present. Sending this optional parameter is highly recommended.
Example: [email protected]
Valid length: Up to 255 characters

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.
Example: Test store name

custom1

Freeform field. Returned as <custom1> in the XML response.
Valid length: Up to 500 characters

custom2

Freeform field. Returned as <custom2> in the XML response.
Valid length: Up to 500 characters

custom3

Freeform field. Returned as <custom3> in the XML response.
Valid length: Up to 500 characters

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.
Example: 1

Copy
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
Copy
<?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>
Transaction pending 10 10.00 0 52-411a322c-b4b5-11ec-abd4-005056b209e0 0.00 4a560d5ee831c2fc486f7c0fa639e46e 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"
}
{ "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" }
refundPOS

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.
Example: 9ae6750528916c7a6acc249b605f5a54a2c03afd63e436a1d2818440d56540fc

Required Parameters

Parameter Description
method

This field is case sensitive.
Example: processCard

merchantUUID

The value of this parameter is provided to you by Merchant Warrior.
Example: 123456789abcd

apiKey

The value of this parameter is provided to you by Merchant Warrior.
Example: 1a3b5c

posID

The ID associated with your physical terminal. You will be provided with this during your onboarding.
Example: 5612478

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.
Example: 10.00

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.
Example: AUD

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.
Example: ABC4321
Valid length: Up to 255 characters. Some Acquirers limit this field to 40 characters.

customerName

This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters.
Example: Mr. Example Person
Valid length: Between 2 and 255 characters

customerCountry

Two letter ISO 3166-1 alpha-2 country code.
Example: AU
Valid length: 2 characters

customerState

Freeform field, keep consistent for your records and reporting.
Example: Queensland
Valid length: Up to 75 characters

customerCity

Freeform field, keep consistent for your records and reporting.
Example: Brisbane
Valid length: Up to 75 characters

customerAddress

Freeform field.
Example: 123 Test Street
Valid length: Up to 255 characters

customerPostCode

This can also accomodate ZIP/Post codes for international transactions.
Example: 4000
Valid length: Between 4 and 10 characters

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.
Example: A257240023321
Valid length: Up to 40 characters

customerPhone

Anything other than +,-, space and 0-9 will be stripped.
Example: 0401234567 or 61731234567
Valid length: Up to 25 characters

customerEmail

Must be valid if present. Sending this optional parameter is highly recommended.
Example: [email protected]
Valid length: Up to 255 characters

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.
Example: Test store name

custom1

Freeform field. Returned as <custom1> in the XML response.
Valid length: Up to 500 characters

custom2

Freeform field. Returned as <custom2> in the XML response.
Valid length: Up to 500 characters

custom3

Freeform field. Returned as <custom3> in the XML response.
Valid length: Up to 500 characters

Copy
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
Copy
<?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>
Transaction pending 10 0 52-7536f3bb-b4b5-11ec-abd4-005056b209e0 0.00 4a560d5ee831c2fc486f7c0fa639e46e 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"
}
{ "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" }
voidPOS

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.
Example: 9ae6750528916c7a6acc249b605f5a54a2c03afd63e436a1d2818440d56540fc

Required Parameters

Parameter Description
method

This field is case sensitive.
Example: processVoid

merchantUUID

The value of this parameter is provided to you by Merchant Warrior.
Example: 123456789abcd

apiKey

The value of this parameter is provided to you by Merchant Warrior.
Example: 1a3b5c

transactionID*

The <transactionID> is provided to you by Merchant Warrior after the initial transaction.
Example: 1-a1c340c8-7c30-11de-8888-000c29753ad4

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.
Example: A257240023321
Valid length: Up to 40 characters

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.
Example: A257240023321
Valid length: Up to 40 characters

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.
Example: Test store name

Copy
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
Copy
<?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>
Operation successful 0 0 52-7536f3bb-b4b5-11ec-abd4-005056b209e0 4a560d5ee831c2fc486f7c0fa639e46e 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."
}
{ "custom1": [], "custom2": [], "custom3": [], "responseMessage": "Operation successful", "transactionReferenceID": [], "responseCode": "0", "authResponseCode": "0", "transactionID": "52-7536f3bb-b4b5-11ec-abd4-005056b209e0", "customHash": "4a560d5ee831c2fc486f7c0fa639e46e", "authMessage": "Transaction DlPp7j5k cancelled." }
deregisterPOS

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.
Example: 9ae6750528916c7a6acc249b605f5a54a2c03afd63e436a1d2818440d56540fc

Required Parameters

Parameter Description
method

This field is case sensitive.
Example: deregisterPOS

merchantUUID

The value of this parameter is provided to you by Merchant Warrior.
Example: 123456789abcd

apiKey

The value of this parameter is provided to you by Merchant Warrior.
Example: 1a3b5c

posID

The ID associated with your physical terminal. You will be provided with this during your onboarding.
Example: 5612478