Skip to content

Hosted card fields for a checkout that carries your brand

The payment page is yours, the card inputs are ours. Shoppers never leave your page, yet their card details travel straight to Payweb: number, expiry and CVV inputs drop into your current checkout, and your server receives a token rather than the card number.

How it works

  1. The shopper types in the card

    Number, expiry and CVV are secure inputs placed right on your checkout. Nobody is sent off to a separate payment page.

  2. Card data travels straight to Payweb

    The secure inputs send what the shopper typed from the browser directly to Payweb. Number, expiry and CVV never touch your page code or your server.

  3. Your server pays with a token

    Payweb swaps the card data for a hostedFieldsToken, your page hands it to your backend, and the backend starts the payment through the Payweb API using the token in place of card parameters. Getting the token does not, by itself, start a transaction.

Why use hosted fields

  • Your page, your design

    The inputs live inside your checkout rather than sending the shopper elsewhere. Layout, labels, other fields, checkout logic and the Pay button all stay yours.

  • Card data never reaches you

    Details go directly to Payweb through the secure inputs. Your page and backend handle a token, not the number, expiry or CVV.

  • The payment API you know

    Only card collection changes; how your server starts a transaction stays the same. The usual server-to-server call remains, with hostedFieldsToken where card parameters used to be.

Fields that blend into your interface

Everything around the inputs is under your control: you pick where they go and how they sit with the rest of the form.

Field containers take your own CSS, while the supported styles for what is inside the secure inputs are set through the hosted fields SDK.

Card entry looks like a natural part of your checkout, yet your page has no access to the card values.

Card data kept in isolation

Each sensitive input, number, expiry and CVV, loads in a frame of its own served by Payweb from a different origin.

Because the contents belong to the Payweb origin, neither your page DOM nor any third-party script on it can read the card values.

The hostedFieldsToken you get back is short-lived and works only once. There is no way to rebuild the card details from it.

Request-signing keys remain on your server. The browser only gets an ephemeralTicket, a one-time pass for producing the token.

Adding it to the checkout you already have

The Payweb JavaScript SDK runs in the browser, and the standard Payweb payment API runs on your server.

  1. Server: get an ephemeralTicket

    Your backend asks for a ticket for the endpoint the payment will use. It is good for 15 minutes and is spent on a single tokenisation; signing keys never leave the server.

  2. Browser: mount the fields

    Load the hosted fields SDK and point it at containers for number, expiry and CVV. It builds a separate Payweb frame for each and tells you when they are ready.

  3. Get the token

    Payweb hands back a hostedFieldsToken that is short-lived, single-use and valid for 5 minutes.

  4. Server: start the payment

    The page passes the token to your backend, which puts hostedFieldsToken in place of card parameters in a supported Payweb payment call. That call, not tokenisation, starts the transaction, and the status reaches you through the usual callback or status request.

Hosted fields and 3‑D Secure

The fields work in Payweb payment flows that need 3‑D Secure. They collect card data and issue the token, but they do not take over authentication or status handling.

  1. Hosted fields

    Card data is captured and swapped for a token right on your checkout.

  2. 3‑D Secure, if the bank asks for it

    The shopper completes the check with their own bank.

  3. Back to your page

    Once verified, the shopper lands back on your checkout.

Who hosted fields suit

  • Online stores and product teams

    Payment stays inside your product and brand, without a hop to a separate card page.

  • Developers

    Card capture runs through the hosted fields SDK, while the server keeps using the same payment API.

  • Security and compliance

    Card number, expiry and CVV stay out of page code and backend; payment runs on a token. Payweb is a technology platform, not a bank or a payment facilitator.

Hosted fields questions

Keep your checkout and let Payweb handle the card

Drop secure card fields into your current payment page and keep processing through the Payweb API.