Pay by Link API
You can now generate Pay by Links by using an API, which stands for Application Programming Interface. An API is a set of rules and protocols that allow two separate applications to talk to one another.
To work with the allpay API you will need to ask your development team to pass through the appropriate information indicated in the What should I give? box, below. You’ll notice that you will need to pass an Apim subscription key. To find this Navigate to the Pay by Link API page on the Payments Hub and at the top left you’ll find the Apim subscription key
For all requests you’ll also need to generate a ‘Subscription Key’. To generate a subscription key, simply navigate to Pay by Link API on the Payments Hub, enter a name into the Key Name box and press the Generate Key button.
Requests
There are 6 requests that Pay by Link API will respond to:
API Call | What should I give? | What will I get? |
/CreateLinks |
· Generated Subscription key · OrganisationID · OrganisationPersonID · Payment reference number OR Client reference · Customer First and Last Name · Client Code if using Client Reference · Should this be a validated link? (Will the system check if this account exists already?) · Amount · Who the link is created by (in audit) |
The system will return an URL linking to the Payments Page. Send this link to your customer using SendLinks or another method of your choice |
/GetActivePaymentUrls | · Generated Subscription Key · OrganisationID |
The system will return you a list of active links, this includes any link that is sent, opened, or downloaded. The status field will return to a number which corresponds to the link status 151 – Link Sent 152 – Link Opened 153 – Link Paid 154 – Link Downloaded 155 – Link Partially Paid |
/GetPendingPaymentUrlsByOrg | · Generated Subscription Key · Organisation PersonId |
The system will return you a list of links that are currently in your Pay By Link pending. |
/UpdatePendingPaymentURL | · Generated Subscription Key · Payment URL ID · Any parameter you want to modify |
This call will allow you to modify a currently existing pending link |
/DeletePaymentURL | · Generated Subscription Key · Payment URL ID |
This call will allow you to delete a currently pending Pay by Link request |
/SendLinks | · Organisation Name · Customer Email Address (if sending by email) · Customer Mobile Number (if sending my mobile) · Payment Link · Sending Method (1 for email, 2 for text, 3 for both) |
This call will send a Customer a link to either their email address, mobile number or both. |
Definitions
•Generated Subscription Key – You need to use the Pay by Link API in the Payments Hub API Hub to generate one of these, please refer to the start of this guide
• OrganisationID - This is how the Payments Hub tells what organisation you are, you can find this on the API Hub
•OrganisationPersonID – This is how the Payments Hub tells who you are, in what organisation, you can find this on the API Hub
•Payment Reference Number – This is the 19-digit number used to identify customers in the allpay system, these can be generated using Customer Account Manager
•Client Reference – this is a 16 digit alphanumeric reference for your own system to recognise your customers, this is normally a form of account number
•Amount – How much should the link request for the Customer to pay?
•Payment URL ID – This is a unique ID to identify each link, you can get this by using GetActivePaymentUrls or GetPendingPaymentUrlsByOrg