Skip to main content
Aria Knowledge Central

create_order_m Sample Call and Response

This example shows a typical call to create_order_m for an existing account, adding one non-subscription order line item and charging a new credit card immediately, along with a representative response. The example 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; it does not include every optional field this method accepts, such as the contacts, fraud control, processor field override, and installment-related fields.

Sample call

{
  "rest_call": "create_order_m",
  "output_format": "json",
  "client_no": 10023,
  "auth_key": "8f3e2b1a9c7d4e6f0a1b2c3d4e5f6789",
  "acct_no": 3300457,
  "plan_instance_no": 8801122,
  "client_order_id": "ORD-2026-000482",
  "bill_immediately": 1,
  "order_line_items": [
    {
      "client_sku": "NSO-STARTER-KIT",
      "units": 1,
      "amount": 49.99,
      "client_order_line_id": "LINE-1",
      "line_comments": "Starter kit add-on requested by the customer."
    }
  ],
  "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": "Add-on purchase 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 order is billed under the master plan instance identified by plan_instance_no rather than by the alternative client-defined client_plan_instance_id. The bill_immediately value of one means Aria fulfills and bills the order immediately; other values allow you to fulfill now but bill on the next anniversary date, hold the order for later approval, or fulfill and bill on a specified fulfillment date. The order_line_items field is an array of the items on the order, and this example includes one line item identifying a non-serialized offering by its client-defined client_sku; a real order could include several line items. 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; omitting alt_pay_method and the card fields entirely would instead bill the account's existing payment method. This example leaves out the deprecated unit_discount_amount field on the order line item, which Aria no longer supports.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "order_no": 5589217,
  "invoice_no": 8827341,
  "total_charges_before_tax": 49.99,
  "total_tax_charges": 4.37,
  "total_charges_after_tax": 54.36,
  "total_credit": 0,
  "proc_status_code": "000",
  "proc_status_text": "Approved",
  "proc_auth_code": "A1B2C3",
  "proc_avs_response": "Y",
  "proc_cvv_response": "M",
  "cart_invoice_line_items": [
    {
      "line_no": 1,
      "service_no": 48213,
      "service_name": "Starter Kit",
      "line_units": 1,
      "rate_per_unit": 49.99,
      "line_amount": 49.99,
      "description": "Starter Kit add-on",
      "plan_no": 8801122,
      "plan_name": "Premium Monthly Plan",
      "line_type": 1
    }
  ],
  "tax_details": [
    {
      "tax_detail_line": 1,
      "seq_num": 1,
      "taxed_seq_num": 1,
      "debit": 4.37,
      "tax_authority_level": 1,
      "tax_rate": 0.0875,
      "tax_srv_tax_type_id": "SALES",
      "tax_srv_tax_type_desc": "State Sales Tax",
      "tax_srv_juris_nm": "California"
    }
  ]
}

An error_code of zero and an error_msg of "OK" indicate that Aria created and billed the order successfully; a nonzero error_code would instead carry a descriptive error_msg, and most of the fields shown here would be absent. The cart_invoice_line_items array lists all of the items on the order, and the tax_details array lists one entry per tax jurisdiction applied; this example shows one representative entry in each, and an order with more line items or multiple tax jurisdictions would return more entries in each array. This example omits the deprecated transaction_id and invoicing_error_code output fields, which Aria no longer supports, along with third_party_errors, proc_fraud_filtering_info, threshold_billing_errors, proc_payment_response_field_list, and installment_schedule_info, since none of those conditions apply to this example: no third-party tax engine errors, no fraud review, no threshold billing issues, no processor-requested follow-up action, and no installment plan.

TOP
  • Was this article helpful?