Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

How to Setup BPAY Customer Reference Numbers

1. Customer Reference Number overview

A BPAY Customer Reference Number (CRN) is a number assigned by your organisation to identify your customer or service.

A Customer Reference Number can be setup the following areas:

  • Contact record:. Used by that individual payer to make payments.
  • Payment Txn record: Assigned on checkout when a payer nominates to pay via BPAY. Or, this can be used when invoicing/charging for a service that can vary for each Contact.
  • On any custom object: The CRN number can be assigned here and later placed onto the Payment Txn record by using workflow or process builder.

A CRN can be generated in Salesforce when a record is saved, by using Process Builder to generate and assign or by using an external tool to generate an load.

 

2. Generating CRNs Options

2.1. Externally generate CRNs

Biller Codes or Customer Reference Numbers (CRN) can be generated by programs downloaded from your bank. For more information go to the BPAY help page.

After generating, use data loader or similar to update the Customer Reference Number field on the Contact or Payment Txn record.

2.2. Generating a CRN when saving a record

For this option, you will need a License key to enter against the merchant facility. Contact support@payments2us.com for a BPAY CRN license key.

 

If using a Flow/Default BPay Rule, then mass data updates of contacts or loading of Payment Txns can invoke BPay Generation and you may incur charges by BPAY. As a guideline, please see BPAY API fees.

 

On the Contact or Payment Txn record enter or use Workflow fieldupdates/Process Builder to assign:

  1. A membership number. This is a number that does not have the CRN check digit on it. NOTE, the Member Number must be entirely numeric.
  2. In field "BPay CRN Rule", select "Generate MOD10V01". This will be updated to "MOD10V01" on save. It is the algorithm used to generate the CRN from the membership no.

On Save, the Customer Reference Number (3) is generated and assigned to the record.

Note: this might take a second or so to assign and a refresh of your page layout may be required to see the generated CRN.

If the Customer Reference No. does not get generated on save, then check:

  • Check you have a BPAY license key on a primary and active Merchant Facility Record
  • You have a Membership No. entered into the Payments2Us Membership No. field
  • The Membership No. is NUMBERIC only. I.e. C-0001929 is NOT numeric only, but 0001929 is Ok.
  • Check the Payments2Us Error Logs
  • It may take a few moments, so give it a minute and control+refresh your browser
 

2.3. BPay Payment Method on Checkout

When a Payer/Donor selects BPay as the method of payment on the Checkout form, a Customer Reference Number (CRN) is generated and saved against the Payment Txn record created.

The BPay CRN Rule used for generating the CRN are setup on the related Merchant Facility record in the "BPay CRN Rule" field.

See procedure How to use BPAY payments with the Checkout for more information on this business process flow.

The other CRN generation methods can NOT be used for this business process flow.

 

2.4. Using Process Builder to Generate and Assign CRNs

For this option, you will need a License key to enter against the merchant facility. Contact support@payments2us.com for a BPAY CRN license key.

For assistance on this option over and above what is shown in this user guide will require Payments2Us Premium Support.

 

The BPAY CRN Generation may cause fees from BPAY when generation of large numbers. See BPAY API fees.

 

The Process Builder option provides the most flexibility for generating a CRN from any field and assigning the generated CRN number to any field on any object.

The example below generates and assigns a CRN to a Payment Txn record if it is missing a Customer Reference Number.

Create a New Process Builder (setup - Search "Process Builder", Click "New" button"

  • Enter Name, for example "BPAY CRN Generation"
  • Process Starts When "A record changes".
  • Press "SAVE"

Add Object

  • Select Object "Payment Txn"
  • Select "when a record is created or edited"
  • Press "SAVE"

Add Criteria

  • Name "When missing CRN"
  • Criteria "Customer Reference No." Is null Equals True

2.4.1. Select Action Apex Class

Select Action Apex Class.

  • Enter in a name. For example "Generate BPAY CRN".
  • For the Apex Class name, start typing "Payments2Us" and then select "Payments2Us Generate BPay CRNs" (1).
  • For the next step of assigning Apex Variables, click the "+ Add Row" (2). (see more instructions following the screenshot)

2.4.2. Assign Apex Variables

Click the "+ Add Row" to enter apex variables.

  1. SObject API Name - [STRING] the Object's API name, e.g. "AAkPay__Payment_Txn__c"
  2. SObject Record Id - [FIELD REFERENCE] the reference to the record id of the Object being updated, e.g. [AAkPay__Payment_Txn__c.id]
  3. BPAY CRN Rule Field API Name - [STRING] the field's API Name on the SObject that contains the check digit rule value. Values currently are "MOD10V01Generate" or "MOD10V01". An example field name is "AAkPay__BPAY_CRN_Rule__c"
  4. Customer No Field API Name - [STRING] the field's API Name on the SObject that contains the customer number without the BPAY CRN check digit, e.g. AAkPay__Membership_Id__c
  5. Customer Reference Field API Name - [STRING] the field's API Name on the SObject that will be assigned the newly generated CRN No. E.g. AAKPay__Biller_Code__c.

3. How is the BPay CRN Rule used?

The BPay CRN Rule is a coded picklist value.

For an Example Rule "Generate Biller Code + MOD10V01 (13)" uses various parts of the rule name to determine the value generated.

  • The "Generate " component tells the record to create a fresh CRN. This is normally set to create a new CRN or if a Customer Number that is the base of the CRN has changed.
  • "Biller Code + " means to assign the organisations Biller Code that is stored on the Merchant Facility as a prefix to the CRN Generated. For example, if you organisation Biller Code is "12345" and you had a customer Number of "100075", then the combined value of "1234510005" is used to generate the resulting CRN.
  • "MOD10V01" means Modular 10, version 1. This is the formula that is used to calculate the check digit that is added to the CRN.
  • " (13)" indicates to keep the total length of the CR no more than this number of characters in length. If the customer number supplied would mean this length would be exceeded then the right (nn) characters of the customer number are used.

4. BPAY CRN Frequently asked questions

4.1. What is the length of the CRN

The CRN is generally one character longer than the number you start from. The customer number that you start from is configurable as per the above options.

Generally speaking though, many organisations will use a number based off the Payment Txn or Membership number assigned. This is 10 digits, plus the 1 check digit - I.e. 11 characters long.

4.2. For Process Builder option, do we need to populate the fields “BPAY API Key” and “BPAY API Secret”

See How to setup BPAY API Credentials for how to obtain your BPAY API Key and BPAY API Secret.

4.3. For Process Builder option, do I set a default value for the field “BPAY CRN Rule” or should I leave it blank

If you leave this blank, the default of MOD10V01 will be used.

Updated at July 27th, 2024

Was this article helpful?