Developer Resource Center

Hosted Pay Page


The EdgePay Hosted Pay Page is a service for websites that provides a payment form to your customer for inputting credit or eCheck payment information that will post directly to our server and return the non-sensitive results back to you via a redirect message and a response URL that you define.

By using the EdgePay Hosted Pay Page service, your company will never store, process, or transmit sensitive payment information (credit card or checking account) on your server. This both reduces risks associated with security breaches and reduces the requirements for PCI compliance.

Below is a data/process flow model diagram.

Prior to using this process, you must use our Hosted Pay Page function in our Processing Center to construct your custom Hosted Pay Page as well as creating your Pay Button and defining your Post Back URL on your server to receive the payment response. The diagram also includes a web hook confirmation process that is a future deliverable. 

Setting up the Hosted Pay Page

After logging into the EdgePay Processing Center, you will navigate to the settings tab to access the Hosted Payment Page. By selecting "Add Details" you will be able to design your page. Once saved, use the "Copy Button Code" to copy the code used to call the Hosted Payment Page. Contact Developers Support for access to these resources.

Payment Button Integration & One-Time Authentication Code

In this step you will integrate two functions for requesting payments. First, at checkout you will insert code to request a "One-Time Authentication Code" (OTAC) using your EdgePay server credentials. The request/response is a RESTful message using JSON format. This request will include your merchant key from your server to authenticate the request. This will be provided by Developers Support. The response will include the OTAC that will be inserted into the Pay Button JavaScript. The OTAC is valid for only 15 minutes. Below is the request/response for the OTAC.

POST/otac HTTP 1.1
HOST: (for sandbox testing. for production use HOST:
content-type: application/json
merchantKey: (insert your production key)
externalReferenceID: 1234567890987654 (your unique ID for every transaction)
transactionDate: 2018-05-23T02:00:00 (use UTC time zone)
"merchantID":"1234567890987654", (IDs assigned by GET)

The service will respond with:

Date->Mon, 11 Jun 2018 18:43:10 GMT

If the EdgePay service is unable to process your request, you will see the following response example.

"responseMessage":"Authentication failed, please use valid credentials",

Other results may include:

"responseMessage":"The value of '%s' or element '%s' is not valid",

Under the above condition we will include both the variable and the element.

"responseMessage":"System error please try again",

Under the above condition, you should request the OTAC again. If multiple failures, call us for help!

Once you have your OTAC, take the "Pay" button code from the Hosted Payment Page (this was created as part of setting up your custom Hosted Payment Page in our Processing Center).

When you serve your customer the "Pay" button, update the JavaScript variables:

edgepayAmount = "The total amount you wish to charge"
edgepayOtac = "The OTAC retrieved from the previous step"

When your customer clicks the "Pay" button, the JavaScript will pass your variables to our server and return your custom Hosted Payment Page to the customer to input the payment information and submit for payment.

The transaction will be submitted to EdgePay for payment processing. Included in the Hosted Payment Page setup is the redirect URL our system will use to redirect the response to your server.

Once we process the payment, we will generate an HTTP 300 redirect message and reply to the customer's browser that will use the response and forward the message via HTTP 200 onto your GET server, query the response URL string, and generate the result page for your customer. Below is an example of the response you will receive back from the HTTP 300 redirect to your server.

Request URL:×tamp=2018-09-28T20:16:34
Request Method: GET
Status Code: 200 OK
Content Length: Variable
Content Type: text/html;charset=utf-8

We recommend using the "result" variable to determine the next step and response to your customer. More information on generating responses can be found here.