The following sub-sections will outline the various API methods present in the Merchant Warrior Hosted Payments service
- Endpoints
-
processCard
The processCard method is the method used to perform a purchase request
-
processDDebitAuth
The processDDebitAuth method is used to initiate an electronic (paperless) direct debit authorization form
- Styling Options
Sandbox
POST
https://securetest.merchantwarrior.com/
Copy
Production
POST
https://secure.merchantwarrior.com/
Copy
Requests are generated via a form with the parameters below presented to the customer's browser.
Required Parameters
Parameter | Description |
---|---|
method | This field is case sensitive. Currently, the only valid value for this parameter is ‘processCard’. |
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. |
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. |
returnURL | The customer will be redirected to this URL upon completion of the transaction. |
notifyURL | Asynchronous POST notifications will be sent to this URL. |
urlHash | The urlHash field is a combination of your API Passphrase, and specific parameters sent in the transaction. See Web URL Hash for information on how to construct the hash correctly. |
hashSalt | Used to salt the return hash used in the 302 Redirect to redirectURL upon the completion of a transaction. |
hash | The verification hash is a combination of the MD5 of your API Passphrase, and specific parameters sent in the transaction. See Transaction Type Hash for information on how to construct the hash correctly. |
Optional Parameters
Parameter | Description |
---|---|
customerName | This field can only contain alphanumeric characters, as well as the full stop and hyphen character. |
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. |
customerPhone | Anything other than +,-, space and 0-9 will be stripped. |
customerEmail | Must be valid if present. Sending this optional parameter is highly recommended. |
logoURL | The URL to an image that will appear in the header of the hosted payment page. Image must be of PNG format and max dimensions of 90x90 pixels and a file size limit of 1500 kilobytes. If no logoURL is supplied a default basket image is used. |
hostedID | The ID of the customized hosted payment page. This can be implemented if multiple hosted payment pages with different logos and banners is a requirement. |
<?xml version="1.0"?>
<mwResponse>
<custom1/>
<custom2/>
<custom3/>
<responseMessage>Transaction approved</responseMessage>
<transactionReferenceID>12345</transactionReferenceID>
<responseCode>0</responseCode>
<authCode>731357421</authCode>
<transactionAmount>10.00</transactionAmount>
<authResponseCode>08</authResponseCode>
<transactionID>1336-20be3569-b600-11e6-b9c3-005056b209e0</transactionID>
<receiptNo>731357421</receiptNo>
<customHash>65b172551b7d3a0706c0ce5330c98470</customHash>
<authSettledDate>2016-11-29</authSettledDate>
<paymentCardNumber>512345XXXXXX2346</paymentCardNumber>
<authMessage>Honour with identification</authMessage>
</mwResponse>
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Transaction approved",
"transactionReferenceID": "12345",
"responseCode": "0",
"authCode": "731357421",
"transactionAmount": "10.00",
"authResponseCode": "08",
"transactionID": "1336-20be3569-b600-11e6-b9c3-005056b209e0",
"receiptNo": "731357421",
"customHash": "65b172551b7d3a0706c0ce5330c98470",
"authSettledDate": "2016-11-29",
"paymentCardNumber": "512345XXXXXX2346",
"authMessage": "Honour with identification"
}
{
"custom1": [],
"custom2": [],
"custom3": [],
"responseMessage": "Transaction approved",
"transactionReferenceID": "12345",
"responseCode": "0",
"authCode": "731357421",
"transactionAmount": "10.00",
"authResponseCode": "08",
"transactionID": "1336-20be3569-b600-11e6-b9c3-005056b209e0",
"receiptNo": "731357421",
"customHash": "65b172551b7d3a0706c0ce5330c98470",
"authSettledDate": "2016-11-29",
"paymentCardNumber": "512345XXXXXX2346",
"authMessage": "Honour with identification"
}<?xml version="1.0"?>
<mwResponse>
<response>https://www.mydomain.com/sample.return.php?status=approved&reference=1-373eb735-bd24-11e6-992a-005056b209e0&transactionReferenceID=12345&hash=c4c5db49d97b21c7898f3e8ed8057b24&custom1=&custom2=&custom3=&customHash=9c8bffd18b890aebf84b27744a205385&message=Transaction+approved&paymentCardNumber=512345XXXXXX2346&transactionAmount=10.00</response>
</mwResponse>
{
"response": "https:\/\/www.mydomain.com\/sample.return.php?status=approved&reference=1-373eb735-bd24-11e6-992a-005056b209e0&transactionReferenceID=12345&hash=c4c5db49d97b21c7898f3e8ed8057b24&custom1=&custom2=&custom3=&customHash=9c8bffd18b890aebf84b27744a205385&message=Transaction+approved&paymentCardNumber=512345XXXXXX2346&transactionAmount=10.00"
}
{
"response": "https:\/\/www.mydomain.com\/sample.return.php?status=approved&reference=1-373eb735-bd24-11e6-992a-005056b209e0&transactionReferenceID=12345&hash=c4c5db49d97b21c7898f3e8ed8057b24&custom1=&custom2=&custom3=&customHash=9c8bffd18b890aebf84b27744a205385&message=Transaction+approved&paymentCardNumber=512345XXXXXX2346&transactionAmount=10.00"
}<?xml version="1.0"?>
<mwResponse>
<custom1/>
<custom2/>
<custom3/>
<dccRate>0.77857</dccRate>
<dccAmt>1045.85</dccAmt>
<responseMessage>Transaction approved</responseMessage>
<transactionReferenceID>12345</transactionReferenceID>
<cardType>visa</cardType>
<dccOriginalCur>AUD</dccOriginalCur>
<responseCode>0</responseCode>
<dccOriginalAmt>1343.30</dccOriginalAmt>
<authCode>731357421</authCode>
<transactionAmount>10.00</transactionAmount>
<authResponseCode>08</authResponseCode>
<transactionID>1336-20be3569-b600-11e6-b9c3-005056b209e0</transactionID>
<receiptNo>731357421</receiptNo>
<dccCur>USD</dccCur>
<dccCom>2.75</dccCom>
<customHash>65b172551b7d3a0706c0ce5330c98470</customHash>
<authSettledDate>2016-11-29</authSettledDate>
<paymentCardNumber>512345XXXXXX2346</paymentCardNumber>
<authMessage>Honour with identification</authMessage>
</mwResponse>
{
"custom1": [],
"custom2": [],
"custom3": [],
"dccRate": "0.77857",
"dccAmt": "1045.85",
"responseMessage": "Transaction approved",
"transactionReferenceID": "12345",
"cardType": "visa",
"dccOriginalCur": "AUD",
"responseCode": "0",
"dccOriginalAmt": "1343.30",
"authCode": "731357421",
"transactionAmount": "10.00",
"authResponseCode": "08",
"transactionID": "1336-20be3569-b600-11e6-b9c3-005056b209e0",
"receiptNo": "731357421",
"dccCur": "USD",
"dccCom": "2.75",
"customHash": "65b172551b7d3a0706c0ce5330c98470",
"authSettledDate": "2016-11-29",
"paymentCardNumber": "512345XXXXXX2346",
"authMessage": "Honour with identification"
}
{
"custom1": [],
"custom2": [],
"custom3": [],
"dccRate": "0.77857",
"dccAmt": "1045.85",
"responseMessage": "Transaction approved",
"transactionReferenceID": "12345",
"cardType": "visa",
"dccOriginalCur": "AUD",
"responseCode": "0",
"dccOriginalAmt": "1343.30",
"authCode": "731357421",
"transactionAmount": "10.00",
"authResponseCode": "08",
"transactionID": "1336-20be3569-b600-11e6-b9c3-005056b209e0",
"receiptNo": "731357421",
"dccCur": "USD",
"dccCom": "2.75",
"customHash": "65b172551b7d3a0706c0ce5330c98470",
"authSettledDate": "2016-11-29",
"paymentCardNumber": "512345XXXXXX2346",
"authMessage": "Honour with identification"
}<?xml version="1.0"?>
<mwResponse>
<response>https://www.mydomain.com/sample.return.php?status=approved&reference=2-e2a1c77b-79ca-11e8-b076-005056b209e0&transactionReferenceID=12345&hash=ecb97ee50f2fecd77fd8e2b9420738cf&custom1=&custom2=&custom3=&customHash=5ffe664050654421284bbc5c4f137adb&message=Transaction+approved&paymentCardNumber=400555XXXXXX0001&transactionAmount=10.00&cardType=visa&dccOriginalCur=AUD&dccOriginalAmt=12.85&dccRate=0.77857&dccCur=USD&dccAmt=10.00&dccCom=2.75</response>
</mwResponse>
{
"response": "https:\/\/www.mydomain.com\/sample.return.php?status=approved&reference=2-e2a1c77b-79ca-11e8-b076-005056b209e0&transactionReferenceID=12345&hash=ecb97ee50f2fecd77fd8e2b9420738cf&custom1=&custom2=&custom3=&customHash=5ffe664050654421284bbc5c4f137adb&message=Transaction+approved&paymentCardNumber=400555XXXXXX0001&transactionAmount=10.00&cardType=visa&dccOriginalCur=AUD&dccOriginalAmt=12.85&dccRate=0.77857&dccCur=USD&dccAmt=10.00&dccCom=2.75"
}
{
"response": "https:\/\/www.mydomain.com\/sample.return.php?status=approved&reference=2-e2a1c77b-79ca-11e8-b076-005056b209e0&transactionReferenceID=12345&hash=ecb97ee50f2fecd77fd8e2b9420738cf&custom1=&custom2=&custom3=&customHash=5ffe664050654421284bbc5c4f137adb&message=Transaction+approved&paymentCardNumber=400555XXXXXX0001&transactionAmount=10.00&cardType=visa&dccOriginalCur=AUD&dccOriginalAmt=12.85&dccRate=0.77857&dccCur=USD&dccAmt=10.00&dccCom=2.75"
}
The processDDebitAuth method is used to initiate an electronic (paperless) direct debit authorization form
Required Parameters
Parameter | Description |
---|---|
method | This field is case sensitive. |
merchantUUID | The value of this parameter is provided to you by Merchant Warrior. |
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. |
customerPhone | Anything other than +,-, space and 0-9 will be stripped. |
customerEmail | Sending this optional parameter is highly recommended. |
paymentAccountBSB | BSB of the account to be debited. This field must contain 6 digits. |
paymentAccountName | The name on the account to be debited. This must contain at the very least a space and no less than two characters. Only alphanumeric characters, hyphens, spaces and full stops are allowed. |
paymentAccountNumber | Account number of the account to be debited. This must be a valid account number. |
transactionCurrency | One of the following: AUD or NZD. |
hash | The verification hash is a combination of the MD5 of your API Passphrase, and specific parameters sent in the transaction. See Transaction Type Hash for information on how to construct the hash correctly. (Field is only required if transactionAmount and transactionCurrency have been set for a DDA) |
returnURL | The customer will be redirected to this URL upon completion of the transaction. |
notifyURL | Asynchronous POST notifications will be sent to this URL. |
urlHash | The urlHash field is a combination of your API Passphrase, and specific parameters sent in the transaction. See Web URL Hash for information on how to construct the hash correctly. |
hashSalt | Used to salt the return hash used in the 302 Redirect to redirectURL upon the completion of a transaction. |
Optional Parameters
Parameter | Description |
---|---|
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. This field is not required if you are submitting a direct debit authorization that has a variable amount. |
logoURL | The URL to an image that will appear in the header of the hosted payment page. Image must be of PNG format and max dimensions of 90x90 pixels and a file size limit of 1500 kilobytes. If no logoURL is supplied a default Direct Debit icon is displayed. |
hostedID | Digits only. The ID of the customized hosted payment page. This can be implemented if multiple hosted DDA pages with different logos and banners are a requirement. |
custom1 | Freeform field. Returned as |
custom2 | Freeform field. Returned as |
custom3 | Freeform field. Returned as |
<?xml version="1.0"?>
<mwResponse>
<custom1>Test Field</custom1>
<custom2/>
<custom3/>
<fingerprint>f0ab06f8d69d3dafa06a5abd45460ace</fingerprint>
<responseMessage>DDA approved</responseMessage>
<paymentAccountBSB>123456</paymentAccountBSB>
<hash>da407c1d6ebc1ed405109497d1e0caa5</hash>
<responseCode>0</responseCode>
<paymentAccountNumber>987456123</paymentAccountNumber>
<paymentAccountName>John Doe</paymentAccountName>
<customerEmail>[email protected]</customerEmail>
<customHash>9f61558611bd58b97ea9f505536f5101</customHash>
</mwResponse>
{
"custom1": "Test Field",
"custom2": [],
"custom3": [],
"fingerprint": "f0ab06f8d69d3dafa06a5abd45460ace",
"responseMessage": "DDA approved",
"paymentAccountBSB": "123456",
"hash": "da407c1d6ebc1ed405109497d1e0caa5",
"responseCode": "0",
"paymentAccountNumber": "987456123",
"paymentAccountName": "John Doe",
"customerEmail": "[email protected]",
"customHash": "9f61558611bd58b97ea9f505536f5101"
}
{
"custom1": "Test Field",
"custom2": [],
"custom3": [],
"fingerprint": "f0ab06f8d69d3dafa06a5abd45460ace",
"responseMessage": "DDA approved",
"paymentAccountBSB": "123456",
"hash": "da407c1d6ebc1ed405109497d1e0caa5",
"responseCode": "0",
"paymentAccountNumber": "987456123",
"paymentAccountName": "John Doe",
"customerEmail": "[email protected]",
"customHash": "9f61558611bd58b97ea9f505536f5101"
}
This is a full list of the parameters that can be send in the style parameter with the hosted payment page request. If a parameter isn't sent, the hosted payment page will use the default value listed.
Parameter | Default | Description |
---|---|---|
fieldHeight | 40px | The height of the payment page elements Example: fieldHeight: '60px' |
border | 1px solid #e6ebf1 | The border of the payment page elements Example: border: '2px dashed red' |
borderBottom | border Parameter | The bottom border of the payment page elements Example: borderBottom: '4px dotted blue' |
borderColor | border Parameter | The border color of the payment page elements Example: borderColor: '#b13af2' |
borderLeft | border Parameter | The left border of the payment page elements Example: borderLeft: '4px dotted blue' |
borderRadius | 4px | The radius of the payment page element borders Example: borderRadius: '0px 30%' |
borderRight | border Parameter | The right border of the payment page elements Example: borderRight: '4px dotted blue' |
borderTop | border Parameter | The top border of the payment page elements Example: borderTop: '4px dotted blue' |
textColor | #32325d | The text color of the payment page elements Example: textColor: 'green' |
backgroundColor | White | The background color of the payment page elements Example: backgroundColor: 'yellow' |
errorTextColor | red | The error text color of the payment page elements Example: errorTextColor: 'orange' |
errorBackgroundColor | #ffdddd | The error background color of the payment page elements Example: errorBackgroundColor: 'none' |
errorBorderColor | red | The error border color of the payment page elements Example: errorBorderColor: 'black' |
direction | ltr(Left to Right) | The direction of the payment page element text Example: direction: 'rlt' |
font | 18px Helvetica Neue | The font of the payment page elements Example: font: '20px Times New Roman' |
fontFamily | font Parameter | The font family of the payment page elements Example: fontFamily: 'Arial' |
fontSize | font Parameter | The font size of the payment page elements Example: fontSize: '20px' |
fontSizeAdjust | font Parameter | The font size adjust of the payment page elements Example: fontSizeAdjust: '0.58' |
fontStretch | font Parameter | The font stretch of the payment page elements Example: fontStretch: 'condensed' |
fontStyle | font Parameter | The font style of the payment page elements Example: fontStyle: 'italic' |
fontVariant | normal | The font variant of the payment page elements Example: fontVariant: 'small-caps' |
fontVariantAlternates | normal | The font alternate variant of the payment page elements Example: fontVariantAlternates: 'historical-forms' |
fontVariantCaps | normal | The font caps variant of the payment page elements Example: fontVariantCaps: 'all-small-caps' |
fontVariantEastAsian | normal | The font East Asian variant of the payment page elements Example: fontVariantEastAsian: 'ruby' |
fontVariantLigatures | normal | The font ligatures variant of the payment page elements Example: fontVariantLigatures: 'common-ligatures' |
fontVariantNumeric | normal | The font numeric variant of the payment page elements Example: fontVariantNumeric: 'slashed-zero' |
fontWeight | normal | The font weight of the payment page elements Example: fontWeight: 'bold' |
letterSpacing | normal | The letter spacing of the payment page elements Example: letterSpacing: '2px' |
lineHeight | normal | The line height of the payment page elements Example: lineHeight: '80%' |
margin | 3px | The margin of the payment page elements Example: margin: '10px 12px' |
marginBottom | margin Parameter | The bottom margin of the payment page elements Example: marginBottom: '8px' |
marginLeft | margin Parameter | The left margin of the payment page elements Example: marginLeft: '8px' |
marginRight | margin Parameter | The right margin of the payment page elements Example: marginRight: '8px' |
marginTop | margin Parameter | The top margin of the payment page elements Example: marginTop: '8px' |
opacity | 1 | The opacity of the payment page elements Example: opacity: '0.8' |
outline | none | The outline of the payment page elements Example: outline: '2px dashed pink' |
outlineColor | outline Parameter | The outline color of the payment page elements Example: outlineColor: 'green' |
outlineStyle | outline Parameter | The outline style of the payment page elements Example: outlineStyle: 'solid' |
outlineWidth | outline Parameter | The outline width of the payment page elements Example: outlineWidth: '4px' |
padding | 10px 12px | The padding of the payment page elements Example: padding: '15px' |
paddingBottom | padding Parameter | The bottom padding of the payment page elements Example: paddingBottom: '12px' |
paddingLeft | padding Parameter | The left padding of the payment page elements Example: paddingLeft: '12px' |
paddingRight | padding Parameter | The right padding of the payment page elements Example: paddingRight: '12px' |
paddingTop | padding Parameter | The top padding of the payment page elements Example: paddingTop: '12px' |
textShadow | none | The text shadow of the payment page elements Example: textShadow: '2px 2px gray' |
transition | none | The transition of the payment page elements Example: transition: 'width 2s' |
mozAppearance | none | The appearance of the payment page elements on Firefox Example: mozAppearance: 'button' |
mozOsxFontSmoothing | auto | The font smoothing of the payment page elements in Firefox on Mac OS Example: mozOsxFontSmoothing: 'grayscale' |
mozTapHighlightColor | black | The tap highlight color of the payment page elements on Firefox Example: mozTapHighlightColor: 'red' |
webkitAppearance | none | The appearance of the payment page elements on WebKit- and Blink-based browsers Example: webkitAppearance: 'button' |
webkitFontSmoothing | auto | The font smoothing of the payment page elements in WebKit- and Blink-based browsers Example: webkitFontSmoothing: 'antialiased' |
webkitTapHighlightColor | black | The tap highlight color of the payment page elements on WebKit-and Blink-based browsers Example: webkitTapHighlightColor: 'red' |
cardImageAlignment | left | The alignment of the card image in the card number field Example: cardImageAlignment: 'right' Options: 'left', 'right', 'none' |
cardImageSize | half | The size of the card image in the card number field Example: cardImageSize: 'full' Options: 'half', 'full' |
cardImageAnimation | enabled | The animation of the card image in the card number field upon successful validation Example: cardImageAnimation: 'disabled' Options: 'enabled', 'disabled' |
cardIconSet | 0 | The cardIconSet to use for the cardImages. If greater than 0, the chosen icon set will also be used for the accepted card type icons below Example: cardIconSet: '1' Options: '0', '1', '2' |
cardTypeDisplay | enabled | The display of icons of the accepted card types Example: cardTypeDisplay: 'disabled' Options: 'enabled', 'disabled' |
errorDisplayMode | label | The display mode of the field validation errors Example: errorDisplayMode: 'popup' Options: 'label', 'popup' |
Card Icon Sets
Index | Icons |
---|---|
0 | Set uses Font Awesome icons instead of images. This is the default icon set that is used if no index, or an invalid index, is sent. |
1 | ![]() ![]() ![]() ![]() ![]() ![]() |
2 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() |