Skip to main content
Aria Knowledge Central

create_acct_complete_m Sample Call and Response

This example shows a typical call to create_acct_complete_m that creates a new consumer account with one billing group, one payment method (a new credit card), one dunning group, and one master plan subscription, along with a representative response. The example is based on the method definition in plsql_m_r73.yml.

This method accepts far more optional fields and nested groups than shown here (functional and collection account groups, supplemental fields, account-level surcharges and coupon codes, contracts, a separate contacts array, fraud control fields, processor field overrides, email template overrides, and e-invoicing fields, among others). This example includes every field required to create a working account and a representative set of commonly used optional fields, not every field the method accepts.

Sample call

{
  "rest_call": "create_acct_complete_m",
  "output_format": "json",
  "client_no": 10023,
  "auth_key": "8f3e2b1a9c7d4e6f0a1b2c3d4e5f6789",
  "do_write": "True",
  "acct": {
    "client_acct_id": "ACC-2026-000512",
    "userid": "jordan.rivera",
    "first_name": "Jordan",
    "last_name": "Rivera",
    "address1": "500 Market Street",
    "city": "San Francisco",
    "state_prov": "CA",
    "postal_cd": "94105",
    "country": "US",
    "phone": "415-555-0134",
    "email": "jordan.rivera@example.com",
    "acct_currency": "USD",
    "notify_method": 1,
    "dunning_group": [
      {
        "dunning_group_idx": 1,
        "dunning_group_name": "Standard Dunning",
        "client_dunning_group_id": "DUN-STD"
      }
    ],
    "billing_group": [
      {
        "billing_group_idx": 1,
        "billing_group_name": "Primary Billing Group",
        "client_billing_group_id": "BG-PRIMARY",
        "payment_option": "Methods",
        "primary_payment_method_idx": 1
      }
    ],
    "payment_method": [
      {
        "payment_method_idx": 1,
        "pay_method_type": 1,
        "pay_method_name": "Primary Card",
        "first_name": "Jordan",
        "last_name": "Rivera",
        "address1": "500 Market Street",
        "city": "San Francisco",
        "state_prov": "CA",
        "postal_cd": "94105",
        "country": "US",
        "cc_num": "4111111111111111",
        "cc_expire_mm": 11,
        "cc_expire_yyyy": 2028,
        "cvv": "123"
      }
    ],
    "master_plans_detail": [
      {
        "plan_no": 20456,
        "client_plan_instance_id": "PLAN-PREMIUM-001",
        "resp_level_cd": 1,
        "billing_group_idx": 1,
        "dunning_group_idx": 1,
        "plan_instance_units": 1
      }
    ]
  }
}

A few notes on the choices above:

rest_call and output_format are common to every REST call to Aria's Core API. rest_call names the method being invoked (here, create_acct_complete_m), and output_format requests the response in JSON.

Almost the entire request lives inside the acct object, which defines the account being created. Within it, dunning_group and master_plans_detail are the only two nested groups this method requires; every account needs at least one dunning group and one master plan subscription.

billing_group_idx and dunning_group_idx are non-persistent identifiers. They exist only to cross-reference objects created within this same request, not to look up existing records. master_plans_detail assigns its plan instance to the billing group and dunning group defined above it by referencing these same index values (billing_group_idx: 1 and dunning_group_idx: 1). client_billing_group_id and client_dunning_group_id serve the same cross-referencing purpose and can be used in place of the index fields.

plan_no identifies the plan being assigned to the account. Use client_plan_id instead if you track plans by your own identifier; do not send both.

resp_level_cd is set to 1, meaning this master plan instance bills directly under the billing group specified in this request. Values of 2 or 3 instead associate the plan instance with a responsible master plan instance in a parent account, which requires a different set of fields (resp_master_plan_instance_no, resp_client_master_plan_instance_id, or resp_master_plan_instance_idx).

payment_option is set to Methods, meaning the billing group bills through a payment method (the credit card defined in payment_method) rather than through payment terms (invoicing without an on-file payment method). primary_payment_method_idx references the payment method by its own non-persistent index.

pay_method_type is set to 1 for a credit card. Other values cover electronic check, PayPal, tokenized payment methods, and several country-specific payment types.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "out_acct": {
    "acct_no": 3300457,
    "userid": "jordan.rivera",
    "client_acct_id": "ACC-2026-000512",
    "acct_contact_no": 9981122,
    "master_plans_assigned": [
      {
        "plan_instance_no": 8801122,
        "client_plan_instance_id": "PLAN-PREMIUM-001",
        "nso_order_no": 5589217,
        "nso_order_status_label": "Fulfilled"
      }
    ],
    "invoice_info": [
      {
        "invoice_no": 8827341,
        "billing_group_no": 771102,
        "client_billing_group_id": "BG-PRIMARY",
        "proc_status_code": "000",
        "proc_status_text": "Approved",
        "proc_auth_code": "A1B2C3",
        "invoice_charges_before_tax": 49.99,
        "invoice_tax_charges": 4.37,
        "invoice_charges_after_tax": 54.36,
        "invoice_total_amount": 54.36
      }
    ]
  }
}

error_code of 0 with error_msg of "OK" indicates the account was created successfully. A nonzero error_code would instead carry a descriptive error_msg, and most of the fields below it would be absent.

acct_no is the Aria-assigned account number, and acct_contact_no is the Aria-assigned identifier for the account's primary contact record.

master_plans_assigned and invoice_info are both arrays; an account created with more than one master plan or billing group would return more entries in each. master_plans_assigned confirms the plan instance number Aria assigned (plan_instance_no) alongside the client_plan_instance_id supplied in the request. invoice_info reflects the outcome of the initial billing attempt, including the payment processor's response.

This response omits several sections that only appear under specific conditions: billing_contact_details, statement_contact_details, and other_contact_details (returned when contacts differ from the account's primary contact), contract_details and out_contract (contract-based plans), billing_errors and third_party_errors (partial failures), cc_auth_details and payment_method_proc_response (payment method creation failures), chief_acct_info (account hierarchies), plan_unit_instance_details and supp_plans_assigned (multi-unit and supplemental plans), and plan_instance_queue (queued plan changes). None of those conditions apply to this example.

TOP
  • Was this article helpful?