get_payment_plan_terms_m Sample Call and Response
This example shows a client retrieving the list of active client-level payment plan terms, including both the independent term created in a companion create_payment_plan_term_m example and an aligned term tied to a master plan instance’s billing schedule. It is based on the get_payment_plan_terms_m method as defined in methods_m_r73.yml, Admin Tools API. This method retrieves existing payment plan terms; it is distinct from create_payment_plan_term_m, which defines a new term, and from edit_payment_plan_term_status_m, which only flips a term’s active or inactive status.
This example covers the optional status_filter argument and a representative payment_plan_term_list response containing one independent term and one aligned term. It does not cover filtering by a specific client_payment_plan_term_id, and it does not show every payment plan term a client could have on file.
Sample call
{
"rest_call": "get_payment_plan_terms_m",
"output_format": "json",
"client_no": 700123,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"status_filter": 0
}
The rest_call and output_format fields are not part of the method’s own documented arguments. The REST layer adds them to every call: rest_call names the method being invoked, and output_format requests a JSON response rather than the default WDDX format. Within the method’s own arguments, client_no and auth_key identify and authenticate the client making the call, and both come from the shared param_defaults block. client_payment_plan_term_id is left out of this call, so the response is not narrowed to one specific term. status_filter is set to 0, meaning only active terms are returned; this is also the default behavior when status_filter is not supplied at all, and the other allowable value, 1, would return both active and inactive terms.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"payment_plan_term_list": [
{
"payment_plan_term_no": 5501,
"client_payment_plan_term_id": "GOLD-12MO",
"payment_plan_term_name": "Gold 12-Month Payment Plan",
"payment_plan_term_description": "Twelve-month independent payment plan for gold-tier equipment purchases.",
"payment_plan_term_type": 0,
"payment_plan_term_length": 12,
"payment_plan_term_period_type": "M",
"payment_plan_term_interval": 1,
"payment_plan_term_lump_sum_type": "P",
"payment_plan_term_lump_sum_amount": 50.00,
"payment_plan_term_lump_sum_amount_type": "F",
"client_sku": "SKU-FEE-GOLD12",
"status": "Active"
},
{
"payment_plan_term_no": 5502,
"client_payment_plan_term_id": "SILVER-ALIGNED",
"payment_plan_term_name": "Silver Aligned Payment Plan",
"payment_plan_term_description": "Payment plan aligned with the master plan instance's anniversary billing schedule.",
"payment_plan_term_type": 1,
"payment_plan_term_length": 6,
"payment_plan_term_period_type": null,
"payment_plan_term_interval": null,
"payment_plan_term_lump_sum_type": null,
"payment_plan_term_lump_sum_amount": null,
"payment_plan_term_lump_sum_amount_type": null,
"client_sku": null,
"status": "Active"
}
]
}
An error_code of zero, paired with an error_msg of “OK,” indicates that Aria retrieved the payment plan term list successfully. payment_plan_term_list is a repeatable array; this example shows two representative entries, but a client with more defined terms would see additional entries following the same structure. The first entry is the independent, twelve-month term from the create_payment_plan_term_m example, with payment_plan_term_type of 0 and its period type, interval, and lump sum fields populated. The second entry has payment_plan_term_type of 1, meaning it is aligned with an existing master plan instance rather than independent; payment_plan_term_length of 6 for an aligned term means the payment plan amount is spread across six statements rather than six months, and payment_plan_term_period_type, payment_plan_term_interval, the lump sum fields, and client_sku are all null because those fields apply only to independent terms. Both entries show a status of “Active,” consistent with the status_filter of 0 used on the call; a call with status_filter set to 1 could also return entries with a status of “Inactive.”