If you have a PayPal Business or Premier account, you can generate a button in HTML that you can embed into your website for accepting payments. The button contains the amount to be paid and a unique reference to your PayPal account.

Our document layouts are written in HTML, meaning you can edit our layouts to include the PayPal button in our invoices to take payments.

Keep in mind that this isn’t an integration with PayPal. Transactions won’t automatically be created in Current RMS for payments and invoices in Current RMS won’t appear in your PayPal account. We’re simply using HTML to pass the amount due on an invoice to your PayPal account’s payment page.

This is an advanced tutorial for folk who like to dig into the HTML & CSS that makes up our documents. If that’s not you, don’t worry! We offer a free document layout modification service so we’re happy to do this for you.

Create a Pay Now button with PayPal

First, head to PayPal’s website and create a Pay Now button. This guide on PayPal’s website should help: Create a Buy Now or Pay Now button

You’ll need a PayPal Business or Premier account for this.

Extract the button_id value 

The code that PayPal generates for you doesn’t work on PDFs, but we can modify it to build something that does. Once you’ve created your button, extract the button_id  value from it. We’ll use this later.

Edit your invoice layout

Clone our default invoice layout or edit one that you’ve worked on and add the following block of code:

<div class="section clearfix">
  <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BUTTON_ID_HERE&amount={{ invoice.charge_including_tax_total }}&item_name={{ invoice.name }}" method="POST">
    <img src="https://www.paypalobjects.com/en_GB/i/btn/btn_paynow_LG.gif">
  </a>
</div>

Replace BUTTON_ID_HERE with the button_id that you extracted earlier.

This will give you a Pay Now button that shows the goods description as the invoice name and amount to the invoice charge total including tax.

As this is advanced code, our document layout previewer might not preview the button. Save your document and test on an issued invoice.

Customize the block

To change the text passed as the goods description, change {{ invoice.name }}  to another invoice object. For example, you might like {{ invoice.number }}  instead.

To change the amount passed, change {{ invoice.charge_including_tax_total }} to another invoice object. For example, if you’ve logged payments on the invoice using transactions and you’d like to invoice for the outstanding amount, use {{ invoice.balance }}.

The <div>  that contains the button is optional, so style this using CSS as you wish.

Need help?

Remember we offer a free document layout modification service, so we’re happy to help with document changes. Get in touch with us using the help bubble at the bottom-right if you need a hand  ↘️

Did this answer your question?