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

# 3-D Secure in Embed

Any merchant using Embed will automatically benefit from **Universal 3-D
Secure** once it has been [set up](/guides/features/3ds/setup) for a payment service.

<Frame caption="Example of a sandbox 3DS prompt">
  <img src="https://mintcdn.com/mattilda/NYRslQ0epuL-JaEH/assets/images/3ds/3dsecure-prompt.png?fit=max&auto=format&n=NYRslQ0epuL-JaEH&q=85&s=73ef78d84e7c8667ffaf5365f0daccb8" alt="3-D Secure prompt" width="2894" height="1988" data-path="assets/images/3ds/3dsecure-prompt.png" />
</Frame>

Additionally, **Dynamic 3-D Secure** can be set up using Flow rules, allowing you to dynamically
skip or force 3-D Secure based on anti-fraud decisions, cart items, or any other transaction data.

## Buyers & Billing Details

To optimize 3-D Secure it is highly recommended to provide a buyer with billing details attached to Embed.

A buyer can be set up via our [`POST /buyers`](/reference/buyers/new-buyer)
API. The buyer can then be attached to Embed by using the `buyerId` or
`buyerExternalIdentifier` property. The buyer's name, email address, and billing
address will be used to help reduce buyers being asked to complete a 3-D Secure
challenge.

<CodeGroup>
  ```js React theme={"dark"}
  <Embed
    gr4vyId="mattilda"
    amount={1299}
    curency="MXN"
    country="MX"
    buyerExternalIdentifier="user-1234"
    ...
  />
  ```

  ```js Node theme={"dark"}
  gr4vy.setup({
     gr4vyId: "mattilda",
     amount: 1299,
     currency: "MXN",
     country: "MX",
     buyerExternalIdentifier: "user-1234",
     ...
  });
  ```
</CodeGroup>

We will use these billing details when contacting payment services, 3-D Secure Server, anti-fraud services, and more.

## Features

For every transaction, we will handle the following steps.

1. Detect if any Flow rule explicitly requires or skips 3-D Secure
2. Detect if the selected payment service for this transaction has 3-D Secure
   enabled
3. Detect if the card used in the transaction is enrolled for 3-D Secure
4. Handle the seamless frictionless 3-D Secure flow including the device finger
   printing
5. Handle the 3-D Secure challenge flow, where a buyer is directed in-page to
   their bank to approve the transaction

## Usage

All you need to do to use 3-D Secure in Embed is to [set up](/guides/features/3ds/setup)
3-D Secure on any of your enabled payment services. Once configured, Embed will
handle all the user interactions.
