Setting Billing Information

Use the set-billing-info operation to set financial information displayed in the Control Panel for given customer accounts. This can be a revenue, outstanding invoices, paid invoices, refunded invoices, and a credit balance.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

Set the financial information by including the set-billing-info operation into the packet as in the following example:

<packet>
<customer>
   <set-billing-info>
   ...
   </set-billing-info>
</customer>
</packet>

 

The set-billing-info node does not have a separate type, it is nested within the ClientTypeRequest complex type (client_input.xsd). The operation node has the following graphics representation:

set-billing-info-rps.gif

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. It specifies the filtering rule. Data type: clientSelectionFilterType (client_input.xsd). For more information on filters, refer to the Available Filters section.
  • The values node is required. It specifies the list of financial details you can set for a customer account. Data type: none. It contains nodes described next in this section. You should add at least one of the nodes to your packet.
  • The income node is optional. It specifies the Revenue value. Data type: clientPriceInput. See the structure of this node below.
  • The invoices-due node is optional. It specifies the Outstanding invoices value. Data type: clientPriceInput. See the structure of this node below.
  • The invoices-paid node is optional. It specifies the Paid invoices value. Data type: clientPriceInput. See the structure of this node below.
  • The invoices-refunded node is optional. It specifies the Refunded invoices value. Data type: clientPriceInput. See the structure of this node below.
  • The credit-balance node is optional. It specifies the Credit balance value. Data type: clientPriceInput. See the structure of this node below.
  • The overuse-due node is optional. It specifies the Usage Charge value. This parameter is relevant in case you offer pay-as-you-go hosting. Data type: clientPriceInput. See the structure of this node below.

Type clientPriceInput has the following graphical presentation:

set-billing-info_priceinput

  • The currency node is required. A three-letter currency name that conforms to ISO 4217 (for example, USD). Data type: string.
  • The sum node is required. It specifies the parameter value. Data type: string.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The set-billing-info node of the response packet is structured as follows:

customer-get-billing-info-reps.gif

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the result of the requested operation. Data type: resultType (common.xsd).
  • The status node is required. It returns the execution status of the operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is used to return the error code when the operation fails. Data type: unsignedInt.
  • The errtext node is optional. Can be used to return an error message if the operation fails. Data type: string.
  • The filter-id node is optional. Returns the name or ID of a Plesk user specified in the request packet. Data type: anySimple.
  • The id node is optional. It is required if the operation succeeds. Returns the unique identifier of the modified customer account. Data type: integer.
 

Samples

Say, you used the following request packet.

<packet version="1.6.7.0"><customer>
   <set-billing-info>
                <filter>
                        <id>3</id>
                </filter>
                <values>
                        <invoices-due>
                                <value>
                                        <currency>USD</currency>
                                        <sum>10</sum>
                                </value>
                        </invoices-due>
                </values>
   </set-billing-info>
</customer>
</packet>

 

Response:

<packet version="1.6.7.0">
  <customer>
    <set-billing-info>
      <result>
        <status>ok</status>
        <filter-id>3</filter-id>
        <id>3</id>
      </result>
    </set-billing-info>
  </customer>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.