This guide is designed to explain Payrix/Salesforce integration and features this Payment Solution offers.
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.
To install the correct package and sync with your Salesforce organisation, please use the correct URL below:
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:
Login to Payrix Portal
Select ‘Salesforce’ in the top menu bar.
Select the correct radio button, ‘Production’ or ‘Sandbox’.
Login via Salesforce ensuring the correct domain is entered and authorisation will be complete.
You can find the correct domain by going into your Salesforce Setup Settings:
Login to Salesforce
Click on the Cogs button on the top right and select ‘Setup’.
In the search field on the left under ‘Setup’, enter ‘My Domain’.
From ‘Current My Domain URL’, select the section before ‘.my.salesforce.com’ and that is the correct domain to use.
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 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
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.
The type of source object for the invoice; eg. “BillingDocument” or “Invoice”.
The object ID of the source object.
The source document reference that is shown to the payer as the invoice number; e.g. “INV-001”.
“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.
The date the invoice was issued on.
The date payment for the invoice is due.
The text shown to the payer to describe the purpose/content of the invoice.
The currency code for the amount due to be paid, as per standard Salesforce currency codes.
The amount due to be paid.
The type of payer object for the invoice; eg. “Account” or “Contact”.
The object ID of the payer object.
The payer’s surname or business name; e.g. for “Jane A. Citizen” use “Citizen”.
The payer’s given name; e.g. for “Jane A. Citizen” use “Jane”.
The payer’s email address.
The payer’s preferred phone number for voice communications.
The payer’s mobile phone number for SMS communications.
The street details of the payer’s billing address.
The city, suburb or town component of the payer’s billing address.
The state or territory component of the payer’s billing address.
The postal or ZIP code component of the payer’s billing address.
The country component of the payer’s billing address.
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.
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.
The date and time of the payment event.
“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.
The type of source object for the invoice; e.g. “BillingDocument” or “Invoice”. Blank for payments not arising from Payrix Payment Request objects.
The object ID of the source object, for payments arising from Payrix Payment Request objects; otherwise the transaction reference.
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.
The rejection code; not provided unless the value of “EventType__c” is “Rejected”.
The rejection description; not provided unless the value of “EventType__c” is “Rejected”.
The currency code for the amount paid, fees and charges, as per standard Salesforce currency codes.
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.
The total amount of any surcharges paid by the payer for the invoice.
The total amount of any fees that will be charged to the business the receives the payment for the invoice.
The payment method code.
The name of the payment method used to pay the invoice; e.g. “Bank Account Debit”.
The masked credit card, bank account or other account number used to pay the invoice; e.g. “444433xxxxxx1111”.
The object ID for the settlement event that contains the payment for the invoice.
The internal Payrix transaction reference, to allow reconciliation with non-Payrix services.
The transaction type code.
The name of the transaction type; e.g. “Realtime Payment - Website”.
The transaction description.
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.
The date and time of the settlement event.
“Settled” when settlement has occurred.
The currency code for the amount settled, as per standard Salesforce currency codes.
The total amount settled to the business that receives the payments for invoices.
The internal Payrix settlement reference, to allow reconciliation with non-Payrix services.
The transaction description.