Skip to main content
Skip table of contents

Salesforce User Guide

This guide is designed to explain Payrix/Salesforce integration and features this Payment Solution offers.


Payment Flows

Flow 1 - Invoice Payments

Invoices can be created in the Payrix Payment Requests object from any object within Salesforce.

  • These can then be paid through Payrix

  • Each invoice can be nominated to be a single payment or treated as recurring.

  • Any invoices added to this object will have a Payrix URL generated.

    • This URL can then be added to invoices/emails being sent to clients.

    • When the client opens the URL, they will display the Payrix Hosted Payment Page (HPP), pre-populated with the information gathered from the Salesforce object.

    • The client can then make the payment and agree to the Terms & Conditions, if recurring.

Flow 2 - Invoice Sync

When a payment is completed on the HPP or a payment is initiated/completed through recurring, or a BPAY payment completed, Payrix will automatically update the Payrix Invoice Payment object in Salesforce.

  • A new row will be inserted for each status update for an invoice, and each invoice may have multiple payments made against it.

    • Note that payments may be over or under the amount requested due to BPAY being able to nominate the payment amount.

  • A trigger or process on the Payrix Invoice Payments table could then be used to update the relevant objects in Salesforce, such as cash entry, etc.

Flow 3 - All Payments

When a payment is trigged via Payrix from outside of Salesforce, the option exists to push non-Salesforce generated transactions back as Payrix Payment Events.

  • These payments could be generated via one of the Payrix APIs, or via Console and must be Settled or Rejected.

Flow 4 - Settlements

As money is settled into the Billers bank account, Payrix will update the Payrix Settlement Events object with details of the Settlement Transaction.

  • This flow will also update the Payment Event with the settlement ID of the transaction was included in. As they are inserted, a trigger could update the relevant tables for reconciliation within SF.


Package locations

To install the correct package and sync with your Salesforce organisation, please use the correct URL below:

Note: Recommendation is to ‘Install for All Users’. If you prefer you can ‘Install for Admin Users Only’.

Ensure that the Salesforce User authorising the Payrix Sync is a Salesforce System Administrator or has Salesforce System Administrator privileges.

Once successfully installed, the package will display in “Installed Packages”.

Authorise Salesforce Account

You will need to sync the Salesforce organisation to the Payrix account, to do so follow the below steps:

  1. Login to Payrix Portal

  2. Select ‘Salesforce’ in the top menu bar.

  3. Select the correct radio button, ‘Production’ or ‘Sandbox’.

  4. Login via Salesforce ensuring the correct domain is entered and authorisation will be complete.

    1. You can find the correct domain by going into your Salesforce Setup Settings:

      1. Login to Salesforce

      2. Click on the Cogs button on the top right and select ‘Setup’.

      3. In the search field on the left under ‘Setup’, enter ‘My Domain’.

      4. From ‘Current My Domain URL’, select the section before ‘.my.salesforce.com’ and that is the correct domain to use.

If you are experiencing issues authorising Salesforce to the Payrix account, refer to our Troubleshooting steps here - Troubleshoot Payrix to Salesforce authorisation.


Payrix Payments Application

Once the application launches you will see 3 tabs:

Payrix Payments Requests

  • This will list all payment requests generated in Salesforce that will be pushed to Payrix for processing or to a Payer via HPP to trigger a payment.

Payrix Payment Events

  • This is a list of all Payment events generated in Payrix that have been pushed back to Salesforce. You can select each event and open details of the transaction.

Payrix Settlement Events

  • This list displays details of all settlement transactions. Sums of money settled to the Business. Using the ‘Settlement’ filed in the payment event, you can open the settlement event for that transaction.

Sample:

TRANSACTION EVENT:

SETTLEMENT EVENT:

SAMPLE OF INVOICE CREATION


Payrix Hosted Payment Page (HPP)

Single invoices paid via Credit Card will not create a Payrix Payer but will create a transaction. Single invoice payments made via BPay or Bank will create a Payer and a transaction, using the details passed in the Invoice Object.

Sample of Successful Invoice Result

Example Recurring HPP

Once a Payer agrees to recurring debits by processing a payment via a recurring invoice and ticking the I agree to the Direct Debits & Terms and Conditions box, their invoices will be processed automatically. If the URL is opened the ‘Sit back and relax!’ message will be displayed.

Sit back and relax!

Recurring and Single Combination

After agreeing on the first invoice to be debited automatically for future payments, most future invoices will be recurring.


If a single invoice is then raised against this Salesforce payer object, a new Payer will be created. With SI appended to the Payrix Payer Refence. This will hold the payment details of that single invoice Payment.

Note - As Single Invoice Payments via Card do not create a Payer, no SI Payer will be created. This is only applicable for bank and BPay.


Refunded and Failed Transactions

Payrix allows refunds via our Console Portal and via REST API. If a refund is triggered from either of these methods and have “Create payment events for non-Salesforce transactions” enabled the Payment solution will push a Payment Event with the Event Type of “Refund”


As example below:

The Payment Package will also push rejected transactions to Salesforce. So, for example if a transaction is rejected due to Insufficient Funds, a Payment Event with the type “Rejected” will be generated. The rejection reason is stored in the Rejection Description.

As example below:

Please note specific field value:

  • Fee Amount = is the total amount of any fees that will be charged to the business that receives the payment for the invoice

  • Surcharge Amount = the total amount of any surcharges paid by the payer for the invoice


Creating Invoice

Payrix Payment Request

A staging object used to request payments.

  • API Name: Payrix_PaymentRequest__c

  • Contains all invoices/billing documents that may be paid through Payrix

  • Can be populated by Triggers/Process on any Salesforce object

Please note this object is only populated and updated by Salesforce.

API Name

Type

Description

SourceType__c

text (255)

The type of source object for the invoice; eg. “BillingDocument” or “Invoice”.

SourceId__c

text (18)

The object ID of the source object.

InvoiceNumber__c

text (20)

The source document reference that is shown to the payer as the invoice number; e.g. “INV-001”.

InvoiceType__c

picklist

“Single” for a one-off payment.

“Recurring” if the payment will occur automatically on the due date when credit card or bank account details have been provided by the payer previously.

IssueDate__c

date

The date the invoice was issued on.

DueDate__c

date

The date payment for the invoice is due.

Description__c

textarea (255)

The text shown to the payer to describe the purpose/content of the invoice.

CurrencyCode__c

text (3)

The currency code for the amount due to be paid, as per standard Salesforce currency codes.

AmountDue__c

number (16,2)

The amount due to be paid.

PayerType__c

text (255)

The type of payer object for the invoice; eg. “Account” or “Contact”.

PayerId__c

text (18)

The object ID of the payer object.

PayerFamilyOrBusinessName__c

text (50)

The payer’s surname or business name; e.g. for “Jane A. Citizen” use “Citizen”.

PayerGivenName__c

text (50)

The payer’s given name; e.g. for “Jane A. Citizen” use “Jane”.

PayerEmail__c

text (255)

The payer’s email address.

PayerPhone__c

text (50)

The payer’s preferred phone number for voice communications.

PayerMobilePhone__c

text (50)

The payer’s mobile phone number for SMS communications.

PayerBillingSteet__c

textarea (255)

The street details of the payer’s billing address.

PayerBillingCity__c

text (50)

The city, suburb or town component of the payer’s billing address.

PayerBillingState__c

text (50)

The state or territory component of the payer’s billing address.

PayerBillingPostalCode__c

text (50)

The postal or ZIP code component of the payer’s billing address.

PayerBillingCountry__c

text (50)

The country component of the payer’s billing address.

PaymentUrl__c

formula

The URL of the Payrix Hosted Payment Service that accepts payment for the invoice. The value of this field is generated automatically.

All fields other than PaymentUrl are required. PaymentUrl__c is generated automatically. This field is read-only.


Transaction Sync

Payrix Payment Event

A staging object used to signal payment events.

  • API Name: Payrix_PaymentEvent__c

  • All payments made through Payrix for the Biller will be inserted into the is table.

  • Multiple payments for an Invoice will be inserted separately.

API Name

Type

Description

EventDateTime__c

datetime

The date and time of the payment event.

EventType__c

picklist

“Pending” when automatic processing of a recurring invoice has started.

“Rejected” when the payment was rejected (declined).

“Success' when the payment was successful (approved).

“Settled” when settlement for the payment has occured.

SourceType__c

text (255)

The type of source object for the invoice; e.g. “BillingDocument” or “Invoice”. Blank for payments not arising from Payrix Payment Request objects.

SourceId__c

text (100)

The object ID of the source object, for payments arising from Payrix Payment Request objects; otherwise the transaction reference.

InvoiceNumber__c

text (20)

The source document reference that is shown to the payer as the invoice number; e.g. “INV-001”. Blank for payments not arising from Payrix Payment Request objects.

RejectionCode__c

text (50)

The rejection code; not provided unless the value of “EventType__c” is “Rejected”.

RejectionDescription__c

text(255)

The rejection description; not provided unless the value of “EventType__c” is “Rejected”.

CurrencyCode__c

text (3)

The currency code for the amount paid, fees and charges, as per standard Salesforce currency codes.

AmountPaid__c

number (16,2)

The total amount paid for the invoice. This may differ from the amount due because of surcharges or, for some payment methods, the payer specifying an alternative amount.

SurchargeAmount__c

number (16,2)

The total amount of any surcharges paid by the payer for the invoice.

FeeAmount__c

number (16,2)

The total amount of any fees that will be charged to the business the receives the payment for the invoice.

PaymentMethodCode__c

text (20)

The payment method code.

PaymentMethodName__c

text (80)

The name of the payment method used to pay the invoice; e.g. “Bank Account Debit”.

MaskedAccountNumber__c

text (40)

The masked credit card, bank account or other account number used to pay the invoice; e.g. “444433xxxxxx1111”.

SettlementId__c

lookup

The object ID for the settlement event that contains the payment for the invoice.

TransactionReference__c

text (100)

The internal Payrix transaction reference, to allow reconciliation with non-Payrix services.

TransactionTypeCode__c

text (20)

The transaction type code.

TransactionTypeName__c

text (80)

The name of the transaction type; e.g. “Realtime Payment - Website”.

ipayments__Customer_Description__c

text (500)

The transaction description.


Settlement Transactions

Payrix Settlement Event

A staging object used to signal settlement events.

  • API Name: Payrix_SettlementEvent__c

  • All money settled to client's account from Payrix.

  • This is the amount that will appear on a Bank Statement or Feed that can be automatically reconciled against Invoices.

API Name

Type

Description

EventDateTime__c

datetime

The date and time of the settlement event.

EventType__c

Picklist

“Settled” when settlement has occurred.

CurrencyCode__c

text (3)

The currency code for the amount settled, as per standard Salesforce currency codes.

AmountSettled__c

number (16,2)

The total amount settled to the business that receives the payments for invoices.

SettlementReference__c

text (100)

The internal Payrix settlement reference, to allow reconciliation with non-Payrix services.

ipayments__Customer_Description__c

text (500)

The transaction description.


Troubleshoot Payrix to Salesforce authorisation

  1. Ensure latest Salesforce Payments Package is installed - Production Salesforce Payments Package

  2. Install

    1. Recommendation is to ‘Install for All Users’.

    2. If you prefer you can ‘Install for Admin Users Only’.

Ensure that the Salesforce User authorising the Payrix Sync is a Salesforce System Administrator or has Salesforce System Administrator privileges.

  1. If the issue persists and you are still unable to authorise the Salesforce organisation to the Payrix account, as Salesforce has strict firewalls and security, it may be a case of requiring your Salesforce IP and domain to be whitelisted. Speak to our Integrations team to confirm - customerintegration@payrix.com.au.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.