Skip to main content

Hosted payments

Hosted payments let you take card payments without your systems ever handling card data. The payment form runs on secure, gateway-hosted infrastructure, which can greatly reduce your PCI scope.

A hosted payment page is the best fit if you want a checkout that collects payment details without a long integration project. You can present it in several ways:

OptionHow it looksEffort
RedirectThe shopper goes to a separate, hosted payment pageLow
LightboxThe payment form opens in a pop-up over your siteLow
Payment linksA link in an email, invoice, or button opens the payment pageLow
Hosted fieldsSecure card fields sit inside your own checkout formMedium

Hosted pages

With a hosted payment page, the gateway manages both the payment form and the PCI requirements that come with it. You choose how it's displayed, and you can brand it from the merchant portal. For full design control, use hosted fields instead.

Redirect

Use redirect when you want a low-code option that doesn't require PCI Level 1 compliance. Your server creates a payment session, and the shopper is sent to the hosted payment page to pay. When they finish, they return to the URL you set.

Also low-code and without PCI Level 1 requirements, the lightbox opens the payment form in a pop-up on top of your site, so the shopper never leaves your page.

Payment links are a redirect with extra options. Send them in emails, invoices, embeddable payment buttons, or anywhere you can share a link. See Payment links.

Hosted fields

Hosted fields are a medium-code option that still keeps card data off your servers. Each card field is a secure frame served by the gateway, placed and styled inside your own checkout form. You get a fully custom look while the gateway handles the sensitive data.

  • Embed secure card fields without building your own frame logic
  • Style the fields to match your checkout
  • Get real-time validation and transaction events through callbacks

Customize the payment page

You can change the logo, company name, data fields, colors, fonts, and button text of the hosted payment page.

  1. 1Sign in to the merchant portal.
  2. 2Go to Settings, then the Hosted payments page section.
  3. 3Turn the logo on or off. Upload your logo under Account first to enable this option.
  4. 4Turn your company name on or off.
  5. 5Set the colors, font, and text of the payment buttons, then save.

JavaScript libraries

The lightbox and hosted fields each come with a small JavaScript library. You add a script tag to your checkout page, then create the component with the payment session ID your server created.

Setting or callbackWhat it does
sessionIdThe payment session your server created through the API
messageHandlerHandles events from the component, such as approval, decline, or cancel
onReadyRuns when the component has fully loaded
fields and stylesHosted fields only: which fields to show, where, and how they look
show / hideOpen or close the component on demand
Typical flow
// 1. Server: create a payment session with the API, return its ID to the browser
// 2. Browser: load the library script for your environment (sandbox or production)
// 3. Browser: create the lightbox or hosted fields with the session ID and callbacks
// 4. Browser: react to events in messageHandler (approved, declined, cancelled)
// 5. Server: confirm the final status before you fulfil the order

Note

Script addresses for the sandbox and production, plus full function reference, come with your sandbox access. Create a developer account to get them.

Gateway services in this section are provided through ONKORE's processing partner, Elavon. Developer accounts, sandbox and production credentials, the developer portal, and the merchant portal are provided by Elavon, so you'll see the Elavon name in those emails, portals, and API addresses. ONKORE remains your point of contact.