assign_acct_plan_m Sample Call and Response
This example shows you how to assign a new master subscription plan to an account, using the plsql_m_r73.yml definition for release seventy-three of the Aria Billing Cloud Core API.
This example covers assigning a master plan with a client-defined plan instance identifier, an existing payment method, an alternate start date, prorated invoicing, and a purchase order number. This method accepts a very large number of optional fields covering billing groups, statement and billing contacts, dunning, coupons, non-subscription offering items, and payment instrument details; this example leaves out all of those to keep the story focused on the core plan assignment, and lists the major omitted sections in the notes below.
Sample call
{
"rest_call": "assign_acct_plan_m",
"output_format": "json",
"client_no": 3001,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"acct_no": 5544332,
"new_plan_no": 220145,
"client_plan_instance_id": "PI-2026-0071",
"existing_primary_payment_method_no": 60219,
"notify_method": 1,
"alt_start_date": "2026-08-01",
"invoicing_option": 2,
"assignment_directive": 2,
"plan_units": 1,
"po_num": "PO-88213",
"comments": "Customer upgraded from the Standard plan to the Professional plan effective next billing cycle."
}
The new_plan_no field identifies the plan being assigned rather than the alternative new_client_plan_id. The existing_primary_payment_method_no field reuses a payment method already on file for the account rather than supplying new card or bank details, so this example omits all of the payment instrument fields, such as cc_number, bank_acct_no, and iban. The notify_method field uses the enumerated value one, meaning HTML email, which is also the default when this field is omitted. The invoicing_option field uses the enumerated value two, meaning perform prorated invoicing; other allowable values are one for full invoicing, three to use the client default, and four for none. The assignment_directive field uses the enumerated value two, its default, meaning Aria performs the plan change immediately while honoring the client's pre-configured universal proration rule. The alt_start_date field delays the effective start of service to a future date within one billing interval of the plan being assigned.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"plan_instance_no": 8891501,
"invoice_no": 9012400,
"proration_result_amount": 0,
"total_charges_before_tax": 79.99,
"total_tax_charges": 6.40,
"total_charges_after_tax": 86.39,
"total": 86.39
}
An error_code value of zero, together with an error_msg value of "OK", indicates that Aria assigned the plan successfully. The plan_instance_no field identifies the newly created plan instance, and invoice_no identifies the invoice Aria generated for the assignment. Because alt_start_date defers the effective start of the plan to a future anniversary-aligned date rather than triggering a mid-cycle proration, proration_result_amount is zero in this example; the total fields show the full recurring charge, tax, and grand total for the new plan instead. This method returns many additional fields for scenarios not covered by this example, including collection_error_code and collection_error_msg for automatic collection attempts, processor response fields such as proc_avs_response and proc_auth_code for payment authorization details, nso_order_no and nso_order_status_label for bundled non-subscription offering orders, and the acct_plan_line_items array; this example leaves all of those out because the sample call does not exercise payment collection or non-subscription offering purchases.