Profiler - Web
How to integrate the fraud prevention profiler on web.
Note – Not necessary if using Checkout SDK
Mangopay’s Checkout SDK has the profiler built in, generating and returning the ProfilingAttemptReference for a transaction.
Prerequisites
Fraud prevention activated for your environment (Sandbox or Production) – contact Support via the Dashboard to get started
1. Get your platform’s profiler URL
Once fraud prevention is activated by Mangopay (in Production or Sandbox):
- In the Dashboard, navigate to Fraud prevention.
- Select the Integration status tab on the left.
- Note the URL provided in API CREDENTIALS > WEB PROFILER URL.
2. Integrate the profiler to your platform’s website
Insert the following initialization sample in the code of your website checkout page, after any other scripts and just before the closing </body>
tag.
Add the following information:
src
– The URL retrieved in Step 1.attemptReference
– Identifier used to match the user’s profiling session to the pay-in call made by your platform’s backend to the Mangopay API. You must generate a unique value upon every form view. You must not use the prefixmznx-
for web attempt references, because this prefix is added by the mobile SDKs to identify mobile attempt references. Max. length: 128 characters.
Best practice – Avoid customization
Keep as close as possible to the initialization sample given above to avoid integration errors.
3. Define sensitive and secret fields (recommended)
Still in the initialization code, indicate sensitive fields by their ID property for which data shouldn’t be collected:
sensitiveFields
– Not sent to the fraud prevention solution but the other behavioral data linked to these fields is still gathered.secretFields
– Not sent to the fraud prevention solution and no behavioral data linked to the fields is gathered.
Best practice – Indicate the card number and CVC as sensitive fields
Always indicate the card verification code (cvv
) and card number (cnn
) as sensitive fields.
4. Make sure all the profiling data is collected (optional)
Use the dftp.profileCompleted
function to ensure that all the profiling data is collected prior to the pay-in call.
This function returns a Promise
object that is resolved when processing is complete, thereby indicating that it’s safe to do the pay-in.
The doWorkAfterProfiling
can be used to submit form data and trigger the pay-in call to the Mangopay API, including the ProfilingAttemptReference
.
Note on browser support
The web profiler aims to provide the highest level browser compatibility and data interpretation performance. This is divided into 3 levels:
- Full support for modern versions of Firefox, Safari, and Chromium-based browsers (Chrome, Edge, Opera, etc). These comprise 95% of web browser internet traffic.
- Best-effort support for other browsers.
- Explicit lack of support for retired browsers: Internet Explorer (0.6% of traffic).