Notifications
Notifications
You can request notifications be sent following transactions on the Payment Pages.
Configuring notifications
Click the headings below to learn how to configure notifications that are sent following different transaction outcomes:
Customer email notifications (optional) These are sent to the email address specified in the billingemail field. They are configured to be sent to customers following payment, summarising the transaction and acting as a receipt of payment for their records. By default, they look like this: It is simple to enable email notifications on a transaction-by-transaction basis. For requests where you would like to receive customer email notifications, you will need to add the following fields to your POST to the Payment Pages: Customer email notifications are only sent when the following criteria have been met: You can customise the appearance of email notifications: Click here for further information. You can use the MyST Rule Manager to perform advanced customisation: Merchant email notifications (optional) These are configured to be sent to members of your company or organisation, and are sent to an email address of your choosing. By default, they look like this: It is simple to enable email notifications on a transaction-by-transaction basis. For requests where you would like to receive merchant email notifications, you will need to add the following fields to your POST to the Payment Pages: Note: You can specify multiple recipients provided addresses are comma-separated: Merchant email notifications are only sent when the following criteria have been met: You can customise the appearance of email notifications: Click here for further information. You can use the MyST Rule Manager to perform advanced customisation: URL notifications (optional) You can configure URL notifications to be submitted to your system automatically whenever transactions are processed on your site. We support three types of URL notifications, which can be enabled/disabled independently of each other, by updating your HTTPS POST with the examples below: You must configure your system to accept the incoming URL notifications on port 443. If the response site security hash is correct, your system must respond with an HTTP 200 OK response (e.g. “HTTP/1.0 200 OK”) within 8 seconds of receiving a notification. One notification is sent per request, but if your system does not respond, Trust Payments will continue to resend notifications for up to 48 hours until confirmation is received. If we do not receive confirmation within 48 hours, we will send an email with further details to the default email address associated with your site reference (contact our Support Team to update this address). URL notifications using system rules (STR-x) will include the following fields of information, by default: If request site security is enabled on your site, the notification will also include the response site security hash (this is covered in further detail below). If you would like to include additional fields, you can update your HTTPS POST to include stextraurlnotifyfields. The following example will include the billing first name, last name and email address in a URL notification, in addition to the default fields listed above: Replace <DOMAIN> with a supported domain. Click here for a full list. Important: The names of all additional fields to be returned in the notification need to be included in the string used to generate your request site security hash. Failure to do so will result in the customer being shown an “Invalid details” error message. If request site security is enabled on your site, you will also receive a hashed responsesitesecurity value in any URL notifications sent to your system. We strongly recommend that you recalculate the responsesitesecurity hash returned, to ensure it has not been modified by a customer or third party and that the fields were sent by Trust Payments. After you have configured notifications, now is a good time to learn how to manage your transactions and perform refunds.
<!--Sends email confirmation to the customer, following successful transaction:-->
<input type=hidden name="ruleidentifier" value="STR-2">
<!--Sends email confirmation to the customer, following declined transaction:-->
<input type=hidden name="ruleidentifier" value="STR-3">
Additional notes
<!--Sends email confirmation to the merchant, following successful transaction:-->
<input type=hidden name="ruleidentifier" value="STR-4">
<!--Sends email confirmation to the merchant, following declined transaction:-->
<input type=hidden name="ruleidentifier" value="STR-5">
<!--IMPORTANT: You also need to include the merchant’s email address for merchant emails to work-->
<input type=hidden name="merchantemail" value="[email protected]">
e.g. “[email protected],[email protected]”Additional notes
<!--This enables the successful URL notification rule-->
<input type=hidden name="ruleidentifier" value="STR-8">
<!--Successful URL notification destination-->
<input type=hidden name="successfulurlnotification" value="http://yourwebsite.com/successful">
<!--This enables the declined URL notification rule-->
<input type=hidden name="ruleidentifier" value="STR-9">
<!--Declined URL notification destination-->
<input type=hidden name="declinedurlnotification" value="http://yourwebsite.com/declined">
<!--This enables the all URL notification rule-->
<input type=hidden name="ruleidentifier" value="STR-10">
<!--All URL notification destination-->
<input type=hidden name="allurlnotification" value="http://yourwebsite.com/all">
Handling URL notifications
Fields returned
<form method="POST" action="<DOMAIN>/process/payments/choice">
...
<input type="hidden" name="ruleidentifier" value="STR-10">
<input type="hidden" name="allurlnotification" value="http://www.yourwebsite.com/all">
<input type="hidden" name="stextraurlnotifyfields" value="billingfirstname">
<input type="hidden" name="stextraurlnotifyfields" value="billinglastname">
<input type="hidden" name="stextraurlnotifyfields" value="billingemail">
...
<input type="submit" value="Pay">
</form>