Request 3D Secure
Choose when 3D Secure runs with request_threed_secure, set the flow and accepted ECI values, and read the authentication result.
Pay.com decides for each card payment whether to run 3D Secure (3DS). Set
payment_method_options.card.request_threed_secure to override that decision,
authentication_options.three_ds to choose the preferred flow, and
accepted_eci_values to accept only specific authentication results.
request_threed_secure and card.accepted_eci_values also work as
account defaults.
When Pay.com runs 3D Secure
Without these options, Pay.com runs 3D Secure when the payment requires it:
- The card's issuer and your account are both in the European Economic Area, the United Kingdom, Gibraltar, or Guernsey, where strong customer authentication (SCA) applies.
- One of your rules returns an outcome that requires 3D Secure.
3D Secure doesn't run on mail order and telephone order (moto) payments, on
merchant-initiated payments after the first one (unless you use
3RI), or when you send your own
result in three_ds (see External MPI).
3D Secure requires the customer's browser details in authentication_context.
If they're missing and a rule requires 3D Secure, Pay.com blocks the payment.
If they're missing and nothing requires 3D Secure, the payment proceeds without
it.
Choose a mode
request_threed_secure accepts one of four values.
| Value | Description |
|---|---|
automatic | Runs 3D Secure, unless one of your rules specifies that 3D Secure isn't required. |
challenge | Runs 3D Secure and asks the issuer to challenge the customer. |
none | Skips 3D Secure, unless a rule requires it. |
exemption | Legacy value. To ask for an exemption, use request_sca_exemption. |
Omit request_threed_secure to let Pay.com decide based on SCA scope and your
rules. This charge requests 3D Secure on a saved card and passes the customer's
browser details inside source_data.source.authentication_context. Amounts are
in minor units, so 2000 is €20.00 EUR.
{
"amount": 2000,
"currency": "eur",
"source_data": {
"type": "source",
"source": {
"id": "pm_card_296645958265997316",
"authentication_context": {
"customer_ip_address": "203.0.113.45",
"browser_details": {
"accept_header": "*/*",
"javascript_enabled": true,
"language": "en-US",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"screen_width": 1920,
"screen_height": 1080,
"timezone_offset": "-300",
"java_enabled": false,
"color_depth": 24
}
}
}
},
"payment_method_options": {
"card": {
"request_threed_secure": "automatic"
}
}
}When 3D Secure requires a challenge, the charge returns
requires_authentication. See
Create a charge with 3DS to display the
challenge and confirm the charge.
Choose the flow
payment_method_options.authentication_options tells the issuer which 3D
Secure outcome you prefer. Set type to three_ds, then set
three_ds.flow_indicator.type to one of these values:
flow_indicator.type | Additional fields | Description |
|---|---|---|
challenge | challenge.type, challenge.allow_frictionless | Requests an interactive challenge. Set challenge.type (for example, mandated) and challenge.allow_frictionless: false to refuse a frictionless result. |
frictionless | frictionless.sca_exemption_type | Requests authentication without a challenge. Add frictionless.sca_exemption_type to request an exemption inside 3D Secure. |
data_share | None | Requests no challenge and shares authentication data with the issuer only. |
This example mandates a challenge and refuses a frictionless fallback:
{
"authentication_options": {
"type": "three_ds",
"three_ds": {
"flow_indicator": {
"type": "challenge",
"challenge": {
"type": "mandated",
"allow_frictionless": false
}
}
}
}
}A challenge or frictionless flow indicator also requests 3D Secure, like
request_threed_secure: "automatic". When both are set, the flow indicator
controls whether Pay.com requests a challenge. The issuer makes the final
decision and can still challenge a payment sent as frictionless.
Accept only some ECI values
The Electronic Commerce Indicator (ECI) shows how the issuer authenticated the
customer. To accept only specific results, list the allowed ECI values in
card.accepted_eci_values or in
authentication_options.three_ds.accepted_eci_values. If both are set, the
list in authentication_options takes precedence. Each value is one of 00,
01, 02, 05, 06, or 07.
When authentication returns an ECI outside your list, Pay.com treats
authentication as failed. Without a list, every ECI is accepted. This example
accepts only results that shift fraud liability to the issuer (05 and 06
for Visa, and 01 and 02 for Mastercard):
{
"card": {
"accepted_eci_values": ["05", "06", "01", "02"]
}
}3D Secure versions
Pay.com runs 3D Secure 2. When you send a result from your own provider in
three_ds, set version to the protocol version it used, such as 2.1.0,
2.2.0, or 2.3.1. Any 2.x version also requires ds_trans_id. A 1.0.x
result requires xid instead. See External MPI.
Authentication session duration
A linked authentication session
stays open for 60 minutes by default. To change the session lifetime, set
duration to the number of minutes when you create it.
{
"resource": "chrg_686511724072799232",
"return_url": "https://example.com/payment/complete",
"duration": 15
}Authentication session events
Pay.com sends these webhook events for authentication sessions. Configure your endpoint in Webhooks.
| Event | Description |
|---|---|
authentication_session.open | Sent when you create a linked authentication session. |
authentication_session.authenticated | Sent when the customer passes authentication. |
authentication_session.failed | Sent when authentication fails. |
Read the result
The charge or hold returns the 3D Secure result in
payment_method_details.card.three_d_secure. The authentication_flow field
shows how the customer was authenticated.
authentication_flow | Description |
|---|---|
frictionless | The issuer authenticated the customer without a challenge. |
challenge | The customer completed a challenge. |
external | The customer was authenticated outside Pay.com's 3D Secure. |
exemption | The payment proceeded under an SCA exemption. |
eci, result, version, and liability_shift appear in the same object.
See GET /v1/charges/{id} for
the full schema.
Next steps
- SCA exemptions: Request an issuer exemption from authentication.
- Soft decline loop: Retry with 3D Secure when an exempted payment is soft-declined.
- Create a charge with 3DS: Display the challenge and confirm the charge.