Developer/Payment service | Options/AI Fraud Detection/Interface Specifications
Interface Specifications
Content of this page
Sequence
AI fraud detection precedes the Payment Request API, and the flow of the Payment Request API is as follows: For details on the flow of Payment after fraud detection judgment, please refer to API type Basic Specifications.
When implementing AI fraud detection when issuing One-time tokens
Fraud detection is possible by introducing AI fraud detection JavaScript to the screen where credit Credit card information is entered.
When implementing AI fraud detection when determining the amount
If a One-time token has not been issued or if the amount has been changed after the token was issued, fraud can be detected by implementing AI fraud detection JavaScript on the purchase confirmation screen.
Interface
The interface of the AI fraud detection system is as follows: Note that the format uses the same XML format as the API type. For more information, please refer to the API type Basic Specifications.
When implementing AI fraud detection when issuing One-time tokens
<<About types>> 9: Numeric type (1 byte 0-9), X: Half-width Character string, M: Multi-byte Character string
No
Tag element name
Field name
Chars
Format
Req'd
Type
Description
Remarks
1
fraudData
–
–
–
–
–
Objects related to fraud detection and One-time token issuance
2
merchantId
Merchant ID
5
X
○
Fixed
ID for identifying the merchant
Specified by SBPS
3
serviceId
Service ID
3
X
○
Fixed
ID for identifying the merchant's service
Specified by SBPS
4
ccNumber
Credit card number
16
X
○
Var.
0 to 99999999999999999 (no hyphens)
5
ccExpiration
Expiration date
6
X
○
Fixed
YYYYMM
6
securityCode
Security code
4
X
Var.
Credit card Security code
Set with 3 or 4 digits
7
custCode
Customer ID
64
X
○
Var.
A customer ID managed by the merchant
Unique per Merchant or service
8
orderId
Purchase ID
38
X
Var.
A purchase ID managed by the merchant
Unique per Merchant or service
9
amount
Amount (incl. tax)
8
9
○
Var.
Amount of charge with tax included
10
itemId
Product ID
32
X
○
Var.
A product ID managed by the merchant
If you do not use it in a rule, set it to an arbitrary fixed value.
11
itemName
Product name
40
M
Var.
A product name of your choice
If you do not use it in a rule, set it to an arbitrary fixed value.
12
itemCount
Number of Item
4
9
Var.
13
itemCategory
Item Category
40
M
Var.
14
campaign
Campaign Code
40
M
Var.
If you use it in a rule, set the value for all requests.
15
memo
Merchant Use Field
255
M
Var.
Free column
If you use it in a rule, set the value for all requests.
16
resultCallback
Specifies the function object to be executed after fraud detection and One-time token issuance
Response result
<<About types>> 9: Numeric type (1 byte 0-9), X: Half-width Character string, M: Multi-byte Character string
No
Tag element name
Field name
Chars
Format
Req'd
Type
Description
Remarks
1
response
result
–
–
○
–
2
fraudRes
Fraud detection results
–
–
○
–
3
result
Result status
2
X
○
Fixed
OK: Request processing OK NG: Request processing NG
4
fraudResponse
Response
–
–
–
Obtained fraud detection information object
Set object only if result status is OK
5
Id
Fraud Scoring ID
36
X
Fixed
6
score
Score
9
Var.
0~99
7
code
Judgment result code
9
Var.
Fraud detection results 1: No judgement 2: Permission 10: Alert 30: Block 50: Allowed (forced) 70: 3D Secure
The AI fraud detection management tool returns the set judgment result
8
rules
Rule application results
255
X
Var.
JSON formatted Character string
Example: {“rule_a”: true, “rule_b”: false}
9
errorCode
Error code
5
X
Fixed
See list of error codes
Set an error code only if the result status (fraud detection) is NG
10
tokenRes
Token Results
–
–
○
–
11
result
Result status
2
X
○
Fixed
OK: Request processing OK NG: Request processing NG
12
tokenResponse
Response
–
–
–
Obtained token information object
Set object only if result status is OK
13
token
Token
X
Var.
14
tokenKey
Token key
X
Var.
15
maskedCcNumber
Credit card number
16
X
Var.
16
ccExpiration
Expiration date of the credit card
6
9
Fixed
Credit card expiration date sent
YYYYMM format
17
cardBrandCode
Card company brand code
1
X
Fixed
Credit card company brand code J: JCB brand V: Visa brand M: Master Brand A: AMEX brand D: Diners brand X: Other
18
errorCode
Error code
5
X
Fixed
See list of error codes
Set an error code only if the result status (token result) is NG.
When implementing AI fraud detection when determining the amount
File
com_sbps_system_fraudv2.js
Function name
com_sbps_system_fraud.fraudDetection
Destination
To be informed when the service starts
request
<<About types>> 9: Numeric type (1 byte 0-9), X: Half-width Character string, M: Multi-byte Character string
No
Tag element name
Field name
Chars
Format
Req'd
Type
Description
Remarks
1
fraudData
–
–
–
–
–
Objects related to fraud detection and One-time token issuance
2
merchantId
Merchant ID
5
X
○
Fixed
ID for identifying the merchant
Specified by SBPS
3
serviceId
Service ID
3
X
○
Fixed
ID for identifying the merchant's service
Specified by SBPS
4
ccNumber
Credit card number
16
X
△※1
Var.
0 to 99999999999999999 (no hyphens)
5
ccExpiration
Expiration date
6
X
△※1
Fixed
YYYYMM
6
custCode
Customer ID
64
X
〇
Var.
A customer ID managed by the merchant
Unique per Merchant or service
7
token
Token
512
X
△※1
Var.
The One-time token obtained
8
tokenKey
Token key
512
X
△※1
Var.
Obtained One-time token key
9
orderId
Purchase ID
38
X
※2
Var.
A purchase ID managed by the merchant
Unique per Merchant or service
10
amount
Amount (incl. tax)
8
9
○
Var.
Amount of charge with tax included
11
itemId
Product ID
32
X
○
Var.
A product ID managed by the merchant
If you do not use it in a rule, set it to an arbitrary fixed value.
12
itemName
Product name
40
M
Var.
A product name of your choice
If you do not use it in a rule, set it to an arbitrary fixed value.
13
itemCount
Number of Item
4
9
Var.
14
itemCategory
Item Category
40
M
Var.
15
campaign
Campaign Code
40
X
Var.
If you use it in a rule, set the value for all requests.
16
memo
Merchant Use Field
255
M
Var.
Free column
If you use it in a rule, set the value for all requests.
17
resultCallback
Specifies the function object to be executed after fraud detection and One-time token issuance
*1 If the customer ID cannot be set correctly, you will need to set the relevant items (credit card number and expiration date, or token and token key).
*2 If you do not set this item or set it incorrectly, you will not be able to view Authorization result information in the AI fraud detection management tool.
Response result
<<About types>> 9: Numeric type (1 byte 0-9), X: Half-width Character string, M: Multi-byte Character string
No
Tag element name
Field name
Chars
Format
Req'd
Type
Description
Remarks
1
response
result
–
–
○
–
2
fraudRes
Fraud detection results
–
–
○
–
3
result
Result status
2
X
○
Fixed
OK: Request processing OK NG: Request processing NG
4
fraudResponse
Response
–
–
–
Obtained fraud detection information object
Set object only if result status is OK
5
Id
Fraud Scoring ID
36
X
Fixed
The UUID specified when calling the fraud detection engine API
6
score
Score
9
Var.
7
code
Judgment result code
9
Var.
Fraud detection results 1: No judgement 2: Permission 10: Alert 30: Block 50: Allowed (forced) 70: 3D Secure
The AI fraud detection management tool returns the set judgment result
8
rules
Rule application results
255
X
Var.
JSON formatted Character string
Example: {“rule_a”: true, “rule_b”: false}
9
errorCode
Error code
5
X
Fixed
See list of error codes
Set an error code only if the result status (fraud detection) is NG
List of Error Codes
The error code system to be returned is shown below.
Digits 1-2: Represent a type. (2-digit fixed length alphanumeric characters) Digits 3-5: Represent a field. (3-digit fixed length alphanumeric characters)
Type of Codes
Code
Type
Description
Errors related to request information
03
Required field error
No value is specified in a required field.
04
Attribute error
Allowed character attribute error
05
Number of digits error
Outside of the allowable number of digits (bytes)
06
Format error
Invalid format
Error which occurs on the server
90
System error
An unexpected error occurred
92
Connection Errors
Connection failure
Field Codes
Code
Type
Description
Token Generation
001
Merchant ID
002
Service ID
003
Token key
004
Customer ID
005
Purchase ID
006
Credit card number
007
BIN
008
BIN8
009
Last 4 digits of credit card number
010
Expiration date of the credit card
011
Amount (incl. tax)
012
Payment method
013
Date and time of request
014
UserAgent
015
Browser language
016
Time on page
017
Transition page
018
Product ID
019
Product name
020
Number of Item
021
Item Category
022
Campaign Code
023
Merchant Use Field
024
Token
025
IP address
999
(N/A)
JavaScript implementation sample
When implementing AI fraud detection when issuing One-time tokens
*The JS file URL to be included is a sample. The URL will be provided to you when you use it.
About Browser Settings This document assumes that you are using a JavaScript-enabled browser. Operation is not guaranteed for environments in which JavaScript does not function.
Available Encryption Protocols Due to the regulations of PCI DSS (which SBPS complies with), SSL 3.0 and TLS 1.0 cannot be used. In addition, there is a high possibility that the use of TLS 1.1 will be prohibited in the future because its vulnerabilities as an encryption method have been disclosed. Therefore, Merchants shall use TLS 1.2.
About AI Fraud Detection JavaScript Error AI fraud detection may return an error due to reasons such as the upper limit of the response time. Even if an error occurs after the AI fraud detection JavaScript is implemented, we recommend that you perform subsequent Payment requests.
Was this page helpful?
Thank you for your response. This feedback will help us improve our content.
What kind of problem did you encounter?
Thank you for your response. This feedback will help us improve our content.