apply_cash_credit_m
Summary
| API Name | apply_cash_credit_m |
|---|---|
| Class | transaction_services_m |
| Update Version | 34 |
Description
Applies a cash credit (a monetary adjustment that reduces the account balance) to an account, a specific invoice, or specific invoice line-item charges. Cash credits can be targeted at the account level (applied FIFO against outstanding charges), at a specific invoice (using the specific_invoices array), or at individual charge transactions (using the specific_transactions array). Use credit_amount for account-level FIFO application, or the array inputs for targeted application. The credit is recorded with a reason code (configured under Finance > Reason Codes in the Aria UI) and optional comments for audit purposes. Returns the credit_no and details of how the credit was applied across charges.
Inputs
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| client_no | long | 22 | Yes |
Aria-assigned unique identifier indicating the Aria client providing service to this account. |
| auth_key | string | 32 | Yes |
Aria-assigned unique key for authenticating the validity of the requestor. This key is passed with each method call. |
| acct_no | long | 22 | Yes |
Aria-assigned account identifier. This value is unique across all Aria-managed accounts. Alternative required field: client_acct_id |
| credit_reason_cd | long | 22 | Yes |
The reason for providing the cash credit. Refer to reason codes developed by the client for cash credits via the > Finance > Reason Codes tabs in the Aria UI. |
| comments | string | 300 | No |
Additional explanatory text relating to this API call. |
| credit_amount | double | 12 | No |
The amount of cash credit applied against FIFO charges. This input is used only when specific_invoices, or specific_transactions input fields are not specified. |
| specific_invoices | object | No |
Array of transaction details. |
|
| specific_transactions | object | No |
Array of transaction details. |
|
| client_acct_id | string | 50 | Yes |
Client-defined account identifier. Alternative required field: acct_no |
specific_invoices fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| invoice_no | long | No |
The invoice number is used to identify object to which credit are applied. |
|
| invoice_credit_amount | double | 12 | No |
The amount of credit to be applied against the invoice_no. |
specific_transactions fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| transaction_id | long | 22 | No |
The transaction ID is used to identify object to which credit will be applied. |
| trans_credit_amount | double | 12 | No |
The amount of credit to be applied aginst the transaction_id. |
Outputs
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| error_code | long | No |
Aria-assigned error identifier. 0 indicates no error. |
|
| error_msg | string | No |
Description of any error that occurred. "OK" if there was no error. |
|
| credit_no | long | 22 | No |
The cash credit number. |
| created_by | string | No |
User ID that created the transaction. |
|
| created_date | string | 32 | No |
Specifies the date that credit was created. This includes timestamp in 'yyyy-mm-dd HH24:MI:SS' format. |
| amount | double | 12 | No |
The amount of the cash credit. |
| reason_code | long | No |
Reason code for the cash credit. |
|
| reason_text | string | No |
Text description for the reason. |
|
| applied_cash_credits | object | No |
Array that contains cash credit application details. |
applied_cash_credits fields
| Name | Type | Length | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| service_no | long | No |
The service number for the cash credit application. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| service_name | string | No |
The service name for the cash credit application. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| client_service_id | string | No |
The Client-defined service number for the cash credit application. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transaction_type | long | 3 | No |
Transaction type to search account history for. Allowed values:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transaction_name | string | No |
The transaction type for account level application of the cash credit. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| applied_transaction_id | long | No |
The transaction number for account level application of the cash credit. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| applied_amount | double | No |
The amount of the cash credit applied to the above. |