How to add Make Payment button

The Make Payment Button is a button the can be added to Accounts, Contacts, Opportunities.

It is designed to work in conjunction with Publisher Actions making it suitable for Salesforce1 Mobile (non native mode)

Make Payment Button provides a launch pad for four existing functions.  These are:

  1. Credit Card/Checkout Form
  2. Manual Payment Form
  3. Token Charge Form
  4. Membership/Subscription Renewal

Only the available options will be shown.  If for example, there is no related Recurring Payment, then Token Charge will not be available.

Make Payment includes a number of URL parameter options to allow for some fine tuning.  Please see the Make Payment URL Options for more info.

1. Adding Make Payments Button to Accounts

Locate an Account in your organisation, click into the Account Detail, then click on the Edit Layout Link.

Alternatively, navigate to setup > Customize > Accounts > Page Layouts.  Click edit next to the layout you wish to edit.

1.1. Add Make Payment Button to layout

  1. Click on the Buttons Link
  2. Drag/Drop Make Payments Button onto your form
  3. Press Save button

2. Adding Make Payments Button to Contacts

Locate an Account in your organisation, click into the Account Detail, then click on the Edit Layout Link.

Alternatively, navigate to setup > Customize > Contacts > Page Layouts.  Click edit next to the layout you wish to edit.

2.1. Add Make Payment Button to layout

  1. Click on the Buttons Link
  2. Drag/Drop Make Payments Button onto your form
  3. Press Save button

3. Adding Make Payments Button to Opportunities

Locate an Account in your organisation, click into the Account Detail, then click on the Edit Layout Link.

Alternatively, navigate to setup > Customize > Opportunities > Page Layouts.  Click edit next to the layout you wish to edit.

3.1. Add Make Payment Button to layout

  1. Click on the Buttons Link
  2. Drag/Drop Make Payments Button onto your form
  3. Press Save button

4. Custom Make Payment or Adding to any Object

  1. Navigate to setup and section for adding a new button.  For example on Opportunities, navigate to setup > Customize > Opportunities > Buttons and Links.  
  2. Press the New Button on Link button

4.1. Add custom make payment button details

  1. Give the button a name
  2. Select button if you wish to use a button on the page
  3. Select to open in a new window (or you can use existing window with no sidebars or headers)
  4. Enter the URL of "/apex/AAkPay__MakePayment"
    You can also use Make Payment URL Parameters here, such as ?hideCheckout=true.  So the value entered would be /apex/AAkPay__ManualPayment?hideCheckout=true
    See Make Payment URL Parameters for more information.
  5. Save the form.  Don't forget to add the new button to the page layout (See the previous sections for adding make payments to the page layouts for guidance)

5. Make Payment URL Parameters

The Make Payment URL Parameters provide options that enable you to tailor how the button operations.

There are entered as part of the URL when creating a custom make payment button.

Options are:

  • oppid=xxxx : Links the make payment to an opportunity id (xxx = an Opportunity Record Id)
  • aid=xxx : Links the make payment to a Account id (xxx = an Account Record Id)
  • cid=xxx: Links the make payment to a Contact id (xxx = an Contact Record Id)
  • hideCheckout=true: Hides any checkout (Credit Card) options from being displayed
  • hideManual=true : Hides the manual payment options from being displayed
  • hideRecurring=true : Hides the recurring payment options from being displayed
  • hideRenewal=true: Hides any subscription/membership options from being displayed
  • paymentFor=xxxx : passes in the paymentFor reason.  Especially useful when doing a Token Charge from an opportunity
  • Amount=nnn : passes in the amount for the payment