Creating a custom payment page link

AffiniPay creates a payment page for each of a merchant’s processing accounts. Using the API, you can retrieve the URL for a payment page and display a link to the pre-populated payment page from within your application. Use the following steps:

  1. Retrieve the payment page.
  2. Define pre-filled fields.
  3. Create the custom payment page link.

1: Retrieve the payment page

Retrieve the link to the payment page. From within your application, the merchant must be able to choose which payment page they would like to access.

Example request: Retrieving a list of payment pages for the merchant
curl -X GET \ -H 'Authorization:Bearer<oauth-access-token>'

The API returns a list of all payment pages for the merchant and their corresponding URLs, such as:

2: Define pre-filled fields

You can pre-populate fields on the payment page by adding query parameters to the payment page URL. Although it is not required, populating amount and reference (for marrying the payment back to your system) is recommended.

Here is a list of fields:

ParameterURL Syntax
Invoice (note capital I)Invoice=3845

In addition, you can include the parameter readOnlyFields with a comma-separated list of other parameters in the payment page URL. This marks fields on the form uneditable as to not disrupt important information such as amount or reference.

To create a custom payment page link, use the following formula:


For example: 208442&amount=1000&readOnlyFields=reference,amount

This link opens the MyBusiness merchant’s branded payment page for their MyAccount processing account. On the page, the reference fields is pre-populated with the text “Invoice 208442” and the amount field is pre-populated with the value “$10”. Neither of these fields can be edited by the user.