> ## 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.

# Paysafe

> Process card, wallet and alternative payment method payments through Paysafe.

Paysafe is a global payments provider offering card acquiring alongside its own family of digital wallets and prepaid products. Through Primer you can process cards, digital wallets and Paysafe's alternative payment methods on a single connection.

## At a glance

### Supported payment methods

| Payment method | Payment method type | Integration guide |
| - | - | - |
| Card | `PAYMENT_CARD` | [Card](https://primer.io/docs/connections/payment-methods/card/overview.md) |
| Apple Pay | `APPLE_PAY` | [Apple Pay](https://primer.io/docs/connections/payment-methods/apple-pay/overview.md) |
| Google Pay | `GOOGLE_PAY` | [Google Pay](https://primer.io/docs/connections/payment-methods/google-pay/overview.md) |

### Supported capabilities

<table>
  <colgroup>
    <col width="325" />

    <col width="100" />

    <col width="220" />

    <col width="243" />
  </colgroup>

  <thead>
    <tr>
      <th>Capability</th>
      <th>Card</th>
      <th>Apple Pay and Google Pay</th>
      <th>Alternative payment methods</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Authorization and capture</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>

    <tr>
      <td>Partial capture</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>No</td>
    </tr>

    <tr>
      <td>Authorization adjustment</td>
      <td>No</td>
      <td>No</td>
      <td>No</td>
    </tr>

    <tr>
      <td>Refund</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>

    <tr>
      <td>Partial refund</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>

    <tr>
      <td>Multiple refunds</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>

    <tr>
      <td>Recurring and merchant-initiated payments</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>No</td>
    </tr>

    <tr>
      <td>Network tokens</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Not applicable</td>
    </tr>
  </tbody>
</table>

> [!NOTE]
>
> Some capabilities must be enabled on your Paysafe account. Contact Paysafe to confirm which features are available to you.

### 3D Secure

Primer performs 3D Secure authentication using the [Perform 3DS action](https://primer.io/docs/workflows/apps/native-apps/primer-payments-app/perform-3ds-action.md) and passes the authentication result to Paysafe. You do not need to run 3D Secure on the Paysafe side.

## Get started with Paysafe

### Before you begin

If this is your first connection, make sure to follow the [Get started guide](https://primer.io/docs/get-started/overview.md) to begin processing payments with Primer.

Complete your account setup with the Paysafe Onboarding Team before you connect. Paysafe provisions merchant IDs per payment method, so your account must be fully onboarded for every method you intend to offer.

### Credentials

Paysafe issues two credential pairs, one public and one server side. Both are required.

<table>
  <colgroup>
    <col width="154" />

    <col width="518" />
  </colgroup>

  <thead>
    <tr>
      <th>Field</th>
      <th>Where to find it</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**Public username**</td>
      <td>[Paysafe Optic Portal](https://portals.paysafe.com/login), under **Developer > API Keys**. Use the username shown for the **Public** user.</td>
    </tr>

    <tr>
      <td>**Public password**</td>
      <td>[Paysafe Optic Portal](https://portals.paysafe.com/login), under **Developer > API Keys**. Use the key shown for the **Public** user.</td>
    </tr>

    <tr>
      <td>**Server username**</td>
      <td>[Paysafe Optic Portal](https://portals.paysafe.com/login), under **Developer > API Keys**. Authenticate with your Optic Portal password to reveal the **Secret Key**, then use the username shown for the **Server** user.</td>
    </tr>

    <tr>
      <td>**Server password**</td>
      <td>[Paysafe Optic Portal](https://portals.paysafe.com/login), under **Developer > API Keys**. Authenticate with your Optic Portal password to reveal the **Secret Key**, then use the private key shown for the **Server** user.</td>
    </tr>
  </tbody>
</table>

### Configure in the Dashboard

**1. Add Paysafe to your Dashboard**

Go to [Integrations](https://dashboard.primer.io/integrations), select **New integration**, search for Paysafe and enter your credentials.

**2. Configure webhooks in Paysafe**

Log in to the [Paysafe Optic Portal](https://portals.paysafe.com/login) and go to **Developer > Webhook configurations**, then select **Add new configuration** and:

* Select the payment method you want the configuration to cover, either by merchant ID or by payment method name.
* Paste your Primer callback URL into the webhook URL field.
* Select the environment, where you can also test connectivity.
* Tick the events you want enabled.

Select **Create webhook**. A confirmation message appears if it was created successfully.

Paysafe scopes webhook configurations per payment method, so repeat this step for every payment method you offer.

**3. Activate the payment methods on the Checkout**

Go to [Checkout](https://dashboard.primer.io/checkout) and activate the Paysafe payment methods you want to offer.

**4. Route payments with Workflows**

In [Workflows](https://primer.io/docs/workflows/overview.md), select Paysafe in the **Authorize payment** action.

## Saved cards and merchant-initiated payments

Paysafe supports recurring and merchant-initiated payments on cards, Apple Pay and Google Pay. See [recurring payments](https://primer.io/docs/get-started/recurring-payments.md) for the general Primer flow.

## Considerations

* **Account onboarding gates everything.** Paysafe provisions merchant IDs per payment method through its Onboarding Team. A method you have not been onboarded for will fail even if it is active on your Checkout.
* **Webhooks are configured per payment method.** Unlike processors with a single account-level endpoint, Paysafe requires a webhook configuration for each payment method. A missing configuration shows up as payments that never reach a final status.
* **Two credential pairs are required.** The public pair and the server pair serve different calls. Entering one pair in both sets of fields produces authentication errors.
* **Network tokens are supported.** Primer can send network tokens to Paysafe, which can improve authorization rates on repeat payments.

## Test in sandbox

Connect your Paysafe **test** account to your Primer Sandbox environment.

> [tab] Card
>
> | Card number | Expected result |
> | - | - |
> | | |

> [tab] Apple Pay

> [tab] Google Pay

> [tab] Merchant-initiated

## Troubleshooting

Primer maps Paysafe's response codes to its own decline reasons. See [decline codes](https://primer.io/docs/concepts/decline-codes/overview.md) for the full list.

## Go live

Before switching to production, confirm that:

1. Your Paysafe production account is fully onboarded for the payment methods you want to offer.
2. You have added Paysafe in your Primer **production** environment using your **production** credentials, including both the public and server pairs.
3. You have created a production webhook configuration in the Paysafe Optic Portal for every payment method you offer.
4. You handle the [PAYMENT.STATUS webhook](https://primer.io/docs/api-reference/endpoints/v2.4/payment-webhooks/payment-status-update.md) and fulfil orders only on a final status.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.