Integration

Hosted Session

What Is Hosted Session?

Hosted Session is a payment integration model that lets you collect payment information via fields that are securely hosted by Mastercard while giving you control over the layout, styling, and user experience on the payment page. It’s a hybrid between fully hosted checkout and direct API integration — combining the secure data handling of hosted pages with customizable front‑end design.

How Hosted Session Works

With a hosted session, your system first requests a secure session token from the Mastercard Gateway API. This session establishes a temporary container for sensitive payment fields. Your front‑end uses the session token to embed hosted payment fields into your page. The card data is handled by Mastercard’s secure infrastructure, while your application controls the rest of the page’s design and flow.

Key Benefits

Custom Branding

Design your checkout UI to match your site’s look and feel while relying on secure hosted fields.

Lower PCI Burden

Because Mastercard hosts the sensitive card entry fields, your PCI DSS compliance requirements can be significantly reduced.

Secure Data Handling

Cardholder data is processed by Mastercard’s secure servers, not by your application servers.

Flexible Integration

Suitable for custom payment flows that combine secure hosted elements with your own checkout design.

When to Use Hosted Session

Choose Hosted Session when you want more design and UX control than a fully hosted checkout, but still want Mastercard to securely handle payment data in a way that reduces compliance risk. It’s ideal for merchants who need a branded, integrated experience without handling raw card data on their servers.