replace_acct_plan_m
Summary
| API Name | replace_acct_plan_m |
|---|---|
| Class | account_services_m |
| Update Version | 65 |
Description
Replaces an existing plan instance (master or supplemental) with a different plan on a specified account. This is used for plan upgrades, downgrades, or lateral moves where the customer switches from one product/service tier to another. The existing plan is canceled and the new plan is assigned in a single atomic operation, with proration handled according to the assignment_directive setting. The new plan inherits the billing group and can optionally receive new rate schedules, contacts, and payment configuration. This is preferred over separately calling cancel_acct_plan_m and assign_acct_plan_m because it ensures continuity and proper proration.
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 | Yes |
Aria-assigned account identifier. This value is unique across all Aria-managed accounts. Alternative required field: client_acct_id |
||||||||||||||||||||||||
| plan_instance_no | long | 22 | Yes |
The unique identifier of the plan instance (can be either a master or supplemental plan) on which the plan will be replaced. Alternative required field: client_plan_instance_id |
||||||||||||||||||||||||
| client_plan_instance_id | string | 100 | Yes |
The client-defined identifier of the plan instance (can be either a master or supplemental plan) on which the plan will be replaced. Alternative required field: plan_instance_no |
||||||||||||||||||||||||
| new_plan_no | long | 22 | Yes |
The unique identifier of the new plan replacing the existing plan on the instance. Alternative required field: new_client_plan_id |
||||||||||||||||||||||||
| new_client_plan_id | string | 100 | Yes |
The client-defined identifier of the new plan replacing the existing plan on the instance. Alternative required field: new_plan_no |
||||||||||||||||||||||||
| new_client_plan_instance_id | string | 100 | No |
The new client-defined identifier for the plan instance |
||||||||||||||||||||||||
| alt_rate_schedule_no | long | 8 | No |
Alternative Rate Schedule Number. The alt_rate_schedule_no is the unique identifier for an alternative rate schedule that can be assigned to the account holder in place of the default rate schedule. This is often done by CSR's to provide special compensation or discounts as incentives to account holders. Alternative field: client_alt_rate_schedule_id |
||||||||||||||||||||||||
| plan_units | double | 12 | No |
The units of the plan added at this change |
||||||||||||||||||||||||
| coupon_codes | object | No |
An array of coupon details for the master plan instance. |
|||||||||||||||||||||||||
| promo_cd | string | 30 | No |
This is the code provided the client and used by the account holder during registration or when executing a transaction. A promotion generally provides access to a custom set of reduced-rate plans. |
||||||||||||||||||||||||
| mp_surcharges | object | No |
Surcharge for master plan |
|||||||||||||||||||||||||
| plan_status | long | 2 | No |
Updates the plan status for the plan instance. Allowed values:
|
||||||||||||||||||||||||
| plan_instance_description | string | 1000 | No |
Updated the description for the plan instance. |
||||||||||||||||||||||||
| plan_instance_field_update | object | No | ||||||||||||||||||||||||||
| assignment_directive | long | 8 | No |
The rule to be applied to this assignment request, governing the proration rule is applied. Default behavior is to make the plan change (assign/deassign a plan to an account, change units on an existing plan, etc.) immediately based on client-defined default proration rule, resulting in appropriate prorated charge and credit. Allowed values:
|
||||||||||||||||||||||||
| comments | string | 500 | No |
Additional explanatory text relating to this API call. |
||||||||||||||||||||||||
| do_write | string | 5 | No |
Boolean indicator that specifies whether to actually perform the requested operation. If 'false' is passed in this field, Aria calculates, if applicable, any potential effects 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 want to present the user with a 'confirmation page' informing them of the potential effects of the requested operation prior to actually performing it. Do_write defaults to 'true' Allowed values:
|
||||||||||||||||||||||||
| client_receipt_id | string | 50 | No |
Client-defined unique identifier used to track related system actions |
||||||||||||||||||||||||
| offset_months | long | 4 | No |
Number of months to add to the prorated period. |
||||||||||||||||||||||||
| alt_proration_start_date | string | 10 | No |
The date, in yyyy-mm-dd format, from which the proration calculations begin. If this field is NULL, then the proration calculations begin from the current date. This date cannot be before the beginning of the current billing period. |
||||||||||||||||||||||||
| auto_offset_months_option | long | 1 | No |
Automatically set the offset for the billing anniversary month. Allowed values:
|
||||||||||||||||||||||||
| alt_client_acct_group_id | string | 100 | No |
One-time collections account group to use for this specific call. Default collections group on the account is not changed. |
||||||||||||||||||||||||
| custom_rates | object | No |
An array of custom rates for the specified account number |
|||||||||||||||||||||||||
| effective_date | string | 10 | No |
If the assignment directive is for a future date assignment, this is the date, in yyyy-mm-dd format, on which the plan change will be executed. If this field is NULL, then the plan change will not happen until it is manually executed or until the effective_date is updated. |
||||||||||||||||||||||||
| offset_interval | long | 4 | No |
If assigning a change on an anniversary day, the number of billing periods by which to delay that change. If the new plan is different from the old plan, and this value is greater than 0, then the billing date continues to be the annniversary date. |
||||||||||||||||||||||||
| invoice_unbilled_usage | string | 5 | No |
Specifies whether to invoice the unbilled usage if a plan is terminated in the middle of a billing period. Allowed values:
|
||||||||||||||||||||||||
| force_supp_bill_date_reset | long | 1 | No |
Note: This field is deprecated. Aria no longer supports force_supp_bill_date_reset. |
||||||||||||||||||||||||
| force_master_bill_date_reset | long | 1 | No |
Overrides the "Sync_mstr_bill_dates_on_1st_supp" client-level setting that determines whether or not no-charge master plan billing dates should be reset when assigning a new supplemental plan or when the supplemental plan instance status is updated to a billable status. If this value is left empty, the client-level setting will take effect. Allowed values:
|
||||||||||||||||||||||||
| client_alt_rate_schedule_id | string | 100 | No |
Client-defined alternate rate schedule identifier to assign (if any). If none is specified, the default rate schedule number will be used. Alternative field: alt_rate_schedule_no |
||||||||||||||||||||||||
| usage_accumulation_reset_months | long | 4 | No |
The number of reset months for each plan |
||||||||||||||||||||||||
| usage_pooling | string | 5 | No |
Indicates whether usage pooling is enabled for this plan instance. Allowable values are 'true' and 'false'. Allowed values:
|
||||||||||||||||||||||||
| usage_threshold_applicability | string | 2 | No |
Usage tracking options on the plans in the account Allowed values:
|
||||||||||||||||||||||||
| proration_invoice_timing | long | 1 | No |
Determines whether to create a separate invoice for prorated charges immediately, or defer to the next anniversary date. Note that this will override the Proration Invoice Timing configuration saved with the plan in the product catalog. Allowed values:
|
||||||||||||||||||||||||
| po_num | string | 100 | No |
Purchase order number assigned to the plan instance. |
||||||||||||||||||||||||
| plan_update_services | object | No |
List of services associated with the plan being assigned or updated on the account. |
|||||||||||||||||||||||||
| force_bill_date_reset | long | 1 | No |
When a master plan's status changes from non-billable to billable, this input will determine what the billing dates of the specific master plan and all associated supplemental plans anniversary date will be. Allowed values:
|
||||||||||||||||||||||||
| force_currency_change | string | 5 | No |
Force currency change during update. Generally this is necessary when the update is taking place to accommodate for an account holder moving from one area to another where the local currency is different. Allowed values:
|
||||||||||||||||||||||||
| recurring_processing_model_ind | long | 1 | No |
Defines a recurring payment type for Credit Card and Tokenized Credit Cards. A null value will default to 0 - Cardholder-Initiated Transaction - Credentials on File. Allowed values:
|
||||||||||||||||||||||||
| usage_accumulation_reset_months_renewal_option | long | 1 | No |
Determines whether the usage accumulation reset months will automatically reset to same value at the end of the current period or will expire at end of current period. Allowed values:
|
||||||||||||||||||||||||
| include_plan_instance_queue | string | 5 | No |
Boolean indicator to return the queues created on this api call. Allowed values:
|
||||||||||||||||||||||||
| bill_lag_days | long | 10 | No |
Bill lag days refer to the number of days prior to (negative) or after (positive) an account billing date at which an invoice should be generated for this Master Plan Instance. Negative bill lag days are typically used for subscription-based services (often subscription-based services paid using net-terms), in which the user would like to send out invoices to customers well in advance of the real invoice date. Positive bill lag days are typically used for usage-based services. |
||||||||||||||||||||||||
| proc_field_override | array | No |
The processor-specific fields passed as an array of proc_field_name/proc_field_value key-value pairs. The allowable fields and values for the key-value pairs are highlighted in blue below. |
|||||||||||||||||||||||||
| alt_proration_end_date | string | No |
Applicable only for plan instance that is of daily/weekly billing interval type. It is for supplemental plan only in assigning and for both master plan and supplemental plan in replacing. The date, in yyyy-mm-dd format, should never be before the alt_proration_start_date if specified, the retroactive_start_date if specified, or the current date. |
|||||||||||||||||||||||||
| client_acct_id | string | 50 | Yes |
Client-defined account identifier. Alternative required field: acct_no |
||||||||||||||||||||||||
| pi_coupon_codes | object | No |
Array of coupon details for the plan instance. |
coupon_codes fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| coupon_codes | string | 30 | No |
The coupon codes to assign to this master plan instance, if any |
mp_surcharges fields
| Name | Type | Length | Required | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| mp_surcharge_no | long | 22 | No | |||||||
| mp_surcharge_directive | long | 1 | No |
The surcharge directive to assign/remove the surcharge from the master plan instance Allowed values:
|
||||||
| mp_rate_schedule_no | long | 22 | No |
plan_instance_field_update fields
| Name | Type | Length | Required | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| plan_instance_field_name | string | 100 | No |
Required based on the definition of each plan instance field associated with the new plan. |
||||||||||
| plan_instance_field_value | string | 100 | No |
Required based on the definition of each plan instance field associated with the new plan. |
||||||||||
| plan_instance_field_directive | long | 8 | No |
Required for each plan instance field provided. Allowed values:
|
plan_update_services fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| service_no | long | 22 | No |
The Aria-assigned unique identifier for the service associated with the plan instance. Either this field or client_service_id is required to map plan services to the plan instance. Alternative field: client_service_id |
| client_service_id | string | 100 | No |
The client-defined identifier for the service associated with the plan instance. Alternative field: service_no |
| svc_location_no | long | 22 | No |
The Aria-assigned unique identifier for the origin location for the specified service associated with the plan. Depending on taxation configuration, this address may be used for tax calculations. If both svc_location_no and client_svc_location_id are provided, svc_location_no will take precedence. |
| client_svc_location_id | string | 100 | No |
The client-defined unique identifier for the origin location for the service associated with the plan. Depending on taxation configuration, this address may be used for tax calculations. If both svc_location_no and client_svc_location_id are provided, svc_location_no will take precedence. |
| dest_contact_no | long | 22 | No |
The Aria-assigned unique identifier for the destination contact for the specified service associated with the plan. Depending on taxation configuration, this address may be used for tax calculations. |
proc_field_override fields
| proc_field_name | proc_field_value | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| transaction_type |
Defines a transaction type for Credit Cards and Tokenized Credit Cards. If a value is not entered, it will default to your client configuration settings. Please note that the values differ per processor. For a list of transaction types, please read our documentation. Allowed values:
|
||||||||||||||||||||||||||||
| client_3ds_nonce | The 3ds enriched nonce used for the card authorization. | ||||||||||||||||||||||||||||
| payer_auth_reference_id | Reference id for 3ds transaction session. | ||||||||||||||||||||||||||||
| payer_auth_transaction_mode |
The transaction mode identifies the channel from which the transactions are originated of Cybersource 3ds 2.0. Allowed values:
|
||||||||||||||||||||||||||||
| payer_auth_transaction_id | Authentication Transaction id for 3ds authorization. | ||||||||||||||||||||||||||||
| end_user_browser_accept_header | Browser Accept Header that was used for placing an online order. Some examples might include 'text/html,application/xhtml+xml,application/xml ;q=0.9,*/*;q=0.8'. | ||||||||||||||||||||||||||||
| end_user_browser_agent | Browser that was used for placing an online order. Some examples might include "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0". | ||||||||||||||||||||||||||||
| end_user_browser_color_depth | Browser color depth in bits per pixel. This should be obtained by using the browser's screen.colorDepth property. Accepted values: 1, 4, 8, 15, 16, 24, 32 or 48 bit color depth. | ||||||||||||||||||||||||||||
| end_user_browser_java_enabled_ind | Boolean value indicating if the shopper's browser is able to execute Java. | ||||||||||||||||||||||||||||
| end_user_browser_language | Browser supported language(as defined in IETF BCP 47). This should be obtained by using the browser's navigator.language property. | ||||||||||||||||||||||||||||
| end_user_browser_screen_height | Browser total height that was used for placing an online order. | ||||||||||||||||||||||||||||
| end_user_browser_screen_width | Browser total width that was used for placing an online order. | ||||||||||||||||||||||||||||
| end_user_browser_timezone_offset_mins | Time difference between UTC time and the shopper's browser local time, in minutes. | ||||||||||||||||||||||||||||
| pa_3ds_completion_ind | In Adyen, for 3DS v2.0 transaction, if the response of DDC is received within 10sec set this to 'Y', else set this to 'N'. | ||||||||||||||||||||||||||||
| pa_3ds_trans_status | In Adyen, for 3DS v2.0 transaction, if the response of Challenge Shopper is NOT received within 10mins set this to 'U', else set the value from Challenge shopper response. | ||||||||||||||||||||||||||||
| pa_3ds_termination_url | Termination url for 3DS transaction. | ||||||||||||||||||||||||||||
| pa_machine_id | HTTP cookie to be used in the HTTP header for Worldpay 3DS transaction. | ||||||||||||||||||||||||||||
| sca_exemption_type | Defines a exemption type indicator for 3D secure transactions. Depending upon the exemption reason, it can bypass Strong Customer Authentication. If a value is not entered, it will default to your client configuration settings. Please note that the values differ per processor. For a list of exemption types, please read our documentation. (values: -1 - Use client configuration settings for determining the exemption type. 0 - Transaction will be performed with no exemption. 1 - (Chase) Transaction will be performed with low value exemption.) | ||||||||||||||||||||||||||||
| mandate_collection_method |
Use this field to specify how the customer will authorize the mandate for direct debit collection. It is required for ACH, SEPA, and BACS. If the the mandate is collected online, the customer IP address and useragent must be collected and passed in the collection API. If offline, you must collect and maintain the authorization in your records. This is applicable for Stripe Payment Processor. Allowed values:
|
||||||||||||||||||||||||||||
| end_user_ip_address | IP address that was used for placing an online order. | ||||||||||||||||||||||||||||
| end_user_browser_agent | Browser that was used for placing an online order. Some examples might include "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0". | ||||||||||||||||||||||||||||
| bank_acct_holder_type |
The type of entity that holds the account. This is applicable for Stripe Payment Processor. Allowed values:
|
||||||||||||||||||||||||||||
| kount_session_id | kount_session_id is a unique identifier generated by Kount, a fraud prevention and risk management platform for Evertec. |
pi_coupon_codes fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| coupon_code | No | |||
| assignment_scope | No |
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. |
|
| proration_result_amount | double | No |
The currency amount of any resulting proration action performed as a result of the requested plan change. For plan assignments with an assignment directive of '1' (perform on anniversary date), or '2' (honor client default proration action) when the default configuration is to not do proration, or '3' (force no proration), the value returned in this field will always be '0'. When proration is performed the value returned in this field will either be a positive currency value (indicating a resulting charge to the account) or a negative currency value (indicating a credit to the account). If the value passed in field do_write is false then any positive or negative value returned in this field is notational only, demonstrating what proration effect would be applied to the account if the requested plan assignment/de-assignment were to be actually performed. |
|
| collection_error_code | long | No |
If a collection is attempted, returns the error code associated with the collection. |
|
| collection_error_msg | string | No |
The error message associated with collection_error_code. |
|
| statement_error_code | long | No |
The error code if statement generation fails. |
|
| statement_error_msg | string | No |
The text message associated with 'statement_error_code' |
|
| proc_cvv_response | string | No |
The processor return code from CVV validation. |
|
| proc_avs_response | string | No |
Processor return code from address validation |
|
| proc_cavv_response | string | No |
The processors return code for security validation. |
|
| proc_status_code | string | No |
The processor status code |
|
| proc_status_text | string | No |
The processors status description |
|
| proc_payment_id | string | No |
The processor payment ID |
|
| proc_auth_code | string | No |
Authorization code provided by the issuing bank |
|
| proc_merch_comments | string | No |
Additional information passed to payment processor |
|
| proc_initial_auth_txn_id | string | 100 | No |
Transaction ID from payment processor. If received as part of an auth request, it must be retained for future settlement and match the value from the auth response. It should also be used for future recurring transaction auths/settlement. |
| invoice_no | long | No |
The Aria-assigned unique identifier of a given invoice. |
|
| expectd_activation_fee | double | No |
The activation fee the account holder can expect based on the activation fees of the plans on this invoice |
|
| expectd_mthly_recurring_cost | double | No |
Regardless of the billing interval on the account, the monthly recurring cost of this change |
|
| expectd_annu_recurring_cost | double | No | ||
| acct_plan_line_items | object | No | ||
| total_charges_before_tax | double | No |
Total amount to be charged to the account before taxes have been calculated. |
|
| total_tax_charges | double | No |
Total taxes as calculated for the amount of the transaction. |
|
| total_charges_after_tax | double | No |
Total amount to be charged to the account after taxes have been calculated. |
|
| total_credit | double | No |
The total amount of the credit to be applied to the account |
|
| total_tax_credit | double | No |
The tax amount of the credit to be applies |
|
| total_credit_before_tax | double | No |
The credit to be applied before tax is taken into account |
|
| total | double | No |
The grand total of this invoice |
|
| proration_credit_result_amount | double | No |
The total pro-rated credit amount |
|
| proration_credit_amount | double | No |
The non-tax pro-rated credit amount |
|
| proration_tax_amount | double | No |
The pro-rated tax credit amount |
|
| 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. |
|
| plan_instance_queue | object | No |
This array contains a list of queued plans, their identifier, and type. |
|
| proc_payment_response_field_list | object | No |
Payment response fields returned by the processor for further actions if any. |
acct_plan_line_items fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| service_no | No | |||
| client_service_id | No | |||
| po_num | No |
third_party_errors fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| error_class | No | |||
| error_code | string | 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. |
plan_instance_queue fields
| Name | Type | Length | Required | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| queue_id | long | No |
Aria queue_id for future plan changes that can be used for follow on actions. |
|||||||||||||
| queue_type_ind | long | No |
This designates the type of queued action. Allowed values:
|
|||||||||||||
| plan_instance_no | long | No |
Aria plan instance number |
proc_payment_response_field_list fields
| 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. |