The Digital Wallet API provides you with the ability to implement digital wallets on web and mobile
- Endpoints
-
processCard
The processCard method is the method used to perform a purchase request
-
addCard
The addCard method is used to add a new card to the MW Vault
- Apple Pay
- Google Pay
-
getMerchantSession
The getMerchantSession method is used to create an Apple Pay merchant session
-
decryptApplePayToken
[Deprecrated] The decryptApplePayToken method is used to decrypt a payment token received from the Apple Pay Server
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
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. |
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. |
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. |
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. |
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. |
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. |
customerPhone | Anything other than +,-, space and 0-9 will be stripped. |
customerEmail | Must be valid if present. Sending this optional parameter is highly recommended. |
customerIP | Any valid IPv4 or IPv6 address is accepted. 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 |
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. |
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. |
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. |
digitalWalletToken | The token given you by your wallet provider (e.g. Apple Pay, Google Pay) |
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 No sample available
No sample availableNo sample available
No sample availableNo sample available
No sample availableNo sample available
No sample availableNo sample available
No sample availableNo sample available
No sample available<?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>
{
"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"
}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.
For more information on integrating Google Pay™ into your web or mobile application, please refer to the following guides.
The getMerchantSession method is used to create an Apple Pay merchant session
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. |
validationURL | The URL that is returned by Apple Pay server. |
domainName | The domain name where the Apple Pay button is displayed. |
displayName | A string that represents your store and will be displayed in the payment sheet. |
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. |
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. |
applePayToken | The payment token that is returned by Apple Pay server. |