Skip to Content
Docs
Risk assessment

Assess a payment

POST/risk/assessments

Assesses the risk of a payment and returns the recommended outcome. Available only to accounts with Standalone Risk enabled; other accounts get 403.

The assessment cannot be retrieved later, so store the response.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST or DELETE request safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace.

  • A retry with the same key, endpoint and body gets the first request's stored status and body, without running the request again.
  • If the first request is still being processed, a retry gets 409 idempotency_error (request_in_progress).
  • The same key on another endpoint, or with another body, gets 400 idempotency_error (invalid_parameters).
  • GET, PUT and PATCH requests ignore the key.

The response repeats the key in its Idempotency-Key header.

Parameters

risk_session_idstringRequired

A unique identifier for the risk session.

amountintegerRequired

Amount to assess, in the smallest currency unit.

currencystringRequired

Three-letter ISO currency code, in lowercase.

shippingobject

Shipping information of the payment.

Show 3 child parametersHide child parameters
addressobject

Address details.

Show 6 child parametersHide child parameters
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

namestring

Full name of the recipient.

phonestring

Phone number of the recipient, preferably in E.164 format. The leading + is optional.

source_dataobject

Object providing the raw details of the payment method. Mutually exclusive with payment_method_data. Exactly one of the two must be provided.

Show 8 child parametersHide child parameters
typestringRequired

The type of the payment method to be used as the source for the payment. Most types need an object with the same name as the type (for example card, token, source, network_token, googlepay, applepay, us_bank_account, ideal, volt, netbanking, blik_one_click or the t365_* types); the other types are redirect-based alternative payment methods that only need billing_details.

applepay is converted to a card payment before it is processed. Raw in_bank_account, au_bank_account, nz_bank_account, eu_bank_account and uk_bank_account details are not supported on charges and holds.

One of card, source, token, network_token, googlepay, applepay, us_bank_account, in_bank_account, au_bank_account, nz_bank_account, eu_bank_account, uk_bank_account, bank_account, upi, pix, netbanking, ecopayz, vyne, ideal, aircash, sofort, giropay, paysafecard, skrill, neteller, jeton, klarna_pay_now, blik, okto, volt, bancontact, blik_one_click, interac, trustly, neosurf, satispay, bancomatpay, mybank, alipay, przelewy_24, wero, kakao_pay, naver_pay, paypay, bizum, crypto, zerohash, revolut, prepaid_card, venmo, paypal, cashapp, paynearme, amazon_pay, afterpay, clearpay, zip, eps, pay_by_bank, t365_p2p, t365_qr, t365_momo, t365_bt or t365_p2c.

billing_detailsobject

Billing information for the payment.

Show 11 child parametersHide child parameters
addressobject

Address details.

Show 6 child parametersHide child parameters
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

namestring

Full name of the billing contact.

emailstring

Email address of the billing contact.

phonestring

Phone number of the billing contact, preferably in E.164 format. The leading + is optional, and an empty string is accepted.

dobstring

Date of birth in YYYY-MM-DD format.

national_identification_numberstring

National identification number of the billing contact.

ip_addressstring

IP address (IPv4 or IPv6) of the customer. Used for tax calculation when no address is available.

tax_idsarray of objects

Tax identifiers of the customer. Used for tax calculation.

Show 2 child parametersHide child parameters
typestringRequired

Type of the tax identifier. One of eu_vat, gb_vat, us_ein, ca_gst_hst, ca_bn, au_abn, in_gst, or pl_nip.

One of eu_vat, gb_vat, us_ein, ca_gst_hst, ca_bn, au_abn, in_gst or pl_nip.

valuestringRequired

Value of the tax identifier.

kyc_datestring

Time at which the customer's KYC check was completed, in ISO 8601 format.

screening_datestring

Time at which the customer was last screened, in ISO 8601 format.

signature_datestring

Time at which the customer signed the agreement, in ISO 8601 format.

cardobject

Raw details of a card. Requires an API key enabled for raw card data (PCI). 3D Secure results (three_ds, three_ri) are not accepted.

Show 7 child parametersHide child parameters
numberstringRequired

The card number, as a string without any separators.

expiry_monthstringRequired

Two-digit number representing the card's expiration month.

expiry_yearstringRequired

Two or four-digit number representing the card's expiration year.

cvvstring

Card security code. cvc is accepted as an alias.

namestring

Cardholder's full name.

billing_addressobject

Billing address of the card.

Show 6 child parametersHide child parameters
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

sourceobject
Show 2 child parametersHide child parameters
idstringRequired

Unique identifier for a stored payment method to assess.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

tokenobject
Show 3 child parametersHide child parameters
idstringRequired

A token that identifies the payment method in Pay.com's Tokenization Vault.

cvvstring

Card security code.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

network_tokenobject

Raw network token details. 3D Secure results (three_ds, three_ri) are not accepted.

Show 7 child parametersHide child parameters
tokenstringRequired

The network token (token PAN).

token_typestringRequired

Origin of the network token. Use applepay or googlepay for a decrypted wallet token.

expiry_monthstringRequired

Expiry month of the token.

expiry_yearstringRequired

Expiry year of the token.

namestring

Cardholder's full name.

cryptogramstring

Cryptogram for the token.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

googlepayobject

Google Pay payment token, sent exactly as Google Pay returns it in paymentMethodData.tokenizationData.token (parsed from its JSON string). Field names keep Google's camelCase.

Show 5 child parametersHide child parameters
signaturestringRequired

Signature that verifies the message came from Google.

protocolVersionstringRequired

Version of the Google Pay encryption protocol used to create the token.

signedMessagestringRequired

The encrypted payment data and its metadata, as a serialized JSON string.

intermediateSigningKeyobjectRequired

Intermediate signing key from Google, used with protocolVersion ECv2.

Show 2 child parametersHide child parameters
signedKeystringRequired

The intermediate signing key, as a serialized JSON string.

signaturesarray of strings

Signatures that verify the intermediate signing key came from Google.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

applepayobject

Apple Pay payment token. Send the paymentData object of the PKPaymentToken exactly as Apple returns it (field names keep Apple's camelCase), and optionally the token's paymentMethod object.

Show 6 child parametersHide child parameters
signaturestringRequired

Signature of the payment and header data, as a Base64-encoded string.

versionstringRequired

Version of the Apple Pay payment token.

datastringRequired

Encrypted payment data, as a Base64-encoded string.

headerobjectRequired

Additional version-dependent information used to decrypt and verify the payment.

Show 3 child parametersHide child parameters
publicKeyHashstringRequired

Hash of the X.509 encoded public key bytes of the merchant's certificate, as a Base64-encoded string.

ephemeralPublicKeystringRequired

Ephemeral public key bytes, as a Base64-encoded string.

transactionIdstringRequired

Transaction identifier generated on the device, as a hexadecimal string.

paymentMethodobject

The paymentMethod object of the Apple Pay token, if available.

Show 3 child parametersHide child parameters
displayNamestring

Description of the card, suitable for display.

networkstring

Payment network of the card.

typestring

Type of the card.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

payment_method_dataobject

Alias for source_data. Mutually exclusive with source_data. Exactly one of the two must be provided.

Show 8 child parametersHide child parameters
typestringRequired

The type of the payment method to be used as the source for the payment. Most types need an object with the same name as the type (for example card, token, source, network_token, googlepay, applepay, us_bank_account, ideal, volt, netbanking, blik_one_click or the t365_* types); the other types are redirect-based alternative payment methods that only need billing_details.

applepay is converted to a card payment before it is processed. Raw in_bank_account, au_bank_account, nz_bank_account, eu_bank_account and uk_bank_account details are not supported on charges and holds.

One of card, source, token, network_token, googlepay, applepay, us_bank_account, in_bank_account, au_bank_account, nz_bank_account, eu_bank_account, uk_bank_account, bank_account, upi, pix, netbanking, ecopayz, vyne, ideal, aircash, sofort, giropay, paysafecard, skrill, neteller, jeton, klarna_pay_now, blik, okto, volt, bancontact, blik_one_click, interac, trustly, neosurf, satispay, bancomatpay, mybank, alipay, przelewy_24, wero, kakao_pay, naver_pay, paypay, bizum, crypto, zerohash, revolut, prepaid_card, venmo, paypal, cashapp, paynearme, amazon_pay, afterpay, clearpay, zip, eps, pay_by_bank, t365_p2p, t365_qr, t365_momo, t365_bt or t365_p2c.

billing_detailsobject

Billing information for the payment.

Show 11 child parametersHide child parameters
addressobject

Address details.

Show 6 child parametersHide child parameters
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

namestring

Full name of the billing contact.

emailstring

Email address of the billing contact.

phonestring

Phone number of the billing contact, preferably in E.164 format. The leading + is optional, and an empty string is accepted.

dobstring

Date of birth in YYYY-MM-DD format.

national_identification_numberstring

National identification number of the billing contact.

ip_addressstring

IP address (IPv4 or IPv6) of the customer. Used for tax calculation when no address is available.

tax_idsarray of objects

Tax identifiers of the customer. Used for tax calculation.

Show 2 child parametersHide child parameters
typestringRequired

Type of the tax identifier. One of eu_vat, gb_vat, us_ein, ca_gst_hst, ca_bn, au_abn, in_gst, or pl_nip.

One of eu_vat, gb_vat, us_ein, ca_gst_hst, ca_bn, au_abn, in_gst or pl_nip.

valuestringRequired

Value of the tax identifier.

kyc_datestring

Time at which the customer's KYC check was completed, in ISO 8601 format.

screening_datestring

Time at which the customer was last screened, in ISO 8601 format.

signature_datestring

Time at which the customer signed the agreement, in ISO 8601 format.

cardobject

Raw details of a card. Requires an API key enabled for raw card data (PCI). 3D Secure results (three_ds, three_ri) are not accepted.

Show 7 child parametersHide child parameters
numberstringRequired

The card number, as a string without any separators.

expiry_monthstringRequired

Two-digit number representing the card's expiration month.

expiry_yearstringRequired

Two or four-digit number representing the card's expiration year.

cvvstring

Card security code. cvc is accepted as an alias.

namestring

Cardholder's full name.

billing_addressobject

Billing address of the card.

Show 6 child parametersHide child parameters
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

sourceobject
Show 2 child parametersHide child parameters
idstringRequired

Unique identifier for a stored payment method to assess.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

tokenobject
Show 3 child parametersHide child parameters
idstringRequired

A token that identifies the payment method in Pay.com's Tokenization Vault.

cvvstring

Card security code.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

network_tokenobject

Raw network token details. 3D Secure results (three_ds, three_ri) are not accepted.

Show 7 child parametersHide child parameters
tokenstringRequired

The network token (token PAN).

token_typestringRequired

Origin of the network token. Use applepay or googlepay for a decrypted wallet token.

expiry_monthstringRequired

Expiry month of the token.

expiry_yearstringRequired

Expiry year of the token.

namestring

Cardholder's full name.

cryptogramstring

Cryptogram for the token.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

googlepayobject

Google Pay payment token, sent exactly as Google Pay returns it in paymentMethodData.tokenizationData.token (parsed from its JSON string). Field names keep Google's camelCase.

Show 5 child parametersHide child parameters
signaturestringRequired

Signature that verifies the message came from Google.

protocolVersionstringRequired

Version of the Google Pay encryption protocol used to create the token.

signedMessagestringRequired

The encrypted payment data and its metadata, as a serialized JSON string.

intermediateSigningKeyobjectRequired

Intermediate signing key from Google, used with protocolVersion ECv2.

Show 2 child parametersHide child parameters
signedKeystringRequired

The intermediate signing key, as a serialized JSON string.

signaturesarray of strings

Signatures that verify the intermediate signing key came from Google.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

applepayobject

Apple Pay payment token. Send the paymentData object of the PKPaymentToken exactly as Apple returns it (field names keep Apple's camelCase), and optionally the token's paymentMethod object.

Show 6 child parametersHide child parameters
signaturestringRequired

Signature of the payment and header data, as a Base64-encoded string.

versionstringRequired

Version of the Apple Pay payment token.

datastringRequired

Encrypted payment data, as a Base64-encoded string.

headerobjectRequired

Additional version-dependent information used to decrypt and verify the payment.

Show 3 child parametersHide child parameters
publicKeyHashstringRequired

Hash of the X.509 encoded public key bytes of the merchant's certificate, as a Base64-encoded string.

ephemeralPublicKeystringRequired

Ephemeral public key bytes, as a Base64-encoded string.

transactionIdstringRequired

Transaction identifier generated on the device, as a hexadecimal string.

paymentMethodobject

The paymentMethod object of the Apple Pay token, if available.

Show 3 child parametersHide child parameters
displayNamestring

Description of the card, suitable for display.

networkstring

Payment network of the card.

typestring

Type of the card.

authentication_contextobjectRequired
Show 2 child parametersHide child parameters
customer_ip_addressstring

Customer IP address.

browser_detailsobject

Customer browser details.

Show 9 child parametersHide child parameters
accept_headerstringRequired

Exact content of the HTTP accept headers.

javascript_enabledbooleanRequired

Whether Javascript is enabled in browser.

languagestringRequired

Browser language. Returned from navigator.language property from the HTML DOM API.

user_agentstringRequired

Exact content of the HTTP user-agent header.

screen_widthintegerRequired

Screen width of a device. Obtained from cardholder browser using the screen.width property.

screen_heightintegerRequired

Screen height of a device. Obtained from cardholder browser using the screen.height property.

timezone_offsetstringRequired

Offset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.

java_enabledbooleanRequired

Whether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.

color_depthintegerRequired

Color depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.

optionsobject

Options for the risk assessment.

Show 1 child parameterHide child parameters
risk_score_thresholdsarray of objects

Risk score ranges and the outcome to apply to each range. The ranges must include an allow range, cover every score from 0 to 100 with no gaps or overlaps (each start is the previous end + 1), and be ordered by severity: a range with a higher score cannot have a less severe outcome than a lower range. Otherwise the request returns 400, for example "Risk range intersection not allowed" or "Outcome was not provided for all possible ranges".

Show 3 child parametersHide child parameters
startintegerRequired

First score of the range, inclusive.

endintegerRequired

Last score of the range, inclusive. The next range must start at end + 1.

outcomestringRequired

Outcome to apply to scores in the range. One of three_ds_exemption, three_ds_not_required, allow, require_three_ds, three_ds_challenge, or block (ordered from least to most severe).

One of three_ds_exemption, three_ds_not_required, allow, require_three_ds, three_ds_challenge or block.

Returns

Returns the created assessment object.

idstring

Unique identifier for the risk assessment.

resourcestring

String representing the object's type.

Default: risk_assessment

amountnumber

Amount assessed, in the smallest currency unit.

amount_human_readablestring

Amount in human-readable format.

currencystring

Three-letter ISO currency code, in lowercase.

billing_detailsobject or null

Billing information associated with the assessment. Null when no billing details were sent.

Show 2 child attributesHide child attributes
Option 1object
Show 1 child attributeHide child attributes
addressobject

Address details.

Show 6 child attributesHide child attributes
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

Option 2null
shippingobject or null

Shipping information associated with the assessment. Null when no shipping details were sent.

Show 2 child attributesHide child attributes
Option 1object

Shipping information for the payment.

Show 3 child attributesHide child attributes
addressobject

Address details.

Show 6 child attributesHide child attributes
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

namestring

Full name of the recipient.

phonestring

Phone number of the recipient, preferably in E.164 format. The leading + is optional.

Option 2null
payment_method_detailsobject

Details about the payment method being assessed. No card details are returned.

Show 3 child attributesHide child attributes
typestring

The type of the payment method. card_token for card, token, network token and wallet payment methods.

setup_future_usagenull

Always null for assessments.

third_party_tokensarray of objects

Always empty for assessments.

Show 8 more attributesShow fewer attributes
createdstring

Time at which the object was created, in ISO 8601 format.

test_modeboolean

Whether the assessment was created in the sandbox.

optionsobject

Options used for this risk assessment.

Show 1 child attributeHide child attributes
risk_score_thresholdsarray of objects

Risk score ranges and the outcome applied to each range.

Show 3 child attributesHide child attributes
startnumber

Lower bound of the risk score range.

endnumber

Upper bound of the risk score range.

outcomestring

Outcome to apply when the risk score falls within the range.

One of three_ds_exemption, three_ds_not_required, allow, require_three_ds, three_ds_challenge or block.

outcome_sourcestring

Source of the risk assessment outcome, if applicable. One of score, rule (one rule matched; see rule_id), or rules (several rules matched). Omitted when outcome is omitted.

One of score, rule or rules.

rule_idstring

Unique identifier for the rule that triggered the outcome, when exactly one rule matched. Omitted otherwise.

scorenumber

Risk score assigned to this assessment, if available. Omitted when no score was computed.

outcomestring

Final outcome of the risk assessment. One of three_ds_exemption, three_ds_not_required, allow, block, require_three_ds, or three_ds_challenge. Omitted when the decision is allow and no rule, score or flag applied: a missing outcome means allow.

One of three_ds_exemption, three_ds_not_required, allow, block, require_three_ds or three_ds_challenge.

flagsarray of strings

List of risk flags identified during assessment.

Errors

400
Invalid request parameters.
401
The API key or access token is missing, unknown or no longer works (invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).
403
Standalone Risk is not enabled for the account. A 403 can also mean the key may not make this request; code says why.
409
Another request with the same idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?