Contents

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:


<!--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">

Warning
Any rule identifiers submitted (e.g. “STR-2”) 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.

 

Additional notes

  • All emails are sent from [email protected].
  • Email notifications for successful transactions have the subject: “Successful transaction processed”.
  • Email notifications for declined transactions have the subject: “Transaction declined”.
  • If you are translating your Payment Pages by specifying a custom locale in the HTTPS POST, the content of the customer email notification will also be translated.

 

Customer email notifications are only sent when the following criteria have been met:

  • The rule has been configured and activated on your site reference.
  • The billingemail field must be submitted in the HTTPS POST, or entered by the customer on the Payment Pages.

 

External

You can customise the appearance of email notifications:

  • Specify the information to be displayed.
  • Use HTML to completely redesign the layout of the email.

Click here for further information.

 


 

You can use the MyST Rule Manager to perform advanced customisation:

  • Configure additional email rules that have more specific conditions.
  • Specify the reply to address and the subject.

Click here for further information.

 


 

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:


<!--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]">

Warning
Any rule identifiers submitted (e.g. “STR-4”) and the merchant email address (if submitted) 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.

 

Note: You can specify multiple recipients provided addresses are comma-separated:
e.g. “[email protected],[email protected]

 

Additional notes

  • All emails are sent from [email protected]
  • Email notifications for successful transactions have the subject: “Successful transaction processed”.
  • Email notifications for declined transactions have the subject: “Transaction declined”.

 

Merchant email notifications are only sent when the following criteria have been met:

  • The rule has been configured and activated on your site reference.
  • The merchantemail field must be submitted in the HTTPS POST.

 

External

You can customise the appearance of email notifications:

  • Specify the information to be displayed.
  • Use HTML to completely redesign the layout of the email.

Click here for further information.

 


 

You can use the MyST Rule Manager to perform advanced customisation:

  • Configure additional email rules that have more specific conditions.
  • Specify the reply to address and the subject.

Click here for further information.

 


 

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:


<!--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">

Warning
Any rule identifiers included in your post (e.g. “STR-8”) and the URLs submitted for 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.

 


 

Handling URL notifications

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).

 

Fields returned

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:


<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>

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.

 

 


 

Tick
Your progress

After you have configured notifications, now is a good time to learn how to manage your transactions and perform refunds.

 


Click here to continue >>>