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

# Signifyd

Payment card fraud losses worldwide exceeded \$32 billion in 2021 and will continue to rise.
Protect your bottom line by deploying a fraud service, like Riskified,
to stop bad actors from making it through your checkout

Primer supports Signifyd’s Checkout API.
The Checkout API is to be called both before **(Pre-Authorization)** and after **(Post-Authorization)** a payment.

<Note>
  See our [Fraud Overview](/payment-services/fraud-checks/overview/) for more general information about how we support fraud prevention.
</Note>

## What is supported?

### Actions

* Pre-authorization
* Post-authorization

### Resulting decisions

* `Pass`
* `3DS`
* `Reject`
* `Fail`

### Payment methods

* Card
* Apple Pay
* Google Pay
* PayPal

## Instructions

### Set-up Instructions

* Go to your [Primer Dashboard](https://dashboard.primer.io/).
* Navigate to the "Integrations" section, select "Add Integration" at the top of the page and search for **Signifyd**.
* Find your credentials in the Signifyd Dashboard by following the below steps:
  * Log into the [Signifyd dashboard](https://app.signifyd.com)
  * Go to the [General Settings](https://settings.signifyd.com/general)
  * Copy the API Key
* Follow the rest of the steps to set up [Primer Workflows for fraud checks](/payment-services/fraud-checks/overview).

### Required fields

The following fields are available for passing to Primer, and on to Signifyd.

| Field                                            | Type   | Required |
| ------------------------------------------------ | ------ | -------- |
| `metadata.connections.signifyd.device.sessionId` | string | yes      |

## Testing

When using Signifyd testing environment with [Testing Teams](https://community.signifyd.com/support/s/article/test-team),

* To trigger a `Pass` outcome, set `metadata.connections.signifyd.purchase.userAccount.email` to `testapproves@signifyd.com`
* To trigger a `Reject` outcome, set `metadata.connections.signifyd.purchase.userAccount.email` to `testdeclined@signifyd.com`

## Mapping

### Base mapping

| Signifyd                                                 | Primer                                                                   |
| -------------------------------------------------------- | ------------------------------------------------------------------------ |
| `orderId`                                                | `payment.orderId`                                                        |
| `userAccount.accountNumber`                              | `payment.customerId`                                                     |
| `transactions[].amount`                                  | `payment.amount`                                                         |
| `transactions[].currency`                                | `payment.currencyCode`                                                   |
| `purchase.createdAt`                                     | Payment creation time                                                    |
| `purchase.orderChannel`                                  | `payment.order.orderChannel`                                             |
| `purchase.totalPrice`                                    | `payment.amount`                                                         |
| `purchase.totalShippingCost`                             | `payment.order.shipping.amount`                                          |
| `purchase.currency`                                      | `payment.currencyCode`                                                   |
| `device.clientIpAddress`                                 | `payment.metadata.fraud_context.device_details.browser_ip`               |
| `merchantCategoryCode`                                   | `payment.metadata.fraud_context.merchant_details.merchant_category_code` |
| `userAccount.email`                                      | `payment.customer.emailAddress`                                          |
| `userAccount.username`                                   | `payment.customer.emailAddress`                                          |
| `purchase.confirmationEmail`                             | `payment.customer.emailAddress`                                          |
| `userAccount.phone`                                      | `payment.customer.mobileNumber`                                          |
| `purchase.confirmationPhone`                             | `payment.customer.mobileNumber`                                          |
| `purchase.products[].itemId`                             | `payment.order.lineItems[].itemId`                                       |
| `purchase.products[].itemName`                           | `payment.order.lineItems[].name`                                         |
| `purchase.products[].itemPrice`                          | `payment.order.lineItems[].amount`                                       |
| `purchase.products[].itemQuantity`                       | `payment.order.lineItems[].quantity`                                     |
| `purchase.products[].itemIsDigital`                      | `payment.order.lineItems[].productType`                                  |
| `purchase.products[].itemCategory`                       | `payment.order.lineItems[].category`                                     |
| `purchase.products[].itemSubCategory`                    | `payment.order.lineItems[].subcategory`                                  |
| `purchase.products[].itemUrl`                            | `metadata.connections.signifyd.purchase.products[].itemUrl`              |
| `purchase.shipments[].destination.fullName`              | `payment.customer.shippingAddress.firstName` + `lastName` (concatenated) |
| `purchase.shipments[].destination.address.streetAddress` | `payment.customer.shippingAddress.addressLine1`                          |
| `purchase.shipments[].destination.address.unit`          | `payment.customer.shippingAddress.addressLine2`                          |
| `purchase.shipments[].destination.address.city`          | `payment.customer.shippingAddress.city`                                  |
| `purchase.shipments[].destination.address.countryCode`   | `payment.customer.shippingAddress.countryCode`                           |
| `purchase.shipments[].destination.address.postalCode`    | `payment.customer.shippingAddress.postalCode`                            |
| `purchase.shipments[].destination.address.provinceCode`  | `payment.customer.shippingAddress.state`                                 |

<Note>
  `purchase.totalShippingCost` and `purchase.shipments[].destination.*` are only sent to Signifyd when both `payment.order.lineItems` and `payment.order.shipping` are provided.
</Note>

### Fields not currently mapped

The following Primer fields are not currently sent to Signifyd.

| Primer                                                       | Expected Signifyd field |
| ------------------------------------------------------------ | ----------------------- |
| `payment.metadata.fraud_context.device_details.cookie_token` | `device.sessionId`      |
| `payment.metadata.fraud_context.device_details.source`       | —                       |
| `payment.metadata.fraud_context.device_details.user_agent`   | —                       |
| `payment.order.lineItems[].description`                      | —                       |
| `payment.customer.firstName`                                 | —                       |
| `payment.customer.lastName`                                  | —                       |

### Custom field mapping

You can use [Advanced Metadata Mapper](/payment-services/advanced-metadata-mapper) with Signifyd to map any metadata field to Signifyd's requests.
