---
title: Payments
slug: payments/payments
description: Process all types of customer payments securely with Unaric Payments directly inside your Salesforce environment.
image: https://cdn.images.archbee.com/10Nod6Ww95R3dPr0k0TCJ/TcPthvZZhYA_WQfRXDgRX_unaric-payments.png
icon: {"faIcon":"fa-solid fa-money-bill-transfer"}
createdAt: 2025-02-02T17:05:24.404Z
---

Use the **Payment** object to request and record payments. Payment records contain all the information needed to control the payee experience via the paypage, including currencies, payment routes available, amounts, and languages. Payment records also direct users to different pages depending on if the payment was successful or failed. These records can be pre-populated with as much or as little information as you choose, and can be created either manually or automated.

![](https://api.archbee.com/api/optimize/10Nod6Ww95R3dPr0k0TCJ/3nRzumAPdIKBeHg6Nuqqw_asperato-payments.gif)

:::hint{type="info"}
Since version 2.17, payments are immediately processed. In older releases, payments will be processed through daily batches after creating their records.
:::

## Inbound payments

The inbound payments feature enables businesses to manage and automate the collection of customer payments directly within Salesforce.

### How it works

::::WorkflowBlock
:::WorkflowBlockItem
**Create a payment record**

A payment record is generated, specifying the type (in this case, inbound), amount, due date, payment route, and associated authorisation. Payment records support multiple payment methods, including card payments, direct debit payments, ACH/eCheck, and PayPal.
:::

:::WorkflowBlockItem
**Payment processing & collection**

Once *Submitted for Collection,* the payment request has been sent to your payment gateway to attempt collecting funds from the customer. A payment record submitted for collection should not be changed as it is awaiting a response from the PSP. As such, the actual status of the payment depends on the payment gateway's processing.

Once a payment record has been processed, all the relevant information from the PSP is populated on this record alongside a status update. Details such as the payee name, time and date of payments, any error codes, transaction references, etc. are all visible on the payment record.
:::

:::WorkflowBlockItem
**Outcome**

Payment records are updated with the transaction status, allowing businesses to track successful and failed payments. If the collection is successful, the payment updates to **Collected from Customer**. If it fails, the system retries until success or until all attempts are exhausted (resulting in a **Failed** status). You can also cancel the payment, which moves it to **Cancelled**.
:::
::::

### Flowchart

```mermaid
graph TD
    A["Payment Created in Unaric Payments (Awaiting Submission)"] --> B["Submitted for Collection"];
    B --> C{Payment Collection Successful?};
    C -- Yes --> D["Collected from Customer"];
    C -- No --> E["Retry in Progress"];
    E --> F["Payment resubmitted (GoCardless settings)"];
    F --> G{Payment Collection Successful?};
    G -- Yes --> D;
    G -- No --> H{Retry Attempts Exhausted?};
    H -- Yes --> I["Failed"];
    H -- No --> E;
    B --> L["Submit Payment for Cancellation"];
    L --> J["Pending For Cancellation"];
    J --> K["Cancelled"];

    classDef startEnd fill:#002D4C,stroke:none,color:#FFF,font-weight:400,font-family:Helvetica,rx:5px,ry:5px;
    classDef process fill:#42A4DD,stroke:none,color:#FFF,font-weight:400,font-family:Helvetica,rx:5px,ry:5px;
    classDef decision fill:#F4F7FA,stroke:none,color:#002D4C,font-weight:400,font-family:Helvetica,rx:5px,ry:5px;

    class A,D,I,K startEnd;
    class B,E,F,J process;
    class C,G,H decision;
```

## Key fields

| **Fields**                           | **Description**                                                                                                                        |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Payment Route Options (Required)** | Allows you to choose which payment routes are available to your customer to use. E.g. Card, Direct Debit or ACH                        |
| **Amount (Required)**                | The payment amount.                                                                                                                    |
| **Currency**                         | The payment currency. **Required&#x20;**&#x69;f multi-currency payments are enabled for the Salesforce org.                            |
| **ECOM URL**                         | This is the link you provide to your customers to enable them to process the payment.                                                  |
| **Status**                           | Tells you if the payment is awaiting submission, if it's successfully processed, or if it failed for some reason.                      |
| **Status description**               | A descriptive text showing the reason related to the current status. Might contain the reason for cancellation or failure for example. |

:::hint{type="info"}
When creating a payment from an authorisation, the authorisation field will automatically be populated with the correct record ID.
:::

## Statuses

| **Status**                   | **Description**                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Awaiting submission**      | The payment has not yet been processed or submitted to your payment service provider.                                                                                                                                                                                                                                                                                                                 |
| **Submitted for collection** | The payment has been submitted to your payment service provider, but the outcome of this transaction is not yet known. This is used for direct debit payments, which take a few days to clear.                                                                                                                                                                                                        |
| **Collected from Customer**  | The payment has been collected from the customer and has been confirmed.                                                                                                                                                                                                                                                                                                                              |
| **Retry in progress**        | The payment collection attempt has failed and will be retried in a few days. **This status only applies to integrations with GoCardless Success+.**                                                                                                                                                                                                                                                   |
| **Failed**                   | The payment failed to collect. The **Status description** field will provide a description of the error. If a payment attached to an authorisation fails, the authorisation status will be unaffected. The failure of a payment does not necessarily imply a failure of the underlying authorisation (for example, it could simply be that there are insufficient funds in the account at this time.) |
| **Pending For Cancellation** | This is an intermediate status when submitting a payment for cancellation from Salesforce. **Cancellation of payments is currently only supported for GoCardless payments.**                                                                                                                                                                                                                          |
| **Cancelled**                | This status suggests that the payment collection was cancelled. Payments cancellation is currently only supported for GoCardless payments.                                                                                                                                                                                                                                                            |

## Payment error codes

Unaric Payments enforces unique codes for each type of error, covering all payment failure cases. In this way, it is possible to automate flows that respond to specific failure codes. The sanitised responses are listed here:

| **Code**                                       | **Description**                                                                                                                                                           |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **NOT\_COMPLETED**                             | The payment gateway authorisation screen was not completed correctly.                                                                                                     |
| **DECLINED**                                   | Transaction declined, a reason was not given. Please try again. If no luck, try a different payment method.                                                               |
| **DECLINED\_AUTH\_NOT\_FOUND**                 | A repeat payment was attempted using an authorisation, but the gateway did not have a record of this authorisation.                                                       |
| **DECLINED\_NAME**                             | Transaction declined, a valid name was not provided.                                                                                                                      |
| **DECLINED\_FRAUD**                            | Transaction declined. A reason was not given.                                                                                                                             |
| **DECLINED\_AVS**                              | Declined, billing address does not match the address held by the bank. Please check the address entered.                                                                  |
| **DECLINED\_AVS\_MISSING\_INFO**               | Declined, required billing information not specified. Please check you have completed all required fields.                                                                |
| **DECLINED\_ABA**                              | Declined, routing number was incorrect                                                                                                                                    |
| **DECLINED\_CARD\_DETAILS**                    | Declined, card details were incorrect. Please check the card details entered. If the problem persists please contact your card issuer or try a different payment method.  |
| **DECLINED\_MANDATE\_ERROR**                   | The mandate has failed, was canceled, or has expired                                                                                                                      |
| **DECLINED\_DUPLICATE**                        | Declined, duplicate transaction. Please do not try again as payment has most likely already been collected. Please contact the company you are trying to make payment to. |
| **DECLINED\_CV2**                              | Declined, card security code was incorrect. Please check the last 3 digits on the reverse of the card and try again.                                                      |
| **DECLINED\_ISSUE**                            | Invalid issue number. Please check and try again. If the problem persists please contact your card issuer.                                                                |
| **DECLINED\_START\_DATE**                      | Declined because the start date is in the future. Please enter a start date that is in the past.                                                                          |
| **DECLINED\_EXPIRY\_DATE**                     | Declined, card expired. Please use a different card or contact your bank.                                                                                                 |
| **DECLINED\_INVALID\_AMOUNT**                  | Declined, invalid amount. Please check the amount and try again. If the problem persists, please contact the company you are trying to make payment to.                   |
| **DECLINED\_INVALID\_EMAIL**                   | Declined, the email address is mandatory and a valid one was not provided. Please try again and enter your email address.                                                 |
| **DECLINED\_UNSUPPORTED\_CARD\_TYPE**          | Declined, the card you used isn't supported. Please try with a different card or contact the company you are trying to make payment to.                                   |
| **DECLINED\_WRONG\_CARD\_TYPE**                | Declined, the card type you specified does not match the card number. Please check the card details entered.                                                              |
| **DECLINED\_UNSUPPORTED\_CURRENCY\_TYPE**      | Declined, the currency you used isn't supported.                                                                                                                          |
| **DECLINED\_UNSUPPORTED\_CURRENCY\_TYPE\_ASP** | Declined, no payment service provider has been set up for this currency.                                                                                                  |
| **DECLINED\_AMOUNT\_TOO\_LARGE**               | Declined, the amount is too large.                                                                                                                                        |
| **DECLINED\_INSUFFICIENT\_FUNDS**              | Declined, there are insufficient funds on this account.                                                                                                                   |
| **DECLINED\_PAYER\_DECEASED**                  | Declined, this account belongs to someone who is deceased.                                                                                                                |
| **DECLINED\_GATEWAY\_ERROR**                   | Declined, the gateway encountered an error. Please try again in a few minutes. If the problem persists, please contact the company you are trying to make payment to.     |

### Raw PSP response messages

Aside from error codes, Unaric Payments passes through the raw response messages from the connected PSP. This provides further detail in understanding the outcome of payments and authorisations. To enable this feature:

1. Navigate to **Setup > Object Manager**.
2. Select the object for which you want to enable these response messages.
3. Go to the **Page Layouts&#x20;**&#x74;ab and select the page layout to modify.&#x20;
4. Add the **Raw Error Message from PSP&#x20;**&#x66;ield.

