Skip to main content
Aria Knowledge Central

gen_invoice_m

Summary

API Name gen_invoice_m
Class transaction_services_m
Update Version 58

Description

Generates an invoice on demand for a specified master plan instance (MPI or subscription), a specific billing group, or all billing groups under an account. This triggers the same billing calculation that occurs during Aria's automated billing cycle, but allows you to generate invoices outside the normal schedule. The invoice includes all unbilled recurring charges, usage charges, order charges, surcharges, discounts, and taxes for the billing period. If a pending invoice already exists for the MPI, a new invoice cannot be generated until the pending one is approved (see manage_pending_invoice_m). An invoice will not generate if the MPI billing date is in the future. Use force_pending to create the invoice in a pending (review-required) state. Use invoice_mode=1 to generate an advance invoice for the next billing cycle. Use combine_invoices to control whether multiple billing periods are merged into a single invoice.

Inputs

Name Type Length Required Description
client_no long 22 Yes

Aria-assigned unique identifier indicating the Aria client providing service to this account.

auth_key string 32 No

Aria-assigned unique key for authenticating the validity of the requestor. This key is passed with each method call.

acct_no long 22 No

Aria-assigned account identifier. This value is unique across all Aria-managed accounts.

Alternative field: client_acct_id

client_acct_id string 50 No

Client-defined account identifier.

Alternative field: acct_no

master_plan_instance_no long 22 No

The master subscription plan instance number.

client_master_plan_instance_id string 100 No

Client-defined master plan subscription plan instance ID.

billing_group_no long 22 No

Billing group number

client_billing_group_id string 100 No

Client-defined unique identifier for billing group

force_pending string 5 No

Determines whether to create the invoice as a pending invoice (if client is not already configured to do so). Note: If the client is configured for pending invoices, passing "false" here will NOT override the client setting. In addition, an invoice_mode value of 1 also overrides this setting.

Allowed values:

Value Description
False  
True  
client_receipt_id string 50 No

Client-defined unique identifier used to track related system actions

alt_bill_day long 2 No

Number specifying a day of the month to use as an alternate bill day. You can enter a bill date other than the anniversary date in this field. The invoice_mode must be set to 0 or must be blank to enter a date in this field, it cannot be set to 1.

invoice_mode long 1 No

For generating advance invoices. Use 0 for the current cycle and 1 for advanced cycle.

combine_invoices long 1 No

Indicator for combining invoices when retroactive start dates, negative bill lag days, or plan changes just prior to the next billing date would otherwise generate multiple invoices. The allowable values are 1, 2, or 3.

Allowed values:

Value Description
1 Combine Invoices (long cycle)
2 Do Not Combine Invoices (short cycle)
3 Use client default configuration setting

Outputs

Name Type Length Required Description
error_code long   No

Aria-assigned error identifier. 0 indicates no error.

error_msg string   No

Textual description of any error that occurred. "OK" if there was no error.

invoice_no long   No

Aria-assigned unique identifier of the invoice generated. Note that if multiple invoices are generated, this parameter is null and details for all invoices are returned in the out_invoices array.

out_acct_no long 22 No

Aria-assigned unique identifier of the account. This value is unique across all Aria-managed accounts.

out_client_acct_id string   No

The client-defined identifier of the account.

out_billing_group_no long 22 No

Aria-assigned unique identifier of the billing group associated with the invoice generated. Note that if multiple invoices are generated, this parameter will be null and details for all invoices will be returned in the out_invoices array.

out_client_billing_group_id string 100 No

The client-defined identifier of the billing group associated with the invoice generated. Note that if multiple invoices are generated, this parameter will be null and details for all invoices will be returned in the out_invoices array.

third_party_errors object   No

Errors from third-party systems like taxation engines are returned in this array. Aria-generated error codes are returned in the error_code and error_msg fields at the root level of the API return. Note that if multiple invoices are generated, parameters in this array will be null and details for all invoices will be returned in the out_invoices array.

See fields below

out_invoices object   No

Note: This field is deprecated. Aria no longer supports out_invoices.

out_invoices_list object   No

See fields below

third_party_errors fields

Name Type Length Required Description
error_class string   No

The type of error code being represented, such as taxation.

error_code string   No

The error code returned by the third party system.

error_msg string   No

The error message returned by the third party system.

out_invoices_list.invoice_items fields

Name Type Length Required Description
invoice_line_no long   No

The line number on the invoice.

plan_no long 22 No

Aria-assigned unique identifier of the plan associated with the invoice line item.

client_plan_id string   No

Client-defined identifier of the plan associated with the invoice line item.

plan_instance_no long   No

Aria-assigned unique identifier of the plan instance associated with the invoice line item.

client_plan_instance_id string   No

Client-defined identifier of the plan instance associated with the invoice line item.

plan_name string   No

Name of the plan associated with the invoice line item.

service_no long   No

Aria-assigned unique identifier of the service associated with the invoice line item.

client_service_id string   No

Client-defined identifier of the service associated with the invoice line item.

service_name string   No

Name of the service associated with the invoice line item.

service_coa_id long   No

Chart of Accounts identifier for the service associated with the invoice line item.

client_service_coa_code string   No

Client-defined identifier of the Chart of Accounts for the service associated with the invoice line item.

units double   No

Number of units of the item or service on the invoice line item.

rate_per_unit double   No

Charge per unit of the item or service on the invoice line item.

line_amount double   No

Subtotal amount of the invoice line item.

line_description string   No

Long description of the invoice line item, used when printing or otherwise displaying invoices.

start_date_range string   No

The starting date for the item or service on the invoice line item.

end_date_range string   No

The ending date for the item or service on the invoice line item.

line_type long   No

Specifies the type of charge or credit associated with this line item.

Allowed values:

Value Description
1 Recurring charge
2 Tax charge
3 Service credit
4 Coupon Credit
5 Activation Charge
6 Usage Charge
7 Recurring Arrears Charge
8 Order Charge
9 Surcharge
base_plan_units double   No

Specifies the full, non-prorated number of units of the service code.

proration_factor double   No

Specifies the percentage of the line_base_units billed.

proration_text string   No

Specifies the prorated days in total days.

proration_remaining_days long   No

Prorated days of period in this invoice.

proration_description string   No

Prorated invoice description.

credit_coupon_code string   No

Specifies the coupon code applied to the invoice.

client_sku string   No  
order_no long 22 No

The unique identifier for an order in the context of an client_no and account_no.

item_no long   No

The unique ID of the item being retrieved.

client_item_id string   No

Note: This field is deprecated. Aria no longer supports client_item_id.

adv_billing_period_total_days long   No

Total days of period in this invoice.

rate_schedule_no long   No

Aria-assigned unique identifier for the rate schedule used to generate this invoice line item. Either the catalog rate of this rate schedule is used for this line item or the account custom rate against this underlying rate schedule is used. Please note that there are cases in which the custom_rate_ind is null/0 but rate_schedule_no is also null. These special cases include rebill rate changes and multi-plan contract early cancellation fees where the charges are neither from regular rate schedule nor from custom rates. Another such case is the dummy zero amount line formed when net usage is negative for a usage service.

rate_schedule_tier_no long   No

Sequential number in the rate schedule for determining tiers.

bill_from_address_no long   No

Address sent as the bill-from address to the tax engine for tax calculations. Depending on the taxation configuration, this parameter may return the Aria-assigned unique identifier of the service location for the invoice line item. Note that service locations can be associated with a service for a given plan instance on an account, with an item (NSO) purchased as part of a one-time order, or with a service as defined in the product catalog.

ship_from_address_no long   No

Address sent as the ship-from address to the tax engine for tax calculations. Depending on the taxation configuration, this parameter may return the Aria-assigned unique identifier of the service location for the invoice line item. Note that service locations can be associated with a service for a given plan instance on an account, with an item (NSO) purchased as part of a one-time order, or with a service as defined in the product catalog.

bill_to_address_no long   No

Address sent as the bill-to address to the tax engine for tax calculations. This parameter will return the Aria-assigned unique identifier of the contact on the account used as the bill-to address for the invoice line item.

ship_to_address_no long   No

Address sent as the ship-to address to the tax engine for tax calculations. This parameter will return the Aria-assigned unique identifier of the contact on the account used as the ship-to address for the invoice line item.

custom_rate_ind long   No

Identifies whether this is a custom rate. A value of 1 indicates that it is a custom rate. A value of 0 indicates that it is a standard rate. Please note that there are cases in which the custom_rate_ind is null/0 but rate_schedule_no is also null. These special cases include rebill rate changes and multi-plan contract early cancellation fees where the charges are neither from regular rate schedule nor from custom rates. Another such case is the dummy zero amount line formed when net usage is negative for a usage service.

installment_term_no long   No

Aria assigned installment term no

installment_no long   No

Aria assigned installment schedule no

out_invoices_list.tax_details fields

Name Type Length Required Description
tax_detail_line long   No

Line number associated with each tax detail record.

seq_num long   No

The tax line on the invoice which includes the tax amount associated with this tax_detail_line.

taxed_seq_num long   No

The invoice line item for which the tax for this tax_detail_line was calculated.

debit double   No

Amount of tax applied for the given tax type.

tax_authority_level long   No

Tax jurisdiction code: 0 = Federal, 1 = State / Province.

tax_rate double   No

Rate at which tax is calculated for the tax type used by the tax engine.

orig_was_tax_inclusive long   No

Indicates whether or not the invoice line amount was tax inclusive.

tax_srv_tax_type_id string   No

Identifier of the tax type returned by the tax engine.

tax_srv_tax_type_desc string   No

Description of the tax type returned by the tax engine.

tax_srv_cat_text string   No

Category of the tax type returned by the tax engine.

tax_srv_juris_nm string   No

Jurisdiction name returned by the tax engine.

tax_srv_tax_sum_text string   No

Invoice summary text returned by the tax engine.

unrounded_tax_amt double   No

The amount multiplied by tax rate before rounding precision. Also referred to as raw tax amount. *Note: Aria internal tax rounding method set to invoice.

carryover_from_prev_amt double   No

The amount that is a carryover from previous unrounded tax amt. It is remainder and value can be positive or negative based on the previous remainder. *Note: Aria internal tax rounding method set to invoice.

before_round_adjusted_tax_amt double   No

The amount adjusted Tax before rounding precision. i.e. Sum of unrounded_tax_amt, and carryover_from_prev_amt. *Note: Aria internal tax rounding method set to invoice.

carryover_from_current_amt double   No

The amount that is a carryover from current unrounded tax amt. It is remainder and value can be positive or negative based on the previous remainder. *Note: Aria internal tax rounding method set to invoice.

tax_nominal_rate double   No

Nominal Rate returned by the tax engine.

out_invoices_list.third_party_errors fields

Name Type Length Required Description
error_class string   No

The type of error code being represented, such as taxation.

error_code string   No

The error code returned by the third party system.

error_msg string   No

The error message returned by the third party system.

out_invoices_list fields

Name Type Length Required Description
invoicing_error_code long   No

The error code generated by Aria when Aria attempted to generate a invoice.

invoicing_error_msg string   No

The text message associated with 'invoicing_error_code'.

invoice_no long   No

The Aria-assigned unique identifier of a given invoice.

billing_group_no long 22 No

Aria-assigned unique identifier of the billing group associated with the invoice generated.

client_billing_group_id string 100 No

The client-defined identifier of the billing group associated with the invoice generated.

invoice_charges_before_tax double   No

Total of charges before tax for the invoice.

invoice_tax_charges double   No

Total of tax charges for the invoice.

invoice_charges_after_tax double   No

Total of all charges including tax for the invoice. The sum of invoice_charges_before_tax and invoice_tax_charges.

invoice_credit_amount double   No

Total of all credits for the invoice.

invoice_total_amount double   No

Total of all charges and all credits for the invoice. The sum of invoice_charges_after_tax net of invoice_credit_amount.

invoice_items object   No

See fields below

tax_details object   No

List of tax details for the invoice.

See fields below

third_party_errors object   No

Errors from third-party systems like taxation engines are returned in this array. Aria-generated error codes are returned in the error_code and error_msg fields at the root level of the API return. Note that if multiple invoices are generated, parameters in this array will be null and details for all invoices will be returned in the out_invoices array.

See fields below

TOP
  • Was this article helpful?