gen_rb_m
Summary
| API Name | gen_rb_m |
|---|---|
| Class | transaction_services_m |
| Update Version | 74 |
Description
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.
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 | Yes |
Aria-assigned unique key for authenticating the validity of the requestor. This key is passed with each method call. |
||||||
| acct_no | long | 22 | Yes |
Aria-assigned account identifier. This value is unique across all Aria-managed accounts. Alternative required field: client_acct_id |
||||||
| client_acct_id | string | 50 | Yes |
Client-defined account identifier. Alternative required field: acct_no |
||||||
| orig_invoice_no | long | 22 | Yes |
Original invoice number for rebilling purposes. |
||||||
| alt_statement_address_seq | long | 22 | No |
An alternative statement contact for statement generation. |
||||||
| reason_cd | long | 22 | Yes |
Reason code for rebill. |
||||||
| rb_comments | string | 3000 | No |
Explanatory text for rebill. |
||||||
| Start of rb_line_items object | ||||||||||
| rb_line_items | object | Yes |
Array of rebill invoice line items. |
|||||||
| Name | Type | Length | Required | Description | ||||||
| ▶line_no | long | 22 | Yes |
Invoice line number reference. |
||||||
| ▶service_no | long | 22 | Yes |
Aria-assigned service number. Alternative required field: client_service_id |
||||||
| ▶client_service_id | string | 100 | Yes |
Client-defined unique ID for the service. Alternative required field: service_no |
||||||
| ▶rb_rate_per_unit | double | No |
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. |
|||||||
| ▶rb_units | double | No |
Units for the line item. |
|||||||
| ▶rb_amount | double | No |
Amount of the line item. |
|||||||
| ▶rb_line_comments | string | 200 | No |
Explanatory text for the line item. |
||||||
| ▶po_num | string | 1000 | No |
PO number for the invoice line item. |
||||||
| ▶bill_from_location_no | long | 22 | No |
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. |
||||||
| ▶ship_from_location_no | long | 22 | No |
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. |
||||||
| ▶bill_to_address_seq | long | 22 | No |
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. |
||||||
| ▶ship_to_address_seq | long | 22 | No |
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 object | ||||||||||
| Start of rb_new_lines object | ||||||||||
| rb_new_lines | object | No |
Array of new lines (not part of the original invoice) to be added to the rebill invoice. |
|||||||
| Name | Type | Length | Required | Description | ||||||
| ▶rb_new_line_seq_no | long | 22 | Yes |
Rebill new line sequence number. The new line will appear below the existing line from the original invoice that is being rebilled. |
||||||
| ▶rb_new_service_no | long | 22 | No |
Aria-assigned unique service number for the new rebill line item. Mutually exclusive with rb_new_client_service_id. Not applicable for order lines or surcharge lines. Alternative field: rb_new_client_service_id |
||||||
| ▶rb_new_client_service_id | string | 100 | No |
Client-defined unique service ID for the new rebill line item. Mutually exclusive with rb_new_service_no. Not applicable for order lines or surcharge lines. Alternative field: rb_new_service_no |
||||||
| ▶rb_new_amount | double | Yes |
Amount of the new rebill line item. For a credit or discount line, enter a negative value and provide either rb_new_credit_reason_cd or rb_new_coupon_cd. |
|||||||
| ▶rb_new_units | double | No |
Number of units for the new rebill line item. Units can be zero or greater than zero. |
|||||||
| ▶rb_new_rate_per_unit | double | No |
Rate per unit for the new rebill line item. Value is recorded, not part of any calculation. |
|||||||
| ▶rb_new_master_plan_instance_no | long | 22 | No |
Aria-assigned unique number identifying the Master Plan Instance (MPI) associated with the new rebill line item. Mutually exclusive with rb_new_client_master_plan_instance_id. Alternative field: rb_new_client_master_plan_instance_id |
||||||
| ▶rb_new_client_master_plan_instance_id | string | 100 | No |
Client-defined unique identifier for the Master Plan Instance (MPI) associated with the new rebill line item. Mutually exclusive with rb_new_master_plan_instance_no. Alternative field: rb_new_master_plan_instance_no |
||||||
| ▶rb_new_plan_instance_no | long | 22 | No |
Aria-assigned plan instance number for the new rebill line item. Required for recurring charge lines. Mutually exclusive with rb_new_client_plan_instance_id. Alternative field: rb_new_client_plan_instance_id |
||||||
| ▶rb_new_client_plan_instance_id | string | 100 | No |
Client-defined plan instance ID for the new rebill line item. Required for recurring charge lines. Mutually exclusive with rb_new_plan_instance_no. Alternative field: rb_new_plan_instance_no |
||||||
| ▶rb_new_po_num | string | 100 | No |
Purchase order number associated with the new rebill line item. Used for reference and reporting purposes. |
||||||
| ▶rb_new_start_date | string | No |
Start date for the new rebill line item, in yyyy-mm-dd format. Represents the beginning of the service period for the line. |
|||||||
| ▶rb_new_end_date | string | No |
End date for the new rebill line item, in yyyy-mm-dd format. Must not be earlier than rb_new_start_date. Represents the end of the service period for the line. |
|||||||
| ▶rb_new_credit_reason_cd | long | 22 | No |
Reason code for a service credit line. Required when rb_new_amount is negative and the line represents a service credit. Mutually exclusive with rb_new_coupon_cd. |
||||||
| ▶rb_new_credit_comments | string | 300 | No |
Comments associated with the service credit line. Provides additional context for the credit being applied. |
||||||
| ▶rb_new_coupon_cd | string | 30 | No |
Coupon code to apply to the new rebill line as a discount. Required when rb_new_amount is negative and the line represents a discount. Mutually exclusive with rb_new_credit_reason_cd. |
||||||
| ▶rb_new_credit_or_discount_apply_new_line_seq_no | long | 22 | No |
The rb_new_line_seq_no of a new rebill line to which this credit or discount should be applied. Used to associate a credit or discount line with a specific new line on the rebill. Alternative field: rb_new_credit_or_discount_apply_existing_line_no |
||||||
| ▶rb_new_credit_or_discount_apply_existing_line_no | long | 22 | No |
The line number of an existing original invoice line to which this credit or discount should be applied. Used to associate a credit or discount line with a specific existing line on the original invoice. Alternative field: rb_new_credit_or_discount_apply_new_line_seq_no |
||||||
| ▶rb_new_item_no | long | 22 | No |
Aria-assigned unique inventory item number for a new order line. Required for order lines. Mutually exclusive with rb_new_client_sku. Alternative field: rb_new_client_sku |
||||||
| ▶rb_new_client_sku | string | 100 | No |
Client-defined SKU for the inventory item on a new order line. Required for order lines. Mutually exclusive with rb_new_item_no. Alternative field: rb_new_item_no |
||||||
| ▶rb_new_order_comments | string | 3000 | No |
Comments associated with the order line item. Provides additional context visible on the order. |
||||||
| ▶rb_new_client_order_id | string | 100 | No |
Client-defined unique identifier for the order associated with the new rebill line item. Must be unique among active orders if the client parameter "Enforce Unique Client Order ID" is enabled. |
||||||
| ▶rb_new_line_comments | string | 3000 | No |
Explanatory text for the new rebill line item. Displayed as a comment on the invoice line. |
||||||
| ▶rb_new_surcharge_no | long | 22 | No |
Aria-assigned unique surcharge number for a new surcharge line. Required for surcharge lines. Mutually exclusive with rb_new_client_surcharge_id. The surcharge must be assigned to the account, the specified Master Plan Instance, or its Plan. Alternative field: rb_new_client_surcharge_id |
||||||
| ▶rb_new_client_surcharge_id | string | 100 | No |
Client-defined unique surcharge identifier for a new surcharge line. Required for surcharge lines. Mutually exclusive with rb_new_surcharge_no. The surcharge must be assigned to the account, the specified Master Plan Instance, or its Plan. Alternative field: rb_new_surcharge_no |
||||||
| ▶rb_new_bill_from_location_no | long | 22 | No |
Aria-assigned location number representing the Bill From address for the new rebill line item. Used by tax engines (such as Avalara, Vertex, or Sovos) to determine the origin address for tax calculation. Mutually exclusive with rb_new_bill_from_client_location_id. Alternative field: rb_new_bill_from_client_location_id |
||||||
| ▶rb_new_bill_from_client_location_id | string | 100 | No |
Client-defined location ID representing the Bill From address for the new rebill line item. Used by tax engines to determine the origin address for tax calculation. Mutually exclusive with rb_new_bill_from_location_no. Alternative field: rb_new_bill_from_location_no |
||||||
| ▶rb_new_bill_to_address_seq | long | 22 | No |
The sequence number of the Bill To address on the account to use for the new rebill line item. Used by tax engines to determine the destination billing address for tax calculation. |
||||||
| ▶rb_new_ship_from_location_no | long | 22 | No |
Aria-assigned location number representing the Ship From address for the new rebill line item. Used by tax engines to determine the shipping origin address for tax calculation. Mutually exclusive with rb_new_ship_from_client_location_id. Alternative field: rb_new_ship_from_client_location_id |
||||||
| ▶rb_new_ship_from_client_location_id | string | 100 | No |
Client-defined location ID representing the Ship From address for the new rebill line item. Used by tax engines to determine the shipping origin address for tax calculation. Mutually exclusive with rb_new_ship_from_location_no. Alternative field: rb_new_ship_from_location_no |
||||||
| ▶rb_new_ship_to_address_seq | long | 22 | No |
The sequence number of the Ship To address on the account to use for the new rebill line item. Used by tax engines to determine the shipping destination address for tax calculation. |
||||||
| End of rb_new_lines object | ||||||||||
| do_collect | long | 1 | No |
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. Allowed values:
|
||||||
| do_write | string | 5 | No |
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' Allowed values:
|
||||||
Outputs
| Name | Type | Length | Required | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| error_code | long | No |
Aria-assigned error identifier. 0 indicates no error. |
|||||||||||||||||||||
| error_msg | string | No |
Description of any error that occurred. "OK" if there was no error. |
|||||||||||||||||||||
| invoice_no | long | No |
The Aria-assigned unique identifier of a given invoice. |
|||||||||||||||||||||
| collection_error_cd | long | No |
Collection error code. |
|||||||||||||||||||||
| collection_error_msg | string | No |
Invoicing error message. |
|||||||||||||||||||||
| statement_error_cd | long | No |
Statement error code. |
|||||||||||||||||||||
| statement_error_msg | string | No |
Statement error message. |
|||||||||||||||||||||
| proc_cvv_response | string | No |
Processor return code from CVV validation. |
|||||||||||||||||||||
| proc_avs_response | string | No |
Processor return code from address validation. |
|||||||||||||||||||||
| proc_cavv_response | string | No |
Process return code from security validation. |
|||||||||||||||||||||
| proc_status_code | string | No |
Processor status code. |
|||||||||||||||||||||
| proc_status_text | string | No |
Processor status description. |
|||||||||||||||||||||
| proc_payment_id | string | No |
Processor payment ID. |
|||||||||||||||||||||
| proc_auth_code | string | No |
Processor authorization code. |
|||||||||||||||||||||
| created_by | string | No |
User ID that created the rebill. |
|||||||||||||||||||||
| created_date | string | No |
Date the rebill was created in the system. |
|||||||||||||||||||||
| amount | double | No |
Amount of the rebill. |
|||||||||||||||||||||
| reason_code | long | No |
Reason code for the rebill. |
|||||||||||||||||||||
| Start of invoice_items object | ||||||||||||||||||||||||
| invoice_items | object | No | ||||||||||||||||||||||
| Name | Type | Length | Required | Description | ||||||||||||||||||||
| ▶invoice_line_no | long | No |
The line number on the initial invoice |
|||||||||||||||||||||
| ▶plan_no | long | 22 | No |
The unique ID plan this line represents |
||||||||||||||||||||
| ▶client_plan_id | string | 100 | No |
The client-defined unique ID for plan this line represents |
||||||||||||||||||||
| ▶plan_instance_no | long | No |
Unique plan instance number for each assigned master plan. |
|||||||||||||||||||||
| ▶client_plan_instance_id | string | 100 | No |
Unique client-defined ID for each assigned master plan. |
||||||||||||||||||||
| ▶plan_name | string | No |
The name of the plan this line represents |
|||||||||||||||||||||
| ▶service_no | long | No |
The unique ID for the service this line represents |
|||||||||||||||||||||
| ▶client_service_id | string | 100 | No |
The client-defined unique ID for the service this line represents |
||||||||||||||||||||
| ▶service_name | string | No |
The name of the service this line represents |
|||||||||||||||||||||
| ▶service_coa_id | long | No |
The Chart of Accounts ID for the service this line represents |
|||||||||||||||||||||
| ▶client_service_coa_code | string | 100 | No |
The client-defined Chart of Accounts code for the service this line represents |
||||||||||||||||||||
| ▶units | double | No |
The number of units of the item or plan on this line |
|||||||||||||||||||||
| ▶rate_per_unit | double | No |
The charge per unit of the item or plan on this line |
|||||||||||||||||||||
| ▶line_amount | double | No |
The subtotal amount of this line |
|||||||||||||||||||||
| ▶line_description | string | No |
The long description of this line, used when printing or otherwise displaying invoices |
|||||||||||||||||||||
| ▶start_date_range | string | No |
The starting date range for the item or plan on this line |
|||||||||||||||||||||
| ▶end_date_range | string | No |
If any, the ending date range for the item or plan on this line. |
|||||||||||||||||||||
| ▶line_type | long | No |
Specifies the type of charge or credit associated with this line item. Allowed values:
|
|||||||||||||||||||||
| ▶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 |
The client-defined item identifier. |
|||||||||||||||||||||
| ▶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 rate schedule number. |
|||||||||||||||||||||
| ▶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 |
|||||||||||||||||||||
| End of invoice_items object | ||||||||||||||||||||||||
| Start of tax_details object | ||||||||||||||||||||||||
| tax_details | object | No |
Array of Tax details for this invoice. |
|||||||||||||||||||||
| 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. |
|||||||||||||||||||||
| End of tax_details object | ||||||||||||||||||||||||
| Start of third_party_errors object | ||||||||||||||||||||||||
| third_party_errors | object | No |
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. |
|||||||||||||||||||||
| Name | Type | Length | Required | Description | ||||||||||||||||||||
| ▶error_class | string | No |
Type of error code being represented, such as taxation |
|||||||||||||||||||||
| ▶error_code | string | No |
Error code returned by the third party system |
|||||||||||||||||||||
| ▶error_msg | string | No |
Error message returned by the third party system |
|||||||||||||||||||||
| End of third_party_errors object | ||||||||||||||||||||||||
| Start of proc_payment_response_field_list object | ||||||||||||||||||||||||
| proc_payment_response_field_list | object | No |
Payment response fields returned by the processor for further actions if any. |
|||||||||||||||||||||
| Name | Type | Length | Required | Description | ||||||||||||||||||||
| ▶proc_payment_response_field_name | string | 100 | No |
Field name of various response returned by the processor, example: micro_deposit_verify_url. Allowed values:
|
||||||||||||||||||||
| ▶proc_payment_response_field_value | string | 4000 | No |
Field value for the corresponding payment response field, example: Actual URL to be used for the micro deposit verification. |
||||||||||||||||||||
| End of proc_payment_response_field_list object | ||||||||||||||||||||||||