Hosted Payment Page

Secure online checkout with zero PCI hassle. Let PayGate handle the heavy lifting. With our Hosted Payment Page, you redirect customers to a secure payment screen — no card data touches your system, and there's minimal setup. Ideal for fast go-live and reduced compliance scope.

Create a Hosted Payment Page

Enable secure customer checkout via PayGate’s hosted interface — with just one SOAP request.

The screenshot features the PayGate hosted payment page with a list of quick and easy payment options displayed for fast checkouts.

PayGate Hosted Payment Page


What This Is

This method allows developers to programmatically create a payment session and then redirect customers to PayGate’s secure Hosted Payment Page. It’s ideal for merchants who don’t want to handle card data directly.

Once the request is successful, PayGate responds with a Redirect URL and parameters that you can use to auto-redirect the customer to the secure checkout page.

Use the WebPayment method to create the Hosted Payment Page from the response data.


Endpoint

POST https://secure.paygate.co.za/payhost/process.trans

Content-Type: text/xml


SOAP Request Example

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <SinglePaymentRequest xmlns="http://www.paygate.co.za/PayHOST">
      <WebPaymentRequest>
        <!-- Account Details -->
        <Account>
          <PayGateId>10011072130</PayGateId>
          <Password>test</Password>
        </Account>
        
        <!-- Customer Details -->
        <Customer>
          <FirstName>PayGate</FirstName>
          <LastName>Test</LastName>
          <Email>[email protected]</Email>
          <Address>
            <Country>ZAF</Country>
          </Address>
        </Customer>

        <!-- Redirect URLs -->
        <Redirect>
          <NotifyUrl>https://webhook.site</NotifyUrl>
          <ReturnUrl>https://merchant-redirect-url.co.za</ReturnUrl>
        </Redirect>

        <!-- Order Details -->
        <Order>
          <MerchantOrderId>utiliapp_41250008624_20210120104336</MerchantOrderId>
          <Currency>ZAR</Currency>
          <Amount>100</Amount>
          <BillingDetails>
            <Customer>
              <FirstName>PayGate</FirstName>
              <LastName>Test</LastName>
              <Email>[email protected]</Email>
              <Address>
                <Country>ZAF</Country>
              </Address>
            </Customer>
            <Address>
              <Country>ZAF</Country>
            </Address>
          </BillingDetails>
          <Locale>en</Locale>
        </Order>
      </WebPaymentRequest>
    </SinglePaymentRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns2:SinglePaymentResponse xmlns:ns2="http://www.paygate.co.za/PayHOST">
      <ns2:WebPaymentResponse>
        <ns2:Status>
          <ns2:StatusName>WebRedirectRequired</ns2:StatusName>
          <ns2:StatusDetail>Web Redirect Required To Complete Transaction</ns2:StatusDetail>
        </ns2:Status>
        <ns2:Redirect>
          <ns2:RedirectUrl>https://secure.paygate.co.za/PayHost/process.trans</ns2:RedirectUrl>
          <ns2:UrlParams>
            <ns2:key>PAYGATE_ID</ns2:key>
            <ns2:value>10011072130</ns2:value>
          </ns2:UrlParams>
          <ns2:UrlParams>
            <ns2:key>PAY_REQUEST_ID</ns2:key>
            <ns2:value>F6601047-EA36-4E86-89E9-52345A8CB201</ns2:value>
          </ns2:UrlParams>
          <ns2:UrlParams>
            <ns2:key>REFERENCE</ns2:key>
            <ns2:value>utiliapp_41250008624_20210120104336</ns2:value>
          </ns2:UrlParams>
          <ns2:UrlParams>
            <ns2:key>CHECKSUM</ns2:key>
            <ns2:value>2d58fcbde138d7e6dbea9a2fcb54724e</ns2:value>
          </ns2:UrlParams>
        </ns2:Redirect>
      </ns2:WebPaymentResponse>
    </ns2:SinglePaymentResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Redirect the Customer

You must now POST the returned parameters to the redirect URL from the response. Here's how:

<form id="payhostRedirectForm" action="https://secure.paygate.co.za/PayHost/process.trans" method="POST">
  <input type="hidden" name="PAYGATE_ID" value="10011072130">
  <input type="hidden" name="PAY_REQUEST_ID" value="F6601047-EA36-4E86-89E9-52345A8CB201">
  <input type="hidden" name="REFERENCE" value="utiliapp_41250008624_20210120104336">
  <input type="hidden" name="CHECKSUM" value="2d58fcbde138d7e6dbea9a2fcb54724e">
  <button type="submit">Pay Now</button>
</form>

<script>
  // Auto-submit the form after a short delay
  setTimeout(() => {
    document.getElementById('payhostRedirectForm').submit();
  }, 2000);
</script>

Do not test this from Postman — this redirect flow requires a browser-based form submission.


Notes

  • The checksum is calculated using PayGate's logic (consult your integration guide or account manager if you'd like to generate it manually).

  • A valid Merchant Order ID must be provided for each transaction.

  • The Return URL is where your customer is sent after the transaction.

  • The Notify URL receives server-to-server payment status notifications.


Test Credentials

FieldType
PayGate ID10011072130
Passwordtest
CurrencyZAR
CountryZAF
👍

Test the WebPayment Request directly in Postman; it's easy to do here.