back to knowledgebase

How to create a "Pay Now" link in OpenCRM to request payment of OpenCRM invoices

Updated: 12 April 2024 12:54:34 OpenCRM::Invoice OpenCRM::Settings::Integration

What is the OpenCRM Pay Now Feature?

It is possible to take payment for OpenCRM Invoices via a Pay Now link sent from OpenCRM. 

The customer clicks the Pay Now link and is taken to a confirmation page on the customer portal.  From here they are redirected to a secure payment page where they can make payment using the payment options you specify in your payment gateway.

Currently this is available for Stripe payments, but could (and will) be extended to support other payment gateways in the future.

When payment is made, the outstanding amount on the OpenCRM invoice is updated, and the payment details are recorded on the invoice. This can be recorded as a payment record in OpenCRM, or a Note. Details are also logged to a field on the invoice itself, and the invoice audit log. 

Optionally, the feature  can be configured to allow the payee to change/input the payment amount, for the confirmation page to be bypassed (taking the user straight to the payment page)

How do I create a Pay Now link?

The pay now link is generated when you send an email from the Invoice record in OpenCRM. It is recommended that you make an email template which contains the Pay Now link in it. 

The pay now link is built as follows:

The base url and required parameter for the invoiceid: 
https://YOURSYSTEMNAME.opencrm.co.uk/Portal/index.php?option=ocrm_pay_now&aW52b2ljZWlk=$INVOICE_ENCODED_ID

Add a required parameter for the invoice id:

Optional URL parameter to bypass the confirmation page and go straight to the Stripe processing and stripe payment page
&bm9jb25m=1

Optional URL parameter to allow override of the payment amount on the pay now url so customer can pay more/less
&Y2hhbmdlYW1vdW50=1 (to allow override)
or
&Y2hhbmdlYW1vdW50=0 (to not allow override)

Optional URL parameter to specify if company or contact details should be used for customer details in the payment gateway
&dXNlbW9kdWxl=4 (contact)
or
dXNlbW9kdWxl=6 (company)

Optional URL parameter to allow override of the field from which the payment amount is taken (defaults invoice "Outstanding" field)
&Zmxk=FIELDNAME
e.g. &Zmxk=cf_123 to specify a custom field to take the amount from. 

This could be used, for example to take an initial deposit amount and then request the remaining amount at a later date using a different email/link. 

Auditing and recording of payments

If a customer successfully makes a payment, the invoice outstanding amount is reduced accordingly. 

A field on invoices "Pay Now Payments history" is updated with the payment details, and either a note or payment activity is created. 

Additionally, any errors or failures are recorded in the Invoice audit log. 

Further Configuration

There are some settings to allow configuration of some of the features mentioned here and other settings in Settings->Additional settings under "Pay Now" settings. 

Supported Payment Gateways

At the moment, only Stripe is supported as a payment gateway but this will be added to in the future. If you use a specific payment gateway which you would like to use, please contact us and we can investigate this further for you. 

Rate This Article
  • 1 star
  • 2 star
  • 3 star
  • 4 star
  • 5 star
Feedback and Comments
captcha code  


You may also be interested in: