create_order_with_plan_m Sample Call and Response
This example combines a one-time order and a supplemental plan assignment on a single invoice: it assigns a new Priority Support add-on plan to an existing master plan instance and adds a one-time setup fee item, billing both immediately with a new credit card. It is based on the plsql_m_r73.yml definition file.
This example includes every required field and a representative set of commonly used optional fields for combining an order with a supplemental plan assignment; it does not cover plan cancellation or replacement scenarios, the multiple_coupons array, or the installment-related fields on the order line item.
Sample call
{
"rest_call": "create_order_with_plan_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "8f3e2b1a9c7d4e6f0a1b2c3d4e5f6789",
"acct_no": 3300457,
"parent_plan_instance_no": 8801122,
"supp_plan_no": 45210,
"supp_plan_units": 1,
"assignment_directive": 2,
"bill_immediately": 1,
"order_line_items": [
{
"client_sku": "NSO-SETUP-FEE",
"units": 1,
"amount": 29.99,
"client_order_line_id": "LINE-1",
"line_comments": "One-time setup fee for the new Priority Support add-on."
}
],
"client_order_id": "ORD-2026-000512",
"alt_pay_method": 1,
"cc_number": "4111111111111111",
"cc_expire_mm": 11,
"cc_expire_yyyy": 2028,
"cvv": "123",
"bill_first_name": "Jordan",
"bill_last_name": "Rivera",
"bill_address1": "500 Market Street",
"bill_city": "San Francisco",
"bill_state_prov": "CA",
"bill_zip": "94105",
"bill_country": "US",
"bill_email": "jordan.rivera@example.com",
"order_comments": "Adding the Priority Support plan with a one-time setup fee, requested through support chat."
}
The rest_call and output_format fields are envelope fields added by the REST layer rather than fields documented on the method itself. The account is identified by acct_no, the Aria-assigned numeric account identifier, rather than by the alternative client-defined client_acct_id. The parent_plan_instance_no field identifies the existing master plan instance that anchors the new supplemental plan in the plan instance hierarchy; supp_plan_no identifies the supplemental plan being assigned, and supp_plan_units sets its unit quantity. The assignment_directive value of two is this method's default: it performs the plan assignment immediately, honoring the client's pre-configured universal proration rule. This method supports only a subset of the assignment directive values available elsewhere in the Core API, ranging from two through six; unlike the general-purpose directive field, it does not offer an anniversary-aligned option, since this method always acts immediately. The order_line_items field is an array of the items on the order; this example includes one line item for a one-time setup fee, identified by its client-defined client_sku. The bill_immediately value of one bills both the order and the plan assignment together on the same invoice right away. The alt_pay_method value of one directs Aria to charge the new credit card supplied in this call, identified by cc_number, cc_expire_mm, cc_expire_yyyy, and cvv, rather than the account's payment method on file.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"order_no": 5589301,
"invoice_no": 8827402,
"total_charges_before_tax_2": 44.98,
"total_tax_charges_2": 3.94,
"total_charges_after_tax_2": 48.92,
"total_credit_2": 0,
"proc_status_code": "000",
"proc_status_text": "Approved",
"proc_auth_code": "B4C5D6",
"proc_avs_response": "Y",
"proc_cvv_response": "M",
"cart_inv_line_items": [
{
"line_no": 1,
"service_no": 48311,
"service_name": "Priority Support",
"line_units": 1,
"rate_per_unit": 14.99,
"line_amount": 14.99,
"description": "Priority Support monthly plan charge",
"plan_instance_no": 8801199,
"plan_name": "Priority Support Add-on",
"client_service_id": "PRIORITY-SUPPORT"
}
]
}
An error_code of zero and an error_msg of "OK" indicate that Aria created the order, assigned the supplemental plan, and billed both successfully. This method reports invoice totals through total_charges_before_tax_2, total_tax_charges_2, total_charges_after_tax_2, and total_credit_2 rather than through the similarly named total_charges_before_tax, total_tax_charges, total_charges_after_tax, and total_credit fields, which are deprecated on this method. The cart_inv_line_items array lists all of the items and plan charges on the invoice; this example shows one representative entry for the new Priority Support plan charge, and the same invoice would also include a second entry for the one-time setup fee line item shown in the call. This example omits the deprecated transaction_id and invoicing_error_code output fields, along with the current invoicing_error_code_2, invoicing_error_msg, statement_error_code, statement_error_msg, collection_error_code, and collection_error_msg fields, since this example encountered no invoicing, statement, or collection errors, and it omits third_party_errors, proc_fraud_filtering_info, threshold_billing_errors, plan_instance_queue, proc_payment_response_field_list, and installment_schedule_info, since none of those conditions apply to this example.