Sandbox Installation & Testing
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. See My Domain.
1. Install Payments
- Install the Payments package from the AppExchange. Installation usually only takes a few minutes. You will receive email confirmation from Salesforce once the process has been completed.
- 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 for a full list disclosure of permissions access.

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

- 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 [email protected].
- Paypages
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.
One-off payment testing
Never use real card details in a test payment form. Doing so can turn into a security breach and break PCI compliance regulations.
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. For more information on testing, see Test PSPs.
Try out the Ayden connection by processing a simple, one-off card payment:
- Navigate to the Unaric Payments tab.
- Click the New button on the action bar to create a new Payment record.
- Enter any Amount and select Card as Payment route option. Click Save.
- When the payment record has been created, click the Process Payment button.
- Fill in the form using Ayden test card details.
- 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.
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.
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.
- Go to the Unaric Payments Authorisations tab.
- Click the New button in the action bar. Select Inbound as record type and click Next.
- 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.
- Select the authorisation.
- Click the Process authorisation button in the action bar.
- 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.

- Click Update authorisation. You will be asked to review and confirm the payment details. Click Confirm.
- 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, and 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 until further approval from the PSP. Once authorised, the
Repeated payments
Once you have set up the authorisation, you can use it to process payments.
- On the Unaric Payments Authorisation tab, select the authorisation record you created.
- Under the Payments list, click New.

- Complete the payment details. The authorisation field will be pre-populated with the required authorisation record. Click Save.
- Navigate to the payment record and click Process Payment Using Authorisation on the actions bar.
- A pop-up window will show you the authorisation details. Click Process Payment to 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.
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:
- Navigate to Setup > Custom Code >Apex Classes.
- Click the Schedule Apex button to create a new Apex job.
- Set Unaric Payments Repeat Payment as Job Name.
- On Apex Class, click the Apex Class Lookup button (🔍). A new window will open. Select BatchProcessPaymentSchedules from the list.
- In the Schedule Apex Execution section, set Frequency to Weekly and tick all the days under Recurs every week on.
- Select a Start date (defaults to today).
- Set an End date. Set a value a long time in the future such as 31/12/2050.
- Set the Preferred Start Time. A suggestion would be 04:00 or 05:00.
- Save this record and that will schedule the task.
Payments can be used to collect payments automatically from authorisations. See Payment Schedules
2. Create a Payment Schedule
- On the Unaric Payments Authorisations tab, select the Authorisation record created in previous steps.
- Select the dropdown arrow by the payment schedules related list and click New.

- The authorisation will already be pre-populated. Fill in the rest of the required fields (Regular Amount, Frequency, and Next Payment Date).
- 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.
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.
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, have a method for refunding test transactions.
Below are links to test details for various PSPs: