---
title: Configure Payment Service
slug: commerce-composable-modules/payment-gateway/configure-payment-service
docTags: 
createdAt: 2026-08-05T19:34:17.597Z
---

**Spreedly standalone integration deprecated**

Spreedly is no longer listed as a standalone payment gateway option in the gateway selector. Selecting Spreedly outside the Payment Service displays a provisioning message: "Payment Service must be provisioned to use Spreedly Payment Gateway IFrame. Please reach out to support team."

Storefronts using the direct Spreedly integration should migrate to the Payment Service. See Configure Payment Service for setup instructions.

With Optimizely Commerce's Payment Service, you can add payment gateway providers for your ecommerce. This uses Spreedly's iFrame to offer more flexibility and stability:

- Use a payment platform without implementing new code.
- Access more payment gateway options.
- Implement multiple payment services on a single website.

:::hint{type="info"}
**Note**

Although Payment Service supports multiple gateways for a single site, there is currently a limit of one gateway per site in Optimizely Configured Commerce. Work with your partner if you want to customize this.
:::

## Prerequisites

Before you enable Payment Service for Optimizely Configured Commerce or Optimizely Commerce Connect, you should look at the list of Spreedly-supported gateways.

The Spreedly integration is available for Spire sites only. If your site is on Classic, use the library of existing payment gateways until you upgrade to Spire.

After you select a gateway, note the following:

- If an ERP or other third-party system needs payment tokens, such as to capture a payment after delivery, the gateway must support the **Store** operation. This should be listed under the **Supported operations** section for the payment gateway fact sheet. See the Stripe Payment Intents fact sheet as an example.
- If the gateway requires 3DS2, the fact sheet displays **Yes** for **Spreedly 3DS2 Global Support**. This is what you configure in the Payment Service when adding a merchant profile and SCA provider.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/W1DcLGyjLTP_aZUzUk309_stripe-payment-intents-fact-sheet.png" size="100" isUploading="false" width="1664" height="876" darkWidth="1664" darkHeight="876" showCaption="false" indent="1"}

:::Paragraph{indent="1"}
**Gateway Specific 3DS2 Supported** refers to the gateway's native 3DS2 support, which Payment Service does not support at this time.
:::

- All payment gateways are different and require a different implementation in Spreedly and the Payment Service. You should read the [Spreedly gateway guide](https://developer.spreedly.com/docs/supported-gateways) for the steps you must take with the gateway provider, either configurable by the payment portal or by contacting support, to turn certain features on or off.
- Some gateways have **gateway\_specific\_fields**. This passes gateway custom information from Optimizely and the Payment Service to the payment gateway provider. You or your partner can fully customize the gateway-specific fields. For example, you could send the necessary order information to the ERP system from the payment gateway.

If the gateway intended to be used is not part of this list, contact Optimizely support.

## Enable Payment Service

### Configured Commerce

To use the Payment Service, contact [Optimizely Support](mailto\:support@optimizely.com) to have the keys for a Payment Service instance added to your commerce environment.

After the keys are added and you restart the site, you can see the admin pages for Payment Service to continue the configuration.

### Commerce Connect

To use the Payment Service, contact [Optimizely Support](mailto\:support@optimizely.com) to have the Payment Service instance created. They can then provide the instance keys that must be added to `appsetting.json` in Commerce Connect after downloading the [Optimizely.PaymentService.Client NuGet package](https://nuget.optimizely.com/packages/optimizely.paymentservice.client/).

```auto
"PaymentServiceOptions": {
			"PaymentServiceIsEnabled": true,
			"PaymentServiceUrl": "https://xxx.xxx/",
			"AppKey": "xxxxx”,
			"SecretKey": "xxxxx”,
			"AuthenticationType": "HMAC”,
			"EnvironmentKey": "xxx",
			"SigningSecret": "xxx",
			"EnvironmentName": "abc"
			}
```

The supported authentication types are HMAC and OBO.

If the **EnvironmentKey** is empty, provide an **EnvironmentName** and add the following code to the `Configure` function of the `Setup.cs` file. The environment was automatically established during start-up and running.

`app.SetupPaymentService();`

After the keys are added and you restart the site, you can see the admin pages for Payment Service to continue the configuration.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/XP5gZn8_Bwwmee-TcIqQs_payment-service-small.png)

## Add gateways

1. Go to **Administration > Payment Service** in Configured Commerce or **Commerce Administration > Settings > Payment Service** in Commerce Connect.
2. Click **Add Gateway**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Hbx2Qpjs_aa7cB9X7q_2e_addgateway.png" size="100" isUploading="false" width="867" height="541" darkWidth="867" darkHeight="541" showCaption="false" indent="1"}

3. Select the gateway from the drop-down list. The form populates additional fields depending on the gateway.
4. (Optional) Enter a **Description**.
5. (Optional) Select your **Merchant Profile Key** if you have already created a merchant profile.
6. Select whether to use this gateway in your **Sandbox Site**.
7. Fill in any additional information for your gateway.
8. Click **Create**.

## Enable 3DS authentication

To enable 3DS authentication, create a [merchant profile](https://developer.spreedly.com/reference/create-merchant-profile) and an [SCA provider](https://developer.spreedly.com/reference/create-sca-provider). The merchant profile holds the SCA provider, which runs 3DS2 Global authentications on the authenticate endpoint or as part of authorize and purchase transactions.

:::hint{type="info"}
**Note**

You cannot perform a new 3DS authorization or sales transaction through the Admin Console in Configured Commerce.
:::

### Add a merchant profile

Information for the merchant profile fields comes from your payment provider.

1. Go to **Administration > Payment Service > Merchant Profiles** in Configured Commerce or **Commerce Administration > Settings > Payment Service > Merchant Profiles**.
2. Click **Add Merchant Profile**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/8nyffFU4cs7p2faew6_in_add-merchant-profile.png" size="100" isUploading="false" width="886" height="727" darkWidth="886" darkHeight="727" showCaption="false" indent="1"}

3. (Optional) Enter a **Description**.
4. Enter a **Sub-Merchant Key**.
5. Select a credit card from the drop-down list.
6. Enter the **Acquirer Merchant ID**.
7. Enter the **Merchant Name**.
8. Enter a **Country Code**.
9. Enter the **MCC**. The MCC is the Merchant Category Code, which classifies the type of goods or services that the business sells. See [Spreedly's documentation](https://developer.spreedly.com/docs/spreedly-3ds2-global) for information.
10. Repeat steps 5-9 for all card types your site supports.
11. Click **Create**.

### Add an SCA provider

You must create a merchant profile first to add a Strong Customer Authentication (SCA) provider.

:::Paragraph{listStyleType="decimal" indent="2"}
Go to **Administration > Payment Service > SCA Providers** in Configured Commerce or **Commerce Administration > Settings > Payment Service > SCA Providers** in Commerce Connect.
:::

:::Paragraph{listStyleType="decimal" listStart="2" indent="2"}
Click **Add SCA Provider**.
:::

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/FGQ3xG6wDhRsFOLURj3ma_add-sca-provider.png" size="90" isUploading="false" width="867" height="809" darkWidth="867" darkHeight="809" showCaption="false" indent="1"}

:::Paragraph{listStyleType="decimal" listStart="3" listRestartPolite="3" indent="2"}
Select a **Merchant Profile**.
:::

:::Paragraph{listStyleType="decimal" listStart="4" indent="2"}
Enter the **Type**.
:::

:::Paragraph{listStyleType="decimal" listStart="5" indent="2"}
Select whether to use this SCA Provider in your sandbox.
:::

:::Paragraph{listStyleType="decimal" listStart="6" indent="2"}
Select a **Credit Card** from the drop-down list.
:::

:::Paragraph{listStyleType="decimal" listStart="7" indent="2"}
Enter the **Acquirer BIN**.
:::

:::Paragraph{listStyleType="decimal" listStart="8" indent="2"}
Enter the **Merchant Url**.
:::

:::Paragraph{listStyleType="decimal" listStart="9" indent="2"}
Enter the **Merchant Brand Id**.
:::

:::Paragraph{listStyleType="decimal" listStart="10" indent="2"}
Enter the **Merchant Password**.
:::

:::Paragraph{listStyleType="decimal" listStart="11" indent="2"}
Repeat steps 6-10 for all card types your site supports.
:::

:::Paragraph{listStyleType="decimal" listStart="12" indent="2"}
Click **Create**. You can also click **Cancel** to exit without saving.
:::

:::hint{type="warning"}
**Important**

After you create the SCA provider, the SCA Provider Key displays. Copy this key because this is the only time this information is displayed. If you lose it, you must create another SCA provider.
:::

### Test 3DS integration

Before going to production, you should test your 3DS integration. See [Testing your 3DS2 Global Integration in Spreedly's documentation](https://developer.spreedly.com/docs/testing-your-3ds2-global-integration#getting-started) for information.

## Enter credentials under settings

### Configured Commerce

When you have completed the previous steps, go to **Administration > Settings > Spreedly** and enter the following information:

1. Enter the gateway token from [Add gateways](docId\:F8ydBP8qbzpBx69Yi2AXk). This can be website-specific.
2. Toggle on **3DS Enabled**.
3. Enter the **SCA Provider Key** and **Signing Secret** from [Add an SCA provider](docId\:F8ydBP8qbzpBx69Yi2AXk).

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/pnV1EsYarC7LzWH4jO_Ib_spreedly-gateway-token.png" size="100" isUploading="false" width="786" height="329" darkWidth="786" darkHeight="329" showCaption="false" indent="1"}

A website-specific setting, **Payment Service Request/Response Logging**, is available under Administration > Settings > Order Management > Payment. When enabled, the system logs request and response payloads exchanged with Payment Service. Sensitive data is automatically masked, and logging failures do not impact payment processing.

### Commerce Connect

When you have completed the previous steps, go to **Commerce Administration > Settings > Payments**, click **Create**, and enter the following information:

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/gU64UGVPl-Nbb0MKDhYyU_paymentsgreaterpayment-service.png" size="100" isUploading="false" width="1396" height="1045" darkWidth="1396" darkHeight="1045" showCaption="false" indent="1"}

1. Enter the **Name**.
2. Enter the **System Keyword**.
3. Enter the **Description**.
4. Select a **Language**.
5. Select a **Class Name**.
6. Select a **Payment Class**.
7. Select whether to use this payment in **IsActive**.
8. Select whether to use this payment in **IsDefault**.
9. Click **Save**. You can also click **Cancel** to exit without saving.

Select the payment method you just created and go to the **Parameters** tab. Click **Add parameter**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/awEvsr-XaxTEeXrrXISry_payment-parameters.png" size="100" isUploading="false" width="1123" height="506" darkWidth="1123" darkHeight="506" showCaption="false" indent="1"}

1. Enter the parameter name as **GatewayToken**.
2. Enter the parameter value with the key that was created.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/jvUuAUl0VmSJ2zGXpYLUn_add-new-parameter.png" size="100" isUploading="false" width="709" height="209" darkWidth="709" darkHeight="209" showCaption="false" indent="1"}

3. Click **Save**. You can also click **Cancel** to exit without saving.

Go to the payment method you just created. Go to **Markets** and select the active markets. Click **Save** if you made changes.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/YEJ3ki5kAYqXa_Edvbpy6_payment-service.png" size="100" isUploading="false" width="825" height="499" darkWidth="825" darkHeight="499" showCaption="false" indent="1"}

If you want to use 3DS, create two parameters with the following:

- **ThreeDsIsEnabled** – **True**
- **ScaProviderKey** – The key that was created

Click **Save**. You can also click **Cancel** to exit without saving.

:::hint{type="info"}
**Note**

You can create other methods and sort by IsActive, IsDefault then Ordering values.
:::

## Implement verify a card transaction type (optional)

Commerce's Payment Service supports the Verify transaction type, which validates a payment method without placing a charge. Use Verify for scenarios such as saving a card on file or validating a payment method before a subscription begins.

Verify transactions are supported through Spreedly. This feature requires custom development through extensions. Override the appropriate payment processing handler to call the Verify endpoint instead of Authorize. See [Verifying a card in Spreedly's documentation](https://developer.spreedly.com/docs/using-payment-methods#verifying-a-card) for information.

3D Secure is not supported for Verify transactions.

## How it works

The following flowchart demonstrates the payment service process during cart submission.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/fdTjxr7lOMFtXCMWyJC0Z_cart-submit.png" size="100" isUploading="false" width="950" height="1262" darkWidth="950" darkHeight="1262" showCaption="false" indent="1"}

## AVS and CVV gateway provisioning

Some Spreedly-supported payment gateways let you configure Address Verification System (AVS) and Card Verification Value (CVV) behavior through the APIs or merchant portal. See [AVS and CVV gateway provisioning for Spreedly](docId\:LP_BFBNF5-U2gPbf8qIZN) for information.
