Skip to Content
Docs

Standalone 3DS authentication

Authenticate cardholders independently of a payment to reduce fraud and shift liability before you process a charge.

Standalone 3DS authentication lets you verify a cardholder's identity before creating a charge. Unlike charge-linked 3DS, authentication is fully separate from payment. You run the 3DS session first, collect the Electronic Commerce Indicator (ECI) and cryptogram (CAVV), and then pass those values to the charge endpoint.

When to use standalone 3DS

Use standalone authentication when you need to separate authentication from authorization:

  • Subscription setup: Authenticate a card once during enrollment, then charge it repeatedly without re-running 3DS for each transaction.
  • Deferred charges: Verify a cardholder now and charge them later, for example for a pre-order or a quote-to-invoice workflow.
  • Liability shift before retry: Authenticate before re-attempting a declined authorization to shift fraud liability to the issuer.
  • Split processing: Authenticate with Pay.com and authorize through a separate processor by passing the ECI and CAVV you receive.

Choose your flow

Standalone 3DS supports two integration patterns:

FlowHow it worksBest for
Two-step (default)The first API call creates the session. A second call sends the session to the issuer to start authentication. Between the two calls, you can optionally run device fingerprinting in the browser.When you need fingerprinting or want full control over timing
One-stepA single API call creates the session and starts issuer authentication immediately. No second call needed.Simpler integrations where you expect a frictionless outcome

The submit parameter in the request controls which flow Pay.com uses:

submit valueBehavior
"never"Two-step (default). Creates the session. You call the Submit endpoint separately.
"always"One-step. Pay.com submits the session immediately, skipping fingerprinting.
"if_fingerprinting_not_supported"One-step when possible. Pay.com submits automatically when the issuer doesn't support fingerprinting, and falls back to two-step when it does.

Requirements

Before you start:

  • Configure your environment and retrieve your API credentials.
  • Collect the cardholder's browser details in your frontend (user agent, screen dimensions, timezone offset, and color depth).
  • Make sure your return_url is reachable from the cardholder's browser. Pay.com redirects there after a challenge completes.
  • Ask Pay.com to set up a 3DS processor for standalone authentication on your account. Until it's set up, creating a session returns 400 with Standalone 3DS has no processor configured.

Two-step flow

Follow these steps for the two-step flow. For the one-step pattern, see One-step flow.

  1. 1

    Create an authentication session

    Send a POST request to /v1/authentication/session/independent with the card data, browser details, and flow options. The amount value is in the smallest currency unit (for example, 10000 is $100.00 USD).

    {
      "payment": true,
      "amount": 10000,
      "currency": "usd",
      "payment_method_data": {
        "type": "card",
        "card": {
          "number": "4200350000000801",
          "expiry_year": "2027",
          "expiry_month": "11",
          "cvv": "123",
          "name": "Jane Smith"
        }
      },
      "authentication_options": {
        "type": "three_ds",
        "return_url": "https://example.com/3ds-complete",
        "three_ds": {
          "channel": {
            "type": "browser",
            "browser": {
              "customer_ip_address": "203.0.113.45",
              "browser_details": {
                "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
                "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
              }
            }
          },
          "flow_indicator": {
            "type": "frictionless"
          },
          "submit": "never"
        }
      }
    }

    Save the session id (the sca_... value). You need it for the Submit the session and Retrieve the authentication result steps. If the response includes a fingerprint_url, move to the next step. If it is null, skip directly to Submit the session.

    flow_indicator.type tells the issuer your preferred outcome. Set it to "frictionless" to avoid a challenge, or "challenge" to require one. The issuer makes the final decision and may still return a challenge even when "frictionless" is set.

    For card setup flows (for example, subscription enrollment without an initial charge), set payment to false and omit both amount and currency. The API rejects them when payment is false.

  2. 2

    Collect device fingerprint (optional)

    If the session creation response includes a fingerprint_url, the issuer supports device fingerprinting. Load the URL in a hidden iframe on your page before calling Submit the session. The iframe collects browser and device signals that the issuer uses to assess risk and improve frictionless rates.

    <iframe
      src="FINGERPRINT_URL"
      width="0"
      height="0"
      style="display:none"
    ></iframe>

    Listen for the completion signal before calling Submit the session:

    window.addEventListener('message', (event) => {
      if (event.data?.type === 'three_ds_method_complete') {
        submitSession();
      }
    });

    Fingerprinting is optional. You can send the Submit request without waiting for the iframe to complete. The issuer still processes the session with less device data.

  3. 3

    Submit the session

    Send a POST request to /v1/authentication/{id}/submit. No request body is needed.

    POST /v1/authentication/sca_702198783584240640/submit

    Route based on the status field in the response:

    StatusMeaningNext action
    succeededFrictionless authentication passedRetrieve the result to confirm and collect ECI and CAVV
    failedFrictionless authentication deniedDon't proceed with the charge. Check authentication_details.three_ds.status_reason
    requires_authenticationIssuer needs a challengeMove to the next step
    errorProcessing errorCheck authentication_details for the reason
  4. 4

    Handle a challenge

    If Submit returns status: "requires_authentication", render the challenge url in an iframe on your page. The iframe displays the issuer's verification UI, for example an OTP screen or a biometric prompt. Size the iframe to at least 600 × 400 pixels.

    <iframe
      src="CHALLENGE_URL"
      width="600"
      height="400"
    ></iframe>

    When the cardholder completes the challenge, the issuer redirects the iframe to your return_url. Detect that redirect, then call Retrieve.

  5. 5

    Retrieve the authentication result

    Send a GET request to /v1/authentication/{id} to read the final outcome. Call this endpoint after Submit returns succeeded or failed (to confirm), or after the cardholder completes the challenge and is redirected to your return_url.

    GET /v1/authentication/sca_702198783584240640

    Use result to decide what to do next:

    • authenticated (or attempt_acknowledged): Pass the values from authentication_details.three_ds to your charge as source_data.card.three_ds (or source_data.source.three_ds or source_data.token.three_ds) to get liability shift:

      Charge three_ds fieldFrom the session
      eciauthentication_details.three_ds.eci
      cavvauthentication_details.three_ds.cavv
      versionauthentication_details.three_ds.protocol_version
      ds_trans_id (required for 3DS 2.x)authentication_details.three_ds.ds_transaction_id

      See External MPI for a full charge example.

    • attempt_acknowledged: The issuer acknowledged the attempt (ECI 06 for Visa, 01 for Mastercard). You can usually proceed with liability shift.

    • denied: The cardholder failed authentication. Don't proceed with the charge.

    • rejected: The issuer rejected authentication. Don't proceed with the charge.

    • not_supported: The card or issuer doesn't support 3DS. Proceed according to your risk policy.

    • abandoned: The cardholder closed the challenge without completing it.

    • processing_error: A system error occurred. Retry or contact support.

    To receive status updates asynchronously instead of polling, subscribe to authentication session webhook events. See the webhook events reference for the full list of events.

One-step flow

Set submit to "always" in the POST /v1/authentication/session/independent request. Pay.com creates and immediately submits the session in a single call, skipping device fingerprinting. The issuer still decides the outcome. It may return a frictionless result or require a challenge, as in the two-step flow.

{
  "payment": true,
  "amount": 10000,
  "currency": "usd",
  "payment_method_data": {
    "type": "card",
    "card": {
      "number": "4200350000000801",
      "expiry_year": "2027",
      "expiry_month": "11",
      "cvv": "123",
      "name": "Jane Smith"
    }
  },
  "authentication_options": {
    "type": "three_ds",
    "return_url": "https://example.com/3ds-complete",
    "three_ds": {
      "channel": {
        "type": "browser",
        "browser": {
          "customer_ip_address": "203.0.113.45",
          "browser_details": {
            "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
            "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
          }
        }
      },
      "flow_indicator": {
        "type": "frictionless"
      },
      "submit": "always"
    }
  }
}

Route based on the status field in the response:

StatusMeaningNext action
succeededFrictionless authentication passedRetrieve the result to confirm and collect ECI and CAVV
failedFrictionless authentication deniedDon't proceed with the charge
requires_authenticationIssuer requires a challengeFollow the steps in Handle a challenge. Call Retrieve the authentication result after the cardholder is redirected to your return_url
errorProcessing errorCheck authentication_details for the reason

You can also use submit: "if_fingerprinting_not_supported" to auto-submit only when the issuer doesn't offer device fingerprinting (that is, when fingerprint_url is null in the response). When fingerprinting is available, the session falls back to the two-step flow. The response returns status: "requires_submission", and you must call POST /v1/authentication/{id}/submit to continue.

Test your integration

Use these values in the sandbox to test each outcome.

Test card:

FieldValue
Card number4200350000000801
Expiration date11/2027
CVV123

Challenge OTP codes (entered by the cardholder in the challenge iframe, not sent through the API):

CodeOutcome
1234Success (result: "authenticated")
3333Failure (result: "denied")

To trigger a frictionless failure without a challenge, add "name": "fake" to payment_method_data.card in the session creation request.

Next steps

Related 3D Secure guides:

Was this page helpful?