> ## 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.

# Creating Order Forms for HOA

To provide payment information and other data required by the `WebSession` object, your customer order form must contain the following attributes:

* The VID of the corresponding `WebSession` object as a hidden element named `vin_WebSession_VID` in the form, for example:

  ```

  <input type="hidden" name="vin_WebSession_VID" value="$sessionId" />
  ```

* The action URL of the form pointing to the HOA page on the Vindicia server ([https://secure.vindicia.com](https://secure.vindicia.com)). The method for submitting the form is POST.

* **Note:**

URLs vary by working environment. Please contact Vindicia client services for your current location.

* **Staging:** [https://secure.staging.us-west.vindicia.com/vws](https://secure.staging.us-west.vindicia.com/vws)
* **Production:** [https://secure.vindicia.com/vws](https://secure.vindicia.com/vws)
* The attributes required for the Subscribe objects HOA will create with finalization of the `WebSession`. These attributes must be present as form elements, unless stored as private values in the `WebSession` object. The element name must begin with the prefix `vin_`, followed by a flattened attribute name that contains the object name, sub-object name, and attribute name, concatenated by underscores.

In the following example, the form collects data for a `BillingPlan` object and a `PaymentMethod` object to construct an `AutoBill` object. The corresponding `WebSession` object specifies `AutoBill_Update` in its method attribute.

```

Select Billing Plan: <p>
<input type="radio" name="vin_BillingPlan_merchantBillingPlanId" 
value="GoldAccess2010" />
<input type="radio" name="vin_BillingPlan_merchantBillingPlanId" 
value="PlatinumAccess2010" />
 
<input type="hidden" name="vin_AutoBill_currency" value="USD" />
<input type="hidden" name="vin_PaymentMethod_Type" 
value="CreditCard" />
 
Enter credit card details: <p>
Account Holder Name: <div id="vin_PaymentMethod_accountHolderName"></ div> <br>
Credit card number: <div id="vin_PaymentMethod_creditCard_account"></div> <br>
Expiration Date: <div id="vin_PaymentMethod_creditCard_expirationDate"></div> <br>
CVV Number: <div id="vin_PaymentMethod_nameValues_cvn"></div> <br>
```

**Note:** You need not embed all the data in the form; feel free to preload some data in the corresponding `WebSession` object. For example, the above form, which results in the creation of an `AutoBill` object, does not include the customer account information, because the customer's `Account` object's `merchantAccountId` attribute is already in the `WebSession` object's `privateFormValues` attribute.

If an attribute is an array, concatenate the element with a number that specifies the array index.

For example, to specify the line items to construct the `Transaction` object's `items` attribute (for a `WebSession` object with the `Transaction.auth` method):

```

<input type="text" name="vin_Transaction_transactionItems_0_sku"/>'
<input type="text" name="vin_Transaction_transactionItems_0_name"/> 
<input type="hidden" name="vin_Transaction_transactionItems_0_price" 
value="9.95"/>
<input type="text" name="vin_Transaction_transactionItems_0_quantity"/>
 
<input type="text" name="vin_Transaction_transactionItems_2_sku"/>
<input type="text" name="vin_Transaction_transactionItems_2_name"/>
<input type="hidden" name="vin_Transaction_transactionItems_2_price" 
value="8.88" />
<input type="text" name="vin_Transaction_transactionItems_2_quantity"/>
```

If you include elements in the form that are relevant to you, but not required by a Vindicia object (such as form elements whose names do not contain the `vin_` prefix), HOA stores the corresponding HTTP POST data in the `postValues` attribute of the corresponding `WebSession` object. After posting, the data is available to you when you retrieve the `WebSession` object on your success or failure page.

When your customer submits the form, HOA stores the form data with the `WebSession` object. It does not create any Subscribe objects (by making the API call you specified in the `method` attribute of the `WebSession` object) until you call `finalize()`on the `WebSession` object. Finalize the `WebSession` from the success page to which HOA redirects the customer's browser after storing the form data.

**Note:** To ensure optimal compatibility of UTF-8 form input with Vindicia HOA form handling, set the `enctype` attribute on the form to `multipart/form-data`.

**Parent topic:**[Working with HOA with Hosted Fields](../topics/Working_with_HOA_with_Ho)


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