Configuring Probability of Harm (ProbH)

  Last updated: 

  Overview of ProbH

  1. Submit a PROBH request to Trust Payments.
  2. Trust Payments uses machine learning and other techniques to analyse the customer's betting history to determine the probability of harm.
  3. PROBH response is returned, containing a score between 0 and 100% (represented as an integer between 0.000 and 1.000). A value near 0% suggests very low risk to the customer and a value near 100% suggests very high risk.
  4. If you determine the level of risk is too high, stop the transaction process and show a warning to the customer. Otherwise, proceed to process the transaction.

  While a higher harm score suggests a higher risk and a lower score suggests a lower risk, please note that Trust Payments will never directly label a transaction as high or low risk. Harm scores are indicators to take into consideration when deciding whether to proceed with a transaction. For this reason, Trust Payments will never automatically allow/block customers from transacting with your business without you explicitly configuring your account to do so.

Because every business and customer is different, you will need to review trends surfaced by ProbH and define your own practices regarding what level of risk is normal/acceptable to take on. For example, some operators may have a lower tolerance for customer risk, and as such, may block transactions more readily. While the very nature of gambling makes it practically impossible to eliminate all risk, it is important your business strikes a healthy balance that takes the necessary steps to sufficiently protect your customers.

  Processing PROBH request

  The PROBH request is used to trigger a Probability of Harm (ProbH) check on the customer identified in the request.

To perform a ProbH check, your system will need to submit a PROBH request and interpret the response returned. The PROBH request requires data that we will use to identify the customer; there are three methods we support:

  1. Partial PAN - Submit the customer's masked card number.
  2. Parent - Submit a reference to a customer's card stored on Trust Payment's servers from a previous request.
  3. Full PAN - Submit the customer's full card number.

See below for request examples for all three methods described above:

Partial PAN
Python PHP cURL Raw JSON Raw XML
#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

probh = {
"accounttypedescription": "HARMDETECTION",
"expirydate": "09/2024",
"maskedpan": "411111######1111",
"requesttypedescription": "PROBH",
"sitereference": "site12346"
}

strequest = securetrading.Request()
strequest.update(probh)
stresponse = st.process(strequest) #stresponse contains the transaction response

Replace <DOMAIN> with a supported domain. Click here for a full list.

Parent
Python PHP cURL Raw JSON Raw XML
#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

probh = {
"accounttypedescription": "HARMDETECTION",
"parenttransactionreference": "1-2-345",
"requesttypedescription": "PROBH",
"sitereference": "site12346"
}

strequest = securetrading.Request()
strequest.update(probh)
stresponse = st.process(strequest) #stresponse contains the transaction response

Replace <DOMAIN> with a supported domain. Click here for a full list.

Full PAN
Python PHP cURL Raw JSON Raw XML
#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

probh = {
"accounttypedescription": "HARMDETECTION",
"expirydate": "09/2024",
"pan": "4111111111111111",
"requesttypedescription": "PROBH",
"sitereference": "site12346"
}

strequest = securetrading.Request()
strequest.update(probh)
stresponse = st.process(strequest) #stresponse contains the transaction response

Replace <DOMAIN> with a supported domain. Click here for a full list.

PROBH Request Field Specification
  Field Format Description
  Required accounttypedescription
XPath: /operation/accounttypedescription
Alpha (20) Only “HARMDETECTION” (e-commerce) is supported.
  Required requesttypedescription
XPath: /@type
Alpha (20) The value in the request must be “PROBH”.
  Required sitereference
XPath: /operation/sitereference
Alphanumeric & underscore (50) The site reference relates to your individual account which you received on setup. If you do not know your site reference, please contact our Support Team.
  Conditional currencyiso3a
XPath: /billing/amount/@currencycode
ISO3A

The currency associated with the baseamount.

Only required if submitting the baseamount.

  Conditional expirydate
XPath: /billing/payment/expirydate
Date MM/YYYY

The expiry date printed on the card.

This field is required when submitting a full or partial PAN to complete the checks.

  Conditional maskedpan
XPath: /billing/payment/maskedpan
Alphanumeric including “#” (12-19)

This is the long number printed on the front of the customer’s card, partially masked with "#" characters.

Either the pan or maskedpan field is required, unless you are instead submitting the parenttransactionreference field to use previously-stored payment credentials to complete the checks.

  Conditional pan
XPath: /billing/payment/pan
Numeric (12-19)

This is the long number printed on the front of the customer’s card.

Either the pan or maskedpan field is required, unless you are instead submitting the parenttransactionreference field to use previously-stored payment credentials to complete the checks.

  Conditional parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)

Allows you to specify the transactionreference of a previous request where payment credentials of a previous customer have been stored (We call this process Tokenization). This means your system does not need to prompt returning customers to re-enter their payment credentials prior to performing the ProbH check.

This field is required if the card details are not included in the PROBH request.

  Optional baseamount
XPath: /billing/amount
Numeric (11) This amount being deposited by the customer, submitted in base units, with no commas or decimal points, e.g. €10 is submitted as 1000. This value must be greater than zero.
  Optional paymenttypedescription
XPath: /billing/payment/@type
Alpha (20)

The customer's card type. This value is stored and shown in Portal. The following values can be submitted:

  • DELTA
  • ELECTRON
  • MAESTRO
  • MASTERCARD
  • MASTERCARDDEBIT
  • PURCHASING
  • VISA
  • VPAY

  Handling PROBH response

There are three main outcomes following the submission of a PROBH request:

  1. Score - Harm score was successfully generated using recent data and returned in the response. The score is between 0.000 and 1.000.
  2. No Score - There is no indication for gambling harm looking at the Trust Payments gambling merchants and debt restructuring agencies data over the last year.
  3. Error - The PROBH request failed and no harm score could be returned as a result. You will need to check the errorcode and errormessage returned in the response to identify the cause for the failure (e.g. problems with syntax or absence of required fields in the request).

See below for response examples for all three outcomes described above:

Score
Python PHP Raw JSON Raw XML
{
'requestreference': 'A0bxh87wt',
'version': '1.00',
'responses': [{
'accounttypedescription': 'HARMDETECTION',
'acquirerresponsemessage': 'OK',
'baseamount': '1050',
'currencyiso3a': 'GBP',
'errorcode': '0',
'errormessage': 'Ok',
'harmscore': '0.59',
'harmscoreforecast': '0',
'livestatus': '1',
'maskedpan': '411111######1111',
'merchantname': 'My Shop',
'merchantnumber': '1234567890',
'operatorname': 'webservices@example.com',
'paymenttypedescription': 'VISA',
'requesttypedescription': 'PROBH',
'settleduedate': '2023-05-25',
'settlestatus': '0',
'transactionreference': '1-2-345',
'transactionstartedtimestamp': '2023-05-25 12:16:53'
}]
}

Replace <DOMAIN> with a supported domain. Click here for a full list.

No score
Python PHP Raw JSON Raw XML
{
'requestreference': 'A0bxh87wt',
'version': '1.00',
'responses': [{
'accounttypedescription': 'HARMDETECTION',
'acquirerresponsemessage': 'NOT_FOUND',
'baseamount': '1050',
'currencyiso3a': 'GBP',
'errorcode': '0',
'errormessage': 'Ok',
'harmscoreforecast': '0',
'livestatus': '1',
'maskedpan': '411111######1111',
'merchantname': 'My Shop',
'merchantnumber': '1234567890',
'operatorname': 'webservices@example.com',
'paymenttypedescription': 'VISA',
'requesttypedescription': 'PROBH',
'settleduedate': '2023-05-25',
'settlestatus': '0',
'transactionreference': '1-2-345',
'transactionstartedtimestamp': '2023-05-25 12:16:53'
}]
}

Replace <DOMAIN> with a supported domain. Click here for a full list.

Error returned
Python PHP Raw JSON Raw XML
{
'requestreference': 'A0bxh87wt',
'version': '1.00',
'responses': [{
'accounttypedescription': 'HARMDETECTION',
'baseamount': '1050',
'currencyiso3a': 'GBP',
'errorcode': '60010',
'errormessage': 'Bank System Error',
'livestatus': '1',
'maskedpan': '411111######1111',
'merchantname': 'My Shop',
'merchantnumber': '1234567890',
'operatorname': 'webservices@example.com',
'paymenttypedescription': 'VISA',
'requesttypedescription': 'PROBH',
'settleduedate': '2023-05-25',
'settlestatus': '0',
'transactionreference': '1-2-345',
'transactionstartedtimestamp': '2023-05-25 12:16:53'
}]
}

Replace <DOMAIN> with a supported domain. Click here for a full list.

PROBH Response Field Specification
  Field Format Description
  Returned accounttypedescription
XPath: /operation/accounttypedescription
Alpha (20) “HARMDETECTION” is returned in the response.
  Returned baseamount
XPath: /billing/amount
Numeric (13) The amount of the transaction in base units, with no commas or decimal points, so £10 is submitted as 1000.
  Returned currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3)

The currency of the transaction.

Click here for a full list of available currencies.

  Returned errorcode
XPath: /error/code
Numeric (1-5) The error code should be used to determine if the request was successful or not.
  • If the error code is “0” then the transaction was successful.
  • If the error code is not “0” then the transaction was not successful.

Click here for a full list of errorcode message values.

  Returned errormessage
XPath: /error/message
Alphanumeric (255) This provides a brief explanation as to the cause of the error.

For successful transactions, this is returned as “Ok”.

Click here for a full list of errormessage values.

  Returned livestatus
XPath: /live
Numeric (1)
  • 0 – Request processed using a test account.
  • 1 – Request processed using a live account.
  Returned maskedpan
XPath: /billing/payment/pan
Alphanumeric including “#” (12-19)

The masked customer's card number. Most of the number is intentionally obscured by “#” characters, e.g. 411111######0211.

  Returned merchantname
XPath: /merchant/merchantname
Alphanumeric (255) The merchant name associated with the account used to process the transaction. Provided by the acquiring bank.
  Returned merchantnumber
XPath: /merchant/merchantnumber
Alphanumeric (32) The merchant number that was used to process the transaction. Provided by the acquiring bank.
  Returned operatorname
XPath: /merchant/operatorname
Alphanumeric (255) The value of this field contains the name of the user that processed the request.
  Returned paymenttypedescription
XPath: /billing/payment/@type
Alpha (20) Payment method (e.g. “VISA” or “MASTERCARD”).
  Returned requesttypedescription
XPath: /@type
Alpha (20) “PROBH” is returned in the response.
  Returned settleduedate
XPath: /settlement/settleduedate
Date YYYY-MM-DD The date on which the transaction will be settled.
  Returned settlestatus
XPath: /settlement/settlestatus
Numeric (3)

The settle status.

  Returned transactionreference
XPath: /transactionreference
Alphanumeric including
hyphens (25)
A unique reference for the request assigned by Trust Payments.
  Returned transactionstartedtimestamp
XPath: /timestamp
Date time YYYY-MM-DD hh:mm:ss The time the request was processed.
  Conditional acquirerresponsecode
XPath: /acquirerresponsecode
Alphanumeric (255)

Used by your acquirer to indicate the outcome of the request.


Only returned following successful requests.

  Conditional harmscore
XPath: /harmscore
Numeric (4)

A score between 0 and 100%, represented in the PROBH response as a decimal between 0 and 1.0.

A value near 0% suggests very low risk to the customer and a value near 100% suggests very high risk.

You can use this harm score as a tool to help make more informed decisions when it comes to safeguarding your customers from harmful gambling behaviour.


If the harmscore isn't returned, this suggests two possibilities:

  1. We do not have enough information to generate a reliable harmscore for this customer. This is normally because they have little or no history of gambling or debt restructuring in the last year. In this scenrio, the errorcode returned is 0 (indicating success) and the acquirerresponsecode is "NOT_FOUND".
  2. If an error has occurred, the errorcode returned will NOT be 0. In this scenario, check the errorcode and errormessage against our full list and respond accordingly.
  Conditional harmscoreforecast
XPath: /harmscoreforecast
Numeric (1)

When recent gambling behaviour isn't available for the customer, we will look back further into their gambling history and instead retrieve a harm score we have generated in the past (if one can be found). We artificially lower older harm scores to allow metrics that may have once generated an elevated harm score to become less influential over time.

Two values can be returned:

  • "1" (Yes) - Harm score returned was not generated recently and has therefore been lowered to reflect this.
  • "0" (No) - Harm score was generated recently and has therefore been returned unchanged.

Not returned if an error has occured.

  Conditional errordata
XPath: /error/data
Alphanumeric (255)

Additional information to help troubleshoot the error.


Only returned if there has been an error.

 

    Back:   Introduction  Next:   Keeping track of harm scores    

Was this article helpful?
0 out of 0 found this helpful