Skip to main content
Aria Knowledge Central

get_reversible_invs_by_payment_m Sample Call and Response

This example retrieves the invoice transactions that a specific payment fully or partially paid, based on the plsql_m_r73.yml definition file for release seventy-three.

This example includes every required field and the optional field that controls which invoice-related structures the response returns, not every field the method accepts.

Sample call

{
    "rest_call": "get_reversible_invs_by_payment_m",
    "output_format": "json",
    "client_no": 92310,
    "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
    "acct_no": 300587421,
    "payment_transaction_id": 6612044,
    "include_open_trans": 1
}

The rest_call and output_format fields form the envelope that the REST layer adds to every call. The acct_no field is one side of an alternative-field pair with client_acct_id; this example uses the Aria-assigned acct_no. The payment_transaction_id field is required and identifies the payment whose invoice transactions this call retrieves. The include_open_trans field is set to 1, meaning the response includes the refund_open_trans array in addition to the reversible_inv_trans array; a value of zero, the default, excludes refund_open_trans, and a value of 2 would return only refund_open_trans and exclude reversible_inv_trans.

Sample response

{
    "error_code": 0,
    "error_msg": "OK",
    "reversible_inv_trans": [
        {
            "invoiced_acct_no": 300587421,
            "invoice_no": 998214,
            "invoice_line_no": 1,
            "invoice_trans_id": 5540112,
            "invoice_trans_date": "2026-05-01",
            "invoice_trans_description": "Premium Streaming Service - Monthly Fee",
            "invoice_trans_amount": 89.99,
            "inv_trans_reversed_amount": 0.00,
            "inv_trans_reversible_amount": 89.99,
            "invoice_trans_is_recur_service": 1,
            "invoice_trans_recur_start_date": "2026-05-01",
            "inv_trans_payment_applied_amount": 89.99
        },
        {
            "invoiced_acct_no": 300587421,
            "invoice_no": 998214,
            "invoice_line_no": 2,
            "invoice_trans_id": 5540113,
            "invoice_trans_date": "2026-05-01",
            "invoice_trans_description": "Standard Support Plan - Monthly Fee",
            "invoice_trans_amount": 60.00,
            "inv_trans_reversed_amount": 0.00,
            "inv_trans_reversible_amount": 60.00,
            "invoice_trans_is_recur_service": 1,
            "invoice_trans_recur_start_date": "2026-05-01",
            "inv_trans_payment_applied_amount": 60.00
        }
    ],
    "refund_open_trans": [
        {
            "transaction_id": 5540098,
            "invoice_no": 998177,
            "invoice_line_no": 1,
            "date_created": "2026-04-01 09:00:00",
            "description": "Prior-month recurring fee reopened for a partial refund with opening line items",
            "remaining_amt_to_open": 15.00
        }
    ]
}

An error_code value of zero and an error_msg value of “OK” indicate that the call succeeded. The reversible_inv_trans array holds one entry per invoice line item that the specified payment paid; this example shows two representative entries, both from invoice 998214, and a real payment could apply to more or fewer lines. The refund_open_trans array holds one entry per transaction available to reopen through a refund with opening line items; this example shows one representative entry, and a real payment could have more such transactions available or none at all. The error_details field is left out because it is marked nonpublic in the shared param_defaults block.

TOP
  • Was this article helpful?