---
title: Sandbox Installation & Testing
slug: payments/sandbox-installation-and-testing
description: Install and thoroughly test Unaric Payments in your Salesforce sandbox before going live in production.
image: https://archbee-image-uploads.s3.amazonaws.com/10Nod6Ww95R3dPr0k0TCJ/Ykk3q4tJSiH6hTvS0b6LA_unaric-payments.png
docTags: 
createdAt: 2025-02-05T15:44:08.509Z
---

This page will guide you through installing, setting up, and testing Payments in a Salesforce sandbox environment. This page assumes you are familiar with basic Salesforce concepts.

## Prerequisites

### My Domain

Activate **My Domain** in Salesforce Lightning for using customized domain names in **sandbox environments.&#x20;**&#x53;ee [My Domain](https://help.salesforce.com/s/articleView?id=xcloud.domain_name_overview.htm\&type=5).

## 1. Install Payments

1. [Install the Payments package from the AppExchange.](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EcrOnUAJ) Installation usually only takes a few minutes. You will receive email confirmation from Salesforce once the process has been completed.
2. After successful installation, open the app launcher and visit the **Unaric Payments Setup** tab. Click the **Setup configuration** button. You will be asked to log in again and allow access permissions to Unaric Payments to finish the installation. Visit [User Permissions](docId\:DX6cbkHljU-T_rmmWxDdj) for a full list disclosure of permissions access.

   ![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43041063566/original/GHMB2jPFE0Tki9dyFPfzq2ptTCvd1WQYRQ.gif?1556297157)
3. To check if your org is successfully connected with Unaric Payments, check the **Configuration Status** displayed on the **Unaric Payments Setup** tab. You should now be connected to an Unaric Payments test account.

   ::Image[]{src="https://api.archbee.com/api/optimize/10Nod6Ww95R3dPr0k0TCJ/zWdc5u6jKKIC-h3_eEXut_image.png" size="70" width="634" height="397" position="center" darkWidth="634" darkHeight="397" showCaption="false"}
4. In this tab, you will see a list of default payment service providers test accounts owned by Unaric Payments for a selection of currencies. These allow you to take immediate test payments. Y

### Additional features

Depending on your requirements and licence, Unaric Payments offers additional features you can set up at this stage. During onboarding, support will help you implement these features. For additional guidance, contact support at [support@unaric.com](mailto\:support@asperato.com).

- [Merchant Groups](docId\:iLBK-Tv_ycfUMGYcx0Ggp)
- [Courtesy Notifications](docId\:ydxIZY76p2uqBewl7TKeX)&#x20;
- [Paypages](docId\:TgpSyjQqFlnuZgiLpGS5m)&#x20;

## 2. Testing

At this stage, your sandbox Unaric Payments environment is connected to default test accounts with Payment Service Providers (PSPs) for a selection of currencies. You can use this PSP to test payments. This section will suggest different features to test.&#x20;

### One-off payment testing

:::hint{type="danger"}
Never use real card details in a test payment form. Doing so can turn into a security breach and break PCI compliance regulations.
:::

:::hint{type="warning"}
This tutorial assumes you're connected to Ayden as a test gateway, which is the default on installing the **Unaric Payments** package. For end-to-end testing, we recommend connecting Unaric Payments to the test accounts of your chosen PSPs. To this end, you will need your PSP credentials. See [Connect your PSP](docId\:dBn9m9AND_tpg9LUsxrqT).
:::

Try out the Ayden connection by processing a simple, one-off card payment:

1. Navigate to the **Unaric Payments** tab.
2. Click the **New&#x20;**&#x62;utton on the action bar to create a new Payment record.
3. Enter any **Amount&#x20;**&#x61;nd select *Card* as **Payment route option**. Click **Save**.
4. When the payment record has been created, click the **Process Payment** button.
5. Fill in the form using [Ayden test card details](https://docs.adyen.com/development-resources/testing/test-card-numbers/).
6. Click **Pay with Card**. Refresh the Salesforce payment record to see the payment record completed. Once successful, the payment record status will update to *Collected from customer.*

:::hint{type="info"}
To test specific scenarios like failed payments due to insufficient funds or card expiration, check your PSP’s website for test card details. Common methods include using specific card numbers, payor names, or amounts.
:::

### Authorisation testing

Authorisations represent saved payment methods that can be used for repeated payments. As such, you will use authorisations to process payments from recurring customers. For more information, see [Authorisations](docId\:F33L_1zECsfRnsvxHUeO5).

For testing, this tutorial will use a direct debit authorisation trough GoCardless using testing credentials. However, Authorisations support multiple payment methods, including credit/debit cards, Direct Debit, ACH/eCheck, and PayPal.

1. Go to the **Unaric Payments Authorisations&#x20;**&#x74;ab.
2. Click the **New&#x20;**&#x62;utton in the action bar. Select *Inbound* as **record type&#x20;**&#x61;nd click **Next**.
3. In **Payment Route options**, select *Direct Debit*. This is the only required field, and since it is a test, it is not necessary to fill in more information. Click **Save**.
4. Select the authorisation.
5. Click the **Process authorisation** button in the action bar.
6. A pop-up screen will ask you to enter the payment information. Regularly, you would either share the authorisation with customers for them to enter the information or fill it yourself while communicating with them. For this test, you can use [GoCardless test bank details](https://developer.gocardless.com/resources/test-bank-details).&#x20;

   ::Image[]{src="https://api.archbee.com/api/optimize/10Nod6Ww95R3dPr0k0TCJ/SMzVsQ0whFaBNU49faAFK_image.png" size="56" width="673" height="897" position="center" darkWidth="673" darkHeight="897" showCaption="false"}
7. Clic&#x6B;**&#x20;Update authorisation**. You will be asked to review and confirm the payment details. Click **Confirm**.
8. After submitting the form, details of the authorisation will then show in the authorisation's page. If the authorisation fails, the pop-up screen will specify the error, the authorisation status will be updated to *Failed,&#x20;*&#x61;nd you will need to retry again; common fail causes include inaccurate information (such as invalid zip codes) and mismatches between banking and authorisation currency. If the authorisation succeeds, it will be updated to *Pending&#x20;*&#x75;ntil further approval from the PSP. Once authorised, the&#x20;

### Repeated payments

Once you have set up the authorisation, you can use it to process payments.

1. On the **Unaric Payments Authorisation&#x20;**&#x74;ab, select the authorisation record you created.
2. Under the **Payments** list, click **New**.

   ::Image[]{src="https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43025238103/original/_hXUGiKmh56k1_DbCZ_kYQjGooYm4EMKSg.png?1549643412" size="56" width="490" height="314" position="center" darkWidth="490" darkHeight="314" showCaption="false"}
3. Complete the payment details. The authorisation field will be pre-populated with the required authorisation record. Click **Save**.
4. Navigate to the payment record and click **Process Payment Using Authorisation&#x20;**&#x6F;n the actions bar.
5. A pop-up window will show you the authorisation details. Click **Process Payment&#x20;**&#x74;o finish.

### Payment schedule testing

Unaric Payments' scheduled jobs automate the process of collecting recurring payments. It's a background task that runs on a schedule to process due payments. Without this job, recurring payments wouldn't be automatically handled; you'd likely have to process them manually.

:::hint{type="warning"}
Creating and scheduling Apex jobs in Salesforce requires system administrator privileges. As such, you need to be a system administrator user to create it.
:::

**1. Setup schedule job**

This feature is not active by default in non-production environments. To activate it, you need to schedule the Apex Job first:

1. Navigate to **Setup >** **Custom Code >Apex Classes.**&#x20;
2. Click the **Schedule Apex&#x20;**&#x62;utton to create a new Apex job.
3. Set *Unaric Payments Repeat Payment&#x20;*&#x61;s **Job Name**.
4. On Apex Class, click the **Apex Class Lookup&#x20;**&#x62;utton (🔍). A new window will open. Select *BatchProcessPaymentSchedules* from the list.&#x20;
5. In the **Schedule Apex Execution** section, se&#x74;**&#x20;Frequency** to *Weekly* and tick all the days under **Recurs every week on**.
6. Select a **Start date** (defaults to today).
7. Set an **End date**. Set a value a long time in the future such as 31/12/2050.
8. Set the Preferred **Start Time.&#x20;**&#x41; suggestion would be 04:00 or 05:00.
9. Save this record and that will schedule the task.

:::hint{type="info"}
Payments can be used to collect payments automatically from authorisations. See [Payment Schedules](docId\:mr7D24NQdmZSfhovEf2WD)&#x20;
:::

**2. Create a Payment Schedule**

1. On the **Unaric Payments Authorisations** tab, select the Authorisation record created in previous steps.
2. Select the dropdown arrow by the payment schedules related list and click **New**.

   ::Image[]{src="https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43025528645/original/B79rdzZi4mdj1ThnlMAM-vj3UtYoBdGdQw.png?1549887532" size="56" width="628" height="411" position="center" darkWidth="628" darkHeight="411" showCaption="false"}
3. The authorisation will already be pre-populated. Fill in the rest of the required fields (**Regular Amount**, **Frequency**, and **Next Payment Date**).
4. Click **Save** to finish. The payment schedule is now active, and will collect overnight each time the following conditions are met:
   - The **Next Payment Date** is set to either today, or is in the past.
   - The status of the Payment schedule is set to *In force.*
   - The status of the authorisation attached to the payment schedule is *In force.*

:::hint{type="info"}
Payments schedules have fixed amounts and dates for collection. If you need variable dates and amounts from schedule collecting from authorisations, you can use Salesforce tooling to set up your custom schedule.
:::

### PSP end-to-end testing

**Unaric Payments** comes pre-configured with its own testing PSP connections so you can test payments out of the box. However, you are limited to seeing the results in Salesforce and cannot view the payments as they flow through the PSP. For end-to-end testing, you'll need to connect your own PSP test account. See [Connect your PSP](docId\:dBn9m9AND_tpg9LUsxrqT).

:::hint{type="danger"}
Once you go live, it is **strongly recommended** to process a few live transactions to verify that Unaric Payments and your PSP are configured correctly. As such, when you start using **live payment credentials,&#x20;**&#x68;ave a method for **refunding test transactions.**
:::

Below are links to test details for various PSPs:

- [Adyen Testing Guide](https://docs.adyen.com/development-resources/testing/)
- [Authorize.Net Testing Guide](https://support.authorize.net/knowledgebase/article/000001517/en-us)
- [BlackBaud Testing Guide](https://developer.blackbaud.com/skyapi/docs/getting-started/learn-api)
- [Braintree Testing Guide](https://braintree.gitbook.io/in-person/get-started-1/configure-sandbox)
- [Checkout.com Testing Guide](https://www.checkout.com/docs/developer-resources/testing)
- [CyberSource Testing Guide](https://developer.cybersource.com/hello-world/testing-guide-v1.html)
- [Forte Testing Guide](https://docs.fortebank.com/en/integration/card_api/testing/)
- [GoCardless Testing Guide](https://www.postman.com/gocardlessapi/gocardless-api/documentation/28f4dal/gocardless)
- [Intellipay Testing Guide](https://intellipay.com/category/credit-cards/card-testiing/)
- [Moneris Testing Guide](https://developer.moneris.com/More/Testing/Testing%20a%20Solution)
- [Paya Testing Guide](https://support.paya.com/44616-paya-virtual-terminal-all-articles/315930-list-of-test-card-numbers)
- [Payeezy Testing Guide](https://github.com/payeezy/get_started_with_payeezy?tab=readme-ov-file#build-and-test-your-integration)
- [PayPal Testing Guide](https://developer.paypal.com/sandbox-testing/overview)
- [PayPal PayFlowPro Testing Guide](https://developer.paypal.com/api/nvp-soap/payflow/payflow-pro/payflow-pro-testing/)
- [SagePay (Opayo) Testing Guide](https://dock.co.uk/blog/sage-pay-test-card-details)
- [Stripe Connect Testing Guide](https://docs.stripe.com/test-mode?locale=en-GB)
- [TakePayments Testing Guide](https://www.takepayments.com/media/50rboxji/test-card-details-version-2-2-0.pdf)
- [Worldpay Testing Guide](https://developer.worldpay.com/products/access/payments/testing)
