Skip to main content
Aria Knowledge Central

apply_cash_credit_m Sample Call and Response

This example shows you how to apply a cash credit against a specific invoice on an account, using the plsql_m_r73.yml definition for release seventy-three of the Aria Billing Cloud Core API.

This example covers a credit targeted at one specific invoice through the specific_invoices array. It does not cover account-level, first-in-first-out credit application through credit_amount, targeting individual charge transactions through specific_transactions, or the applied_cash_credits output array.

Sample call

{
  "rest_call": "apply_cash_credit_m",
  "output_format": "json",
  "client_no": 3001,
  "auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "acct_no": 5544332,
  "credit_reason_cd": 3,
  "comments": "Customer was overcharged on invoice 9012345 due to a pricing configuration error; issuing a corrective credit.",
  "specific_invoices": [
    {
      "invoice_no": 9012345,
      "invoice_credit_amount": 24.99
    }
  ]
}

The specific_invoices field is an array of transaction details, and this example includes one entry that targets a single invoice; you could include additional entries to spread a credit across more than one invoice. Because this example targets a specific invoice, it omits the credit_amount field, which the description states applies only when neither specific_invoices nor specific_transactions is supplied, and it also omits specific_transactions, which is an alternative way to target individual charge transactions rather than whole invoices. The credit_reason_cd field uses the enumerated value three, meaning a billing or pricing issue; other allowable values cover reasons such as inadequate service delivery, customer dissatisfaction, or system testing. The comments field is optional and documents why the credit was issued.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "credit_no": 771102,
  "created_by": "csr_jsmith",
  "created_date": "2026-07-24 09:14:00",
  "amount": 24.99,
  "reason_code": 3,
  "reason_text": "Billing / pricing issue"
}

An error_code value of zero, together with an error_msg value of "OK", indicates that Aria applied the cash credit successfully. The credit_no field identifies the newly created cash credit, and created_by and created_date identify who applied it and when. The amount, reason_code, and reason_text fields echo back the applied credit details. This example leaves out the applied_cash_credits array, which this method's own definition marks as unused, so Aria does not populate it, and it also leaves out out_transaction_id, which Aria marks nonpublic. The error_details field is likewise nonpublic and is left out entirely.

TOP
  • Was this article helpful?