---
title: "Hosted Page | Customer Mode"
description: "How to use KOMOJU Hosted Page in customer mode to collect and tokenize payment details for future charges — covering session creation, customer.updated webhooks, and making payments with a stored customer ID."
url: "https://docs.priv.staging.komoju-dev.tools/en/docs/integration-guides/hosted-page-customer-mode"
source_url: "https://docs.priv.staging.komoju-dev.tools/en/docs/integration-guides/hosted-page-customer-mode.md"
language: en
last_modified: "2026-03-24"
---

Suppose you want to collect your customers' payment details once, then use them to make payments at a later date. To support this, our hosted page supports creating [customer](https://docs.priv.staging.komoju-dev.tools/en/api-reference#2025-01-28/tag/subscriptions/POST/customers) objects instead of payments for long term, PCI-DSS-compliant storage.

One potential use case for this feature would be to implement a subscription system, where you collect user payment details once and then bill them monthly.

# Step 1: Create a Session with mode=customer

The default mode for sessions is "payment". If you specify `"mode": "customer"` when creating your session object, the session will create a customer object instead of a payment.

The resulting session object should have a `customer_id`. Save this `customer_id`, as it will act as a token for creating future payments.

As usual, you'll want to redirect your user to the session's `session_url` so that they can fill in their payment information.

# Step 2: Listen for customer.updated Webhooks

In step 1 you acquire a `customer_id`, but it is "empty". Until the user completes the session on KOMOJU, this `customer_id` cannot be used. To know when it becomes usable, you can use the `customer.updated` webhook to be notified and update your system accordingly.

# Step 3: Make Payments

Once you have a usable `customer_id`, you can choose to omit `payment_details` and instead pass `customer` when [creating payments](https://docs.priv.staging.komoju-dev.tools/en/api-reference#2025-01-28/tag/payments/POST/payments). When done correctly, this will immediately pull money from the customer's stored account.
