> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The WebSession Object

You create `WebSession` objects in the context of the Vindicia HOA functionality, in anticipation of submission of the Web order form by a customer who requested it from your server. When filling out the form, the customer enters sensitive payment data, such as a credit-card numbers, before submitting the form to HOA, which is hosted by a Vindicia server. Handling such data yourself could mean you would have to be in compliance with PCI requirements. With HOA, however, your billing infrastructure need not handle any payment data at all. See Hosted Order Automation in the Subscribe Programming Guide, for details.

Note that the `WebSession` object is only partly populated at creation. It might, for example, contain private data that you do not want visible in the form that you serve to the customer, but which is needed for the API call made by HOA at form submission. One key piece of data you must include in the `WebSession` object is the Subscribe API call (see the `method` attribute) that HOA makes when the customer submits the form. Once created, the `WebSession` object contains a VID. Embed that VID in the form you serve to the customer so that HOA can match the form’s submission with the corresponding `WebSession` object instance.

After form submission by the customer, HOA makes the API call you specified in the `WebSession` object’s `method` attribute to create an object that requires sensitive payment information, such as an `AutoBill`, a `PaymentMethod`, or a `Transaction`. Fetch the `WebSession` object by calling its `fetchByVid()` method, typically before returning the success or failure page to the customer: HOA redirects the customer’s browser to one of those pages after receiving the form. See Hosted Order Automation in the Subscribe Programming Guide for details on the role of the `WebSession` object in the HOA process flow.

* **[WebSession Data Members](../topics/WebSession_Data_Members)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.