Web
...
Web Integrations
Web SDK

Payment Request

Creating a Payment / PreAuth Request with the Web SDK

When authorising /payments or /preauths it is recommended to use paymentSession.

Prerequisites

Make sure you are using Web SDK Version 0.0.34 (or higher).

From the Web SDK integration guide, you have completed the following:



Step One: Making a Transaction

To make a transaction:

  1. Define the paymentConfiguration object for the payment or preAuth:

Ensure the details used when creating the paymentSession match the values set in the following configuration:

Payment Configuration Object Example



Web SDK Payment Parameter Descriptions

See below for more details on the parameters that create the paymentConfiguration object:



2. In a function, add the invokePaymentcall. This will invoke a payment using the paymentSession and paymentConfiguration

Invoke Payment Example


To invoke a preAuth, change the above code to .invokePreauth

3. To call the function (in step 2 above) to invoke the payment or preAuth, add the onclickattribute to the payment button <div>: <button id="submit-payment-button" onclick="handlePaymentButtonClick()"> Pay Now </button>



Step Two: Handle the Response