Digital Wallet API

The Digital Wallet API provides you with the ability to implement digital wallets on web and mobile

Endpoints

getMerchantSession (Sandbox)
POST https://base.merchantwarrior.com/applepay/ Copy

getMerchantSession (Production)
POST https://api.merchantwarrior.com/applepay/ Copy

processCard (Sandbox)
POST https://base.merchantwarrior.com/post/ Copy

processCard (Production)
POST https://api.merchantwarrior.com/post/ Copy

processCard

The processCard method is the method used to perform a purchase request. This is a modified version of the Direct API processCard, with the payment card fields replaced by digitalWalletToken.

NOTE: Due to the way Apple Pay and Google Pay work, surcharging is not available on digital wallet transactions.

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

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

digitalWalletToken

The token given you by your wallet provider (e.g. Apple Pay, Google Pay).

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.
Example: e9ddc296b76b3398934bfc06239073df
Valid length: 32 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

threeDSToken

This parameter is used to indicate if a transaction has been authenticated. Its value is returned by checkPARes method.

recurringFlag

This parameter is used to indicate if a transaction will be marked as recurring. Its value must be 0 or 1.
Example: 1

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

customerIP

Any valid IPv4 or IPv6 address is accepted. Sending this optional parameter is highly recommended.
Example: 123.456.789.012 or 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Valid length: Up to 39 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

applepayApplicationPrimaryAccountNumber

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

applepayApplicationExpirationDate

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

applepayOnlinePaymentCryptogram

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

googlepayPan

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

googlepayExpirationMonth

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

googlepayExpirationYear

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

googlepayCryptogram

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

googlepayEciIndicator

If you wish to send decrypted wallet token values, it can be done here. Only use this field if you have a specific requirement for it. If this field is used, the digitalWalletToken field is no longer mandatory.

addCard

The addCard method is used to add a new card to the MW Vault. This is a modified version of the Token Payments addCard method, with the payment card fields replaced by digitalWalletToken.

Required Parameters

Parameter Description
method

This field is case sensitive.
Example: addCard

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

digitalWalletToken

The token given you by your wallet provider (e.g. Apple Pay, Google Pay)

Copy
curl --location --request POST 'https://api.merchantwarrior.com/post/' \
	--header 'Content-Type: application/x-www-form-urlencoded' \
	--data-urlencode 'method=addCard' \
	--data-urlencode 'merchantUUID=5265f8eed6a19' \
	--data-urlencode 'apiKey=ksmnwxab' \
	--data-urlencode 
'digitalWalletToken={"data":"Ti5Lz0qwJ+V6YoAv1iLr8GiS3C5TkRY7LZpAZZVkDpKAwdKM0FLHeUH7aD
5ePJShB04uiDVUeO0h0+kU3S5xAwlpHD5N2f4aCwXCJ0jUn4g9EGViDOwG5MyeJrQ8blBEG+qXybQ+G
V67RP2tA9WFGrACQyt9dyOXUb4obX6p6VJJUzbXhMO0EYobu2eWWmq395h9vKjt1RdznoA4RUzRy+d
fI/NBwO8ROW7+icoDmKJIQ0s37F22HOOed <large amount of data trimmed for sample>"},"version":"EC_v1"}'
curl --location --request POST 'https://api.merchantwarrior.com/post/' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'method=addCard' \ --data-urlencode 'merchantUUID=5265f8eed6a19' \ --data-urlencode 'apiKey=ksmnwxab' \ --data-urlencode 'digitalWalletToken={"data":"Ti5Lz0qwJ+V6YoAv1iLr8GiS3C5TkRY7LZpAZZVkDpKAwdKM0FLHeUH7aD 5ePJShB04uiDVUeO0h0+kU3S5xAwlpHD5N2f4aCwXCJ0jUn4g9EGViDOwG5MyeJrQ8blBEG+qXybQ+G V67RP2tA9WFGrACQyt9dyOXUb4obX6p6VJJUzbXhMO0EYobu2eWWmq395h9vKjt1RdznoA4RUzRy+d fI/NBwO8ROW7+icoDmKJIQ0s37F22HOOed "},"version":"EC_v1"}'
No sample available
No sample available
No sample available
No sample available
No sample available
No sample available
No sample available
No sample available
No sample available
No sample available
No sample available
No sample available
Copy
<?xml version="1.0"?>
<mwResponse>
  <custom1/>
  <custom2/>
  <custom3/>
  <responseMessage>Operation successful</responseMessage>
  <transactionReferenceID/>
  <cardID>CBUZ76180275</cardID>
  <responseCode>0</responseCode>
  <cardKey>WI4qedW808sdWIAi</cardKey>
  <ivrCardID>76180275</ivrCardID>
  <cardNumber>520424XXXXXX6937</cardNumber>
</mwResponse>
Operation successful CBUZ76180275 0 WI4qedW808sdWIAi 76180275 520424XXXXXX6937
{
    "custom1": "",
    "custom2": "",
    "custom3": "",
    "responseMessage": "Operation successful",
    "transactionReferenceID": "",
    "cardID": "CBUZ76180275",
    "responseCode": "0",
    "cardKey": "WI4qedW808sdWIAi",
    "ivrCardID": "76180275",
    "cardNumber": "520424XXXXXX6937"
}
{ "custom1": "", "custom2": "", "custom3": "", "responseMessage": "Operation successful", "transactionReferenceID": "", "cardID": "CBUZ76180275", "responseCode": "0", "cardKey": "WI4qedW808sdWIAi", "ivrCardID": "76180275", "cardNumber": "520424XXXXXX6937" }
Apple Pay

For more information on integrating Apple Pay into your web or mobile application, please refer to the following guides.

Please note: All Apple Pay testing should be done from a dedicated Apple Pay test account that has been loaded with a test card from here.

Google Pay

For more information on integrating Google Pay™ into your web or mobile application, please refer to the following guides.

getMerchantSession

The getMerchantSession method is used to create an Apple Pay merchant session

Required Parameters

Parameter Description
method

This field is case sensitive.
Example: getMerchantSession

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

validationURL

The URL that is returned by Apple Pay server.

domainName

The domain name where the Apple Pay button is displayed.
Example: www.example.com

displayName

A string that represents your store and will be displayed in the payment sheet.
Valid length: Up to 64 characters.

decryptApplePayToken

This method is deprecated. Merchants are encouraged to send their token using a processCard request.

Required Parameters

Parameter Description
method

This field is case sensitive.
Example: decryptApplePayToken

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

applePayToken

The payment token that is returned by Apple Pay server.