dLocal China
Search…
⌃K

欺诈预防

dLocal Defense

dLocal Defense 是我们的欺诈预防解决方案,是我们服务的一个组成部分,为我们的所有客户免费提供。通过dLocal Defense,dLocal处理的所有交易都通过我们的欺诈预防引擎运行,该引擎可识别特定于市场和行业的欺诈模式,并防止潜在的欺诈交易。
为了让 dLocal Defense 发挥最佳效果,我们强烈建议在 Payments API 调用中提供尽可能多的信息(如文档所述)。
用于防止欺诈的基本支付信息包含如下:
  • Payer's name and surname
  • Email address
  • Phone number
  • Document
  • Address
  • IP address
  • Device ID (see below)

预防欺诈的其它信息

为了更深入地分析欺诈模式的交易,我们推荐商户考虑在其支付API调用中使用additional_risk_data对象,此对象包括可更好地识别欺诈交易的可选属性列表。附加风险数据对象及其包含的所有对象和属性都是可选的,因此商户可以提供适用于其特定情况的信息。

The Additional Risk Data object

Additional Risk Data object
Example Payment with Additional Risk Data object
Property
Type
Description
submerchant
Submerchant object
Information on the submerchant account. Optional.
shipping
Shipping object
Information on the shipping / alternative address. Optional.
beneficiary
Beneficiary object
Information on the beneficiary, if different from the payer. Optional.
basket
List of Item objects
Information on the items purchased. Optional.
payer
Payer object
Additional information on the payer's user account. Optional.
device
Device object
Additional information on the device used for purchase. Optional.
{
"amount": 399.80,
"currency" : "USD",
"country": "BR",
"payment_method_id" : "CARD",
"payment_method_flow" : "DIRECT",
"payer":{
"name" : "Thiago Gabriel",
"email" : "[email protected]",
"document" : "53033315550",
"user_reference": "12345",
"address": {
"state" : "Rio de Janeiro",
"city" : "Volta Redonda",
"zip_code" : "27275-595",
"street" : "Servidao B-1",
"number" : "1106"
}
},
"card":{
"holder_name" : "Thiago Gabriel",
"number" : "4111111111111111",
"cvv" : "123",
"expiration_month" : 10,
"expiration_year" : 2040
},
"order_id": "657434343",
"notification_url": "http://merchant.com/notifications",
"additional_risk_data": {
"submerchant": {
"merchant_reference" : "12534",
"name" : "Submerchant name",
"website" : "https://www.submerchant.com",
"industry" : 17
},
"shipping" : {
"address" : {
"state" : "Montevideo",
"city" : "Montevideo",
"zip_code": "11300",
"street" : "Avda. Brasil",
"number": "1234 Ap. 501"
},
"is_physical" : true
},
"beneficiary" : {
"email" : "[email protected]",
"name" : "John Doe",
"phone" : "09671268364",
"document" : "513672561"
},
"basket" : [
{
"unit_price" : 199.90,
"brand" : "Smoogle",
"category" : "Smartphone",
"item_reference" : "SP-562138",
"upc": "1758929364928",
"manufacturer" : "Smoogle",
"product_name" : "Pexel 25",
"quantity" : 2,
"size" : "regular"
}
],
"payer" : {
"email_is_valid" : true,
"phone_is_valid" : false,
"account_creation_date" : "20201110",
"first_purchase_date" : "20201110",
"is_positive" : false
},
"device" : {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
"geolocation" : "-34.8798853,-56.1867859",
"locale": "en-US"
}
}
}

Submerchant 对象

对于拥有子商户的PSP商户,子商户对象可用于提供发起支付的特定子商户的更多信息。
Submerchant object
Example Submerchant object
Property
Type
Description
merchant_reference
String
The ID / reference of the sub-merchant account. Optional.
name
String
Sub-merchant name. Optional.
website
String
Sub-merchant website. Optional.
industry
Number
Sub-merchant industry, see industry codes list. Optional.
"submerchant": {
"merchant_reference" : "12534",
"name" : "Submerchant name",
"website" : "https://www.submerchant.com",
"industry" : 17
}

Shipping 对象

对于分开处理付款/发货地址的商家,发货对象可用于指定发货地址,还可用于指示采购是否有实际交货(即零售与数字商品)。
Shipping object
Example Shipping object
Property
Type
Description
address
Address object
Represents the address, documented in this table. Optional.
address.state
String
State. Optional.
address.city
String
City. Optional.
address.zip_code
String
Zip code. Optional.
address.street
String
Street. Optional.
address.number
String
Street number. Optional.
is_physical
Boolean
True if a physical delivery to this address is involved (i.e. for retail goods). Optional.
"shipping" : {
"address" : {
"state" : "Montevideo",
"city" : "Montevideo",
"zip_code": "11300",
"street" : "Avda. Brasil",
"number": "1234 Ap. 501"
},
"is_physical" : true
}

Beneficiary 对象

对于受益人/收货人不是付款人的订单(例如:包含实物/虚拟商品的礼品),受益人对象可用于产品或服务接收人的信息。
Beneficiary object
Example Beneficiary object
Property
Type
Description
email
String
Email address. Optional.
name
String
Name & surname. Optional.
phone
String
Phone number. Optional.
document
String
Document. Optional.
"beneficiary" : {
"email" : "[email protected]",
"name" : "John Doe",
"phone" : "09671268364",
"document" : "513672561"
}

Item 对象

basket 属性包含一个Item对象的列表,用于提供所购买项目的信息。
Item object
Example Basket & Item object
Property
Type
Description
unit_price
Number
Unit price. Optional.
brand
String
Product brand. Optional.
category
String
Product category. Optional.
item_reference
String
Item ID / Reference. Optional.
upc
String
Universal Product Code. Optional.
manufacturer
String
Product manufacturer. Optional.
product_name
String
Product or service name. Optional.
quantity
Number
Quantity of items purchased. Optional.
size
String
Product size (e.g. S, M, L, XL). Optional.
"basket" : [
{
"unit_price" : 499.90,
"brand" : "Google",
"category" : "Smartphones",
"item_reference" : "SP-562138",
"upc": "1758929364928",
"manufacturer" : "Google",
"product_name" : "Pixel 3",
"quantity" : 2,
"size" : "XL"
}
],

Payer 对象

附加在风险数据对象中的付款人对象允许提供关于付款人用户帐户的附加信息。
Payer object
Example Payer object
Property
Type
Description
email_is_valid
Boolean
Set to True if the payer's email has been validated. Optional.
phone_is_valid
Boolean
Set to True if the payer's phone number has been validated. Optional.
account_creation_date
String
Date of account creation in YYYYMMDD format. Optional.
first_purchase_date
String
Date of first successful purchase in YYYYMMDD format. Optional.
is_positive
Boolean
Set to True if this payer is considered as a positive user by the merchant, e.g. for regular customers with a good purchase history. Optional.
"payer" : {
"email_is_valid" : true,
"phone_is_valid" : false,
"account_creation_date" : "20201110",
"first_purchase_date" : "20201110",
"is_positive" : false
}
Device 对象
设备对象用于存储用于发起订单的设备(如笔记本电脑、智能手机)信息。
Device object
Example Device object
Property
Type
Description
user_agent
String
Browser's User Agent property. Optional.
geolocation
String
User's geolocation. Optional.
locale
String
Browser's locale. Optional.
"device" : {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
"geolocation" : "-34.8798853,-56.1867859",
"locale": "en-US"
}

Device ID

为了从用户的设备中获取设备ID,我们建议商户在其网站中使用以下Javascript代码。将调用generateDeviceId()函数返回的结果通过付款请求中的device_id参数发送给我们。
export function generateDeviceId() {
var nav = window.navigator;
var screen = window.screen;
var deviceId = nav.mimeTypes.length;
Object.values(navigator.mimeTypes).forEach(p => deviceId += p.type);
deviceId += nav.userAgent.replace(/\D+/g, '');//Only use digits
deviceId += nav.plugins.length;
Object.values(navigator.plugins).forEach(p => deviceId += p.filename);
deviceId += screen.height || '';
deviceId += screen.width || '';
deviceId += screen.pixelDepth || '';
return checksum(deviceId);
};
export function checksum(s) {
var hash = 0, strlen = s.length, i, c;
if ( strlen === 0 ) {
return hash;
}
for ( i = 0; i < strlen; i++ ) {
c = s.charCodeAt( i );
hash = ((hash << 5) - hash) + c;
hash = hash & hash; // Convert to 32bit integer
}
return Math.abs(hash);
};

附录 - 代码

行业代码列表

Code
Industry
1
Advertising
2
Antivirus
3
Delivery
4
Donations
5
Education
6
Gaming
7
Healthcare
8
Hosting
9
Investing / Financial services
10
IT Services
11
Marketplace
12
Money remittance
13
Payroll
14
Prepaid cards
15
PSP
16
Retail - Offline
17
Retail - Online
18
Ridesharing
19
SaaS
20
Social
21
Software / Apps
22
Streaming
23
Transport
24
Travel
25
Wallet
26
Dating
999
Others