- Endpoints
- Introduction
-
Generate PayLink
This method details how to generate a unique payment link
Sandbox
POST
https://base.merchantwarrior.com/paylink/
Copy
Production
POST
https://api.merchantwarrior.com/paylink/
Copy
The Merchant Warrior MWPAY.Link service enables you to generate a unique payment link that when accessed will allow your customer to complete a payment via a secure Hosted Payment Page.
Each MWPAY.Link that is generated will have a unique code attached to it. You can also link your own internal Reference ID to a unique code in order to reconcile transactions that take place via a unique payment link. The MWPAY.Link service can also notify your systems in real-time after a customer has completed a payment.
MWPAY.Link URLs are useful for scenarios such as sending bills via email and/or SMS, e-invoices, donations etc.
You will need to obtain a Merchant UUID, API Key and API passphrase in order to use this feature. These details will be issued to you when you create your MW account.
This method details how to generate a unique payment link
Required Parameters
Parameter | Description |
---|---|
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 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. This parameter can also be hardcoded via the merchant administration interface. |
notifyURL | Asynchronous POST notifications will be sent to this URL. This parameter can also be hardcoded via the merchant administration interface. |
urlHash | The urlHash field is a combination of your API Passphrase, and specific parameters sent in the transaction. It must be specified if you specify either returnURL or notifyURL. See Web URL Hash for information on how to construct the hash correctly. |
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 |
---|---|
referenceText | This parameter is used to describe the order/product ID or reference. It will be placed next to the transactionProduct mentioned above in the payment page. |
linkReferenceID | This is a merchant's unique reference ID that can be used to match a uniqueCode with a merchant's internal reference ID. |
expiry | The expiration of the unique payment link. This paramater should be formatted as a DateTime (yyyy-mm-dd hh:mm:ss). By default the unique payment link will expire after 7 days. |
sendEmail | This value is a boolean denoting whether to automatically send an email to the customer with the unique payment link |
reminderFrequency | How often to send a reminder email to the customer if the unique payment link is unpaid. Reminder emails will only be sent if the sendEmail parameter was set to true. If this value is not set, or 0, no reminder emails will be sent |
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 | Must be valid if present. Sending this optional parameter is highly recommended. |
custom1 | Freeform field. |
custom2 | Freeform field. |
custom3 | Freeform field. |