> ## Documentation Index
> Fetch the complete documentation index at: https://developers.orchestrasolutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 3D Secure Authentication

> Implement 3D Secure authentication for enhanced payment security.

<Info>
  This page is part of the **REST API Guides**. Using the JavaScript library instead? See [Payments Library 3D Secure](/guides/library/3d-secure).
</Info>

**Prerequisites:** [API key](/getting-started/generate-api-key), [Payment Gateway Account](/getting-started/add-payment-provider) with a [3DS-capable gateway](https://orchestrasolutions.com/integ-type/3d-secure/), and a 3DS authentication provider.

3D Secure (3DS) is an authentication protocol that adds an extra layer of security for online card transactions. It helps reduce fraud and liability by verifying the cardholder's identity before completing the payment.

## Passing 3DS Authentication Data to PSPs

Many of Orchestra's PSP integrations support receiving 3DS authentication data. If you have already performed 3DS authentication for a card (using your own 3DS provider or a third-party service), you can pass those authentication results to Orchestra when making a charge request.

<Info>
  For a complete list of PSP integrations that support 3DS data, see [3D Secure Integrations](https://orchestrasolutions.com/integ-type/3d-secure/).
</Info>

### 3DS Authentication Fields

When you have 3DS authentication results, include them in the `threeDSAuthentication` object within the card details:

| Field                 | Description                                                                     |
| --------------------- | ------------------------------------------------------------------------------- |
| `authenticationValue` | The cryptographic authentication value (CAVV for Visa, AAV for Mastercard)      |
| `eci`                 | Electronic Commerce Indicator - indicates the outcome of the 3DS authentication |
| `xid`                 | Transaction identifier from the 3DS authentication                              |
| `version`             | The 3DS protocol version used (e.g., "2.1.0", "2.2.0")                          |
| `merchantName`        | The merchant name used during 3DS authentication                                |
| `sli`                 | Security Level Indicator                                                        |

### Example: Charge with 3DS Data

Here's an example of a charge request that includes 3DS authentication results:

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.orchestrasolutions.com/PaymentGateway/charge', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-Api-Key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
      paymentGatewayAccountName: 'your-gateway-account',
      amount: 25.00,
      currency: 'USD',
      myRef: 'PaymentX112358',
      card: {
        cardType: 'Visa',
        cardHolderName: 'Jane Smith',
        cardNumber: '4111111111111111',
        expirationMonth: 12,
        expirationYear: 2027,
        cvv: '123',
        threeDSAuthentication: {
          authenticationValue: 'AJkBABkhYQAAAABVYCFhAAAAAAA=',
          eci: '05',
          xid: 'MDAwMDAwMDAwMDAwMDAwMDAwMDE=',
          version: '2.2.0',
          merchantName: 'Your Merchant Name',
          sli: '02'
        }
      }
    })
  });

  const result = await response.json();
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.orchestrasolutions.com/PaymentGateway/charge \
    -H "Content-Type: application/json" \
    -H "X-Api-Key: YOUR_API_KEY" \
    -d '{
      "paymentGatewayAccountName": "your-gateway-account",
      "amount": 25.00,
      "currency": "USD",
      "myRef": "PaymentX112358",
      "card": {
        "cardType": "Visa",
        "cardHolderName": "Jane Smith",
        "cardNumber": "4111111111111111",
        "expirationMonth": 12,
        "expirationYear": 2027,
        "cvv": "123",
        "threeDSAuthentication": {
          "authenticationValue": "AJkBABkhYQAAAABVYCFhAAAAAAA=",
          "eci": "05",
          "xid": "MDAwMDAwMDAwMDAwMDAwMDAwMDE=",
          "version": "2.2.0",
          "merchantName": "Your Merchant Name",
          "sli": "02"
        }
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.orchestrasolutions.com/PaymentGateway/charge',
      headers={
          'Content-Type': 'application/json',
          'X-Api-Key': 'YOUR_API_KEY'
      },
      json={
          'paymentGatewayAccountName': 'your-gateway-account',
          'amount': 25.00,
          'currency': 'USD',
          'myRef': 'PaymentX112358',
          'card': {
              'cardType': 'Visa',
              'cardHolderName': 'Jane Smith',
              'cardNumber': '4111111111111111',
              'expirationMonth': 12,
              'expirationYear': 2027,
              'cvv': '123',
              'threeDSAuthentication': {
                  'authenticationValue': 'AJkBABkhYQAAAABVYCFhAAAAAAA=',
                  'eci': '05',
                  'xid': 'MDAwMDAwMDAwMDAwMDAwMDAwMDE=',
                  'version': '2.2.0',
                  'merchantName': 'Your Merchant Name',
                  'sli': '02'
              }
          }
      }
  )
  ```
</CodeGroup>

<Note>
  You can also use a tokenized card number (e.g., `"@xxxxxxxxxxxxxxxx"`) instead of the raw card number when passing 3DS data. See [Tokenization](/guides/rest-api/tokenization).
</Note>

## What's Next

<CardGroup cols={2}>
  <Card title="Charge Payments" icon="credit-card" href="/guides/rest-api/charge">
    Basic charge operations
  </Card>

  <Card title="Authorize & Capture" icon="hand-holding-dollar" href="/guides/rest-api/authorize-capture">
    Hold funds and capture later
  </Card>
</CardGroup>
