# ECAccountPayment

If you have a balance already available on account - say, Points - you can utilize ECAccountPayment. This allows specification of account information, or utilizes the registered copy on device.

### Constructors

If no constructors are specified, payment will be sourced from the device's configured account ID and device token within `ec.cfg`.

```javascript
var payment = new ECAccountPayment();
```

You may also specify the account ID and token, overriding the device's values:

```javascript
var payment = new ECAccountPayment('123456789', 'aphei7au1ceu8Wei2eec0');
```

Lastly, you may also only specify the account ID. However, this will authenticate with an empty device token, and purchases should be expected to fail.

### Properties

All properties may be retrieved and set. However, if not specified from the constructor, these values will be empty. Population of the configured account ID and token will only take place while formulating SOAP requests.

| Property Name      | Discussion                   |
| ------------------ | ---------------------------- |
| `payment.id`       | The account ID to utilize.   |
| `payment.password` | The device token to utilize. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oscwii.org/wii-shop-channel/js/ec/payment-objects/ecaccountpayment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
