Skip to main content
Aria Knowledge Central

get_cash_credits_details_m Sample Call and Response

This example shows a client retrieving the details of the cash credits recorded on one account, based on the get_cash_credits_details_m method defined in plsql_m_r73.yml. This method also returns the details of the charges to which each cash credit was applied.

The example requests all cash credits on the account rather than a single credit by transaction_id. It does not cover a request scoped to one specific cash credit transaction.

Sample call

{
  "rest_call": "get_cash_credits_details_m",
  "output_format": "json",
  "client_no": 4009,
  "auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "acct_no": 3300145
}

The acct_no field and the client_acct_id field form an alternative-required pair; this example supplies acct_no and omits client_acct_id. The transaction_id field is optional and, when omitted as in this example, Aria returns every cash credit on the account rather than one specific credit. The rest_call and output_format fields are added by the REST layer.

Sample response

{
  "error_code": 0,
  "error_msg": "",
  "cash_credits": [
    {
      "credit_no": 44201,
      "created_by": "csr.jsmith",
      "created_date": "2026-06-15 10:22:00",
      "amount": 42.75,
      "reason_code": 5,
      "reason_text": "Prorated credit for mid-cycle plan downgrade.",
      "origin_master_plan_instance_no": 990011,
      "origin_plan_instance_no": 990011,
      "origin_plan_name": "Premium Streaming Plan",
      "origin_proration_remaining_days": "12",
      "origin_adv_billing_period_total_days": "30",
      "origin_invoice_no": 9004521,
      "origin_service_no": 61023,
      "origin_service_name": "Monthly Subscription Fee",
      "origin_plan_action_details": "Plan units downgraded from 3 to 1.",
      "applied_cash_credits": [
        {
          "service_no": 61023,
          "service_name": "Monthly Subscription Fee",
          "transaction_type": 1,
          "transaction_name": "Invoice",
          "applied_transaction_id": 9004610,
          "applied_amount": 42.75
        }
      ]
    },
    {
      "credit_no": 44255,
      "created_by": "csr.mkeller",
      "created_date": "2026-07-01 09:05:00",
      "amount": 15.00,
      "reason_code": 9,
      "reason_text": "Goodwill credit for service interruption.",
      "origin_plan_action_details": "Manual goodwill adjustment; no originating plan action."
    }
  ]
}

An error_code value of zero together with an empty error_msg indicates that Aria found and returned the account's cash credit details successfully. The cash_credits field is an array because an account can accumulate more than one cash credit; this example shows two entries, one credit generated automatically from a mid-cycle plan downgrade and one manual goodwill credit, but a real account could have none, one, or many more. The first credit's nested applied_cash_credits array shows the charge to which that credit was applied; the transaction_type value of one indicates an invoice, one of several allowable transaction type values described in a separate legend. The second credit has no applied_cash_credits entry because it has not yet been applied against a charge. This example omits the origin_client_mp_instance_id, origin_client_plan_instance_id, and origin_client_service_id fields, all client-defined identifier counterparts to the Aria-assigned identifiers already shown, and it omits the nonpublic out_transaction_id and error_details fields.

TOP
  • Was this article helpful?