gen_rb_m
Executes the rebill process against the specified invoice. It creates a credit memo to offset the charges in the original invoice. Then it creates a new rebill invoice using the changes specified in the rb_line_items array.
Note: The previously existing input and/or output fields <client_item_id>, <client_item_id_out> and/or <filter_client_item_id> were removed from this API call in Release 47.
Input Arguments
Req | Field Name | Field Type | Max Length | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|
client_no | long | 22 | Aria-assigned unique identifier indicating the Aria client providing service to this account. | |||||||
auth_key | string | 32 | Aria-assigned unique key to be passed with each method call for authenticating the validity of the requestor. | |||||||
acct_no | long | 22 | Aria-assigned account identifier. This value is unique across all Aria-managed accounts. | |||||||
OR | ||||||||||
client_acct_id | string | 50 | Client-defined account identifier. | |||||||
orig_invoice_no | long | 22 | Original invoice number for rebilling purposes. | |||||||
reason_cd | long | 22 | Reason code for rebill. | |||||||
Start of rb_line_items array | ||||||||||
rb_line_items | array |
Array of rebill invoice line items. Note: If sending multiple line items, you must send the line items in ascending order using the line_no field in the rb_line_items array for the tax line items to be calculated correctly. |
||||||||
Field Name | Field Type | Max Length | Description | |||||||
long | 22 | Invoice line number reference. | ||||||||
long | 22 | Aria-assigned service number. | ||||||||
OR | ||||||||||
string | 100 | Client-defined unique ID for the service. | ||||||||
double | Rate per unit. Leave this field blank if the rate per unit on the referenced invoice line should be used to calculate the line amount. | |||||||||
double | Units for the line item. | |||||||||
double | Amount of the line item. | |||||||||
string | 200 | Explanatory text for the line item. | ||||||||
string | 1000 | PO number for the invoice line item. | ||||||||
long | 22 | Address sent as the bill-from address to the tax engine for tax calculations. This is the Aria-assigned unique identifier of the service location for the invoice line. | ||||||||
long | 22 | Address sent as the ship-from address to the tax engine for tax calculations. This is the Aria-assigned unique identifier of the service location for the invoice line. | ||||||||
long | 22 | Address sent as the bill-to address to the tax engine for tax calculations. This is the Aria-assigned unique identifier of the contact on the account used as the bill-to address for the invoice line item. | ||||||||
long | 22 | Address sent as the bill-to address to the tax engine for tax calculations. This is the Aria-assigned unique identifier of the contact on the account used as the ship-to address for the invoice line item. | ||||||||
End of rb_line_items array | ||||||||||
alt_statement_address_seq | long | 22 | An alternative statement contact for statement generation. | |||||||
rb_comments | string | 3000 | Explanatory text for rebill. | |||||||
do_collect | long | 1 |
Indicates whether to collect from the account holder as part of the rebill process. Allowable values are 1= yes, 0 = no. If no value is passed then the client parameter "autocollect on rebill" dictates the behavior. Allowable values for do_collect:
|
|||||||
do_write | string | 5 |
Boolean indicator informing Aria whether or not to actually perform the requested operation. If 'false' is passed in this field Aria will, if applicable, calculate any potential effects stemming from this call such as proration, plan assignments, etc. and return all relevant data without actually performing the requested operation or making any changes to the account. This is useful to interfaces that wish to present the user with a 'confirmation page' informing of the would-be effects of the requested operation prior to actually performing it. Do_write defaults to 'true' Allowable values for do_write:
|
|||||||
alt_caller_id | string | 30 | Person or process that submitted the API call. This can be someone's user ID, or the name of an application. | |||||||
Start of optional_transaction_qualifiers array | ||||||||||
optional_transaction_qualifiers | array | Array of additional values you can associate with this API call. | ||||||||
Field Name | Field Type | Max Length | Description | |||||||
string | 100 | Name of the field you want to associate with this API call. | ||||||||
string | 100 | Corresponding value of the field you want to associate with this API call. | ||||||||
End of optional_transaction_qualifiers array | ||||||||||
application_id | string | 300 | The application identifier in which the API is being used in. (Example: “Sales Force”) | |||||||
application_date | string | 300 | The application date/timestamp, ie. 01/01/2014 10:00:00 to track when the application called the API. |
Output Arguments
Field Name | Field Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error_code | long | Aria-assigned error identifier. 0 indicates no error. | ||||||||||||||||||||
error_msg | string | Description of any error that occurred. "OK" if there was no error. | ||||||||||||||||||||
invoice_no | long | The Aria-assigned unique identifier of a given invoice. | ||||||||||||||||||||
collection_error_cd | long | Collection error code. | ||||||||||||||||||||
collection_error_msg | string | Invoicing error message. | ||||||||||||||||||||
statement_error_cd | long | Statement error code. | ||||||||||||||||||||
statement_error_msg | string | Statement error message. | ||||||||||||||||||||
proc_cvv_response | string | Processor return code from CVV validation. | ||||||||||||||||||||
proc_avs_response | string | Processor return code from address validation. | ||||||||||||||||||||
proc_cavv_response | string | Process return code from security validation. | ||||||||||||||||||||
proc_status_code | string | Processor status code. | ||||||||||||||||||||
proc_status_text | string | Processor status description. | ||||||||||||||||||||
proc_payment_id | string | Processor payment ID. | ||||||||||||||||||||
proc_auth_code | string | Processor authorization code. | ||||||||||||||||||||
created_by | string | User ID that created the rebill. | ||||||||||||||||||||
created_date | string | Date the rebill was created in the system. | ||||||||||||||||||||
amount | double | Amount of the rebill. | ||||||||||||||||||||
reason_code | long | Reason code for the rebill. | ||||||||||||||||||||
invoice_items | hash | |||||||||||||||||||||
long | The line number on the initial invoice | |||||||||||||||||||||
long | The unique ID plan this line represents | |||||||||||||||||||||
string | The client-defined unique ID for plan this line represents | |||||||||||||||||||||
long | Unique plan instance number for each assigned master plan. | |||||||||||||||||||||
string | Unique client-defined ID for each assigned master plan. | |||||||||||||||||||||
string | The name of the plan this line represents | |||||||||||||||||||||
long | The unique ID for the service this line represents | |||||||||||||||||||||
string | The client-defined unique ID for the service this line represents | |||||||||||||||||||||
string | The name of the service this line represents | |||||||||||||||||||||
long | The Chart of Accounts ID for the service this line represents | |||||||||||||||||||||
string | The client-defined Chart of Accounts code for the service this line represents | |||||||||||||||||||||
double | The number of units of the item or plan on this line | |||||||||||||||||||||
double | The charge per unit of the item or plan on this line | |||||||||||||||||||||
double | The subtotal amount of this line | |||||||||||||||||||||
string | The long description of this line, used when printing or otherwise displaying invoices | |||||||||||||||||||||
string | The starting date range for the item or plan on this line | |||||||||||||||||||||
string | If any, the ending date range for the item or plan on this line. | |||||||||||||||||||||
long |
Specifies the type of charge or credit associated with this line item. Allowable values for line_type:
|
|||||||||||||||||||||
double | Specifies the full, non-prorated number of units of the service code. | |||||||||||||||||||||
double | Specifies the percentage of the line_base_units billed. | |||||||||||||||||||||
string | Specifies the prorated days in total days. | |||||||||||||||||||||
long | Prorated days of period in this invoice | |||||||||||||||||||||
string | Prorated invoice description. | |||||||||||||||||||||
string | Specifies the coupon code applied to the invoice. | |||||||||||||||||||||
string | The client-defined item identifier. | |||||||||||||||||||||
long | The unique identifier for an order in the context of an client_no and account_no. | |||||||||||||||||||||
long | The unique ID of the item being retrieved. | |||||||||||||||||||||
long | Total days of period in this invoice. | |||||||||||||||||||||
long | Aria-assigned unique rate schedule number. | |||||||||||||||||||||
long | Sequential number in the rate schedule for determining tiers. | |||||||||||||||||||||
long | 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. | |||||||||||||||||||||
long | 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. | |||||||||||||||||||||
long | 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. | |||||||||||||||||||||
long | 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. | |||||||||||||||||||||
tax_details | hash | Array of Tax details for this invoice. | ||||||||||||||||||||
long | Line number associated with each tax detail record. | |||||||||||||||||||||
long | The tax line on the invoice which includes the tax amount associated with this tax_detail_line. | |||||||||||||||||||||
long | The invoice line item for which the tax for this tax_detail_line was calculated. | |||||||||||||||||||||
double | Amount of tax applied for the given tax type. | |||||||||||||||||||||
long | Tax jurisdiction code: 0 = Federal, 1 = State / Province. | |||||||||||||||||||||
double | Rate at which tax is calculated for the tax type used by the tax engine. | |||||||||||||||||||||
long | Indicates whether or not the invoice line amount was tax inclusive. | |||||||||||||||||||||
string | Identifier of the tax type returned by the tax engine. | |||||||||||||||||||||
string | Description of the tax type returned by the tax engine. | |||||||||||||||||||||
string | Category of the tax type returned by the tax engine | |||||||||||||||||||||
string | Jurisdiction name returned by the tax engine | |||||||||||||||||||||
string | Invoice summary text returned by the tax engine. | |||||||||||||||||||||
double |
The amount multiplied by tax rate before rounding precision. Also referred to as "raw tax amount." Note: Assuming that the client setting Aria Internal Tax Rounding Method is set to "Per invoice." |
|||||||||||||||||||||
double |
The amount carried over from previous <unrounded_tax_amt>. It is a remainder, and its value can be positive or negative (based on the previous remainder). Note: Assuming that the client setting Aria Internal Tax Rounding Method is set to "Per invoice." |
|||||||||||||||||||||
double |
The amount of adjusted tax before rounding precision, calculated as the sum of <unrounded_tax_amt> and <carryover_from_prev_amt>. Note: Assuming that the client setting Aria Internal Tax Rounding Method is set to "Per invoice." |
|||||||||||||||||||||
double |
The amount carried over from current <unrounded_tax_amt>. It is a remainder, and its value can be positive or negative based on the previous remainder. Note: Assuming that the client setting Aria Internal Tax Rounding Method is set to "Per invoice." |
|||||||||||||||||||||
third_party_errors | hash | Errors from third-party systems like taxation engines are returned here. Aria-generated error codes are returned in the error_code and error_msg fields at the root level of the API return. | ||||||||||||||||||||
string | Type of error code being represented, such as taxation | |||||||||||||||||||||
string | Error code returned by the third party system | |||||||||||||||||||||
string | Error message returned by the third party system |