# Payment Request Overview

If you are using Maica to help automate your claiming processes, `Payment Request` records are going to be part of your day-to-day work.  If you are not using Maica in a claiming capacity, then `Payment Request` records will **not be created** and you can move on to the next section of this Knowledge Base!

Put very simply, the `Payment Request` record represents an attempt to claim a specific amount of money (the `Claimed Amount`) from PRODA.  These records will be **dynamically** created, regardless of your nominated [Claim Method](https://kb.maica.com.au/general-information/client-management-settings/claim-management) (API or BPR File), however, the `Claim Method` will impact how these `Payment Request` records are updated with the resulting claim information, i..e `Status` and `Paid Amount`.  More on all that is in the article below.

A `Payment Request` record is where you can find the following information and functionality:

* Claimed Amount and Date
* Paid Amount and Date
* NDIS Claim Information (NDIS Reference, Claim Reference, Last Sync Date (API only))
* Claimed Support Item
* Error Details / Rejection Reason (if rejected)
* Related ABA Export record

## Field Summary

The table below summarises the key fields you will find on the `Payment Request` record.

<table><thead><tr><th width="244">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>Claimed Amount</code></td><td>The Amount submitted to PRODA for Claiming.  This value is taken from the <code>Invoice Line Item</code>.<code>Claim Balance</code> at the time of creation.</td></tr><tr><td><code>Claim Date</code></td><td>The date the claim was submitted to PRODA.  Set to <code>TODAY</code></td></tr><tr><td><code>Reject Reason</code></td><td>If the <code>Payment Request</code> was rejected by PRODA, this field represents the reason (<code>reason code</code>) they provide. </td></tr><tr><td><code>Paid Amount</code></td><td><p>The actual amount paid by PRODA.  This may be different to the <code>Claimed Amount</code>.  This is populated based on the Claim Method:<br><strong>API</strong>: populated via the Remittance Notification<br><strong>BPR File</strong>: populated via the BPR Remittance File </p><p>import</p></td></tr><tr><td><code>Paid Date</code></td><td><p> The date the <code>Paid Amount</code> was paid by PRODA.  This is populated based on the Claim Method:<br><strong>API</strong>: set to the date the Remittance Notification was received<br><strong>BPR File</strong>: set to the date the BPR Remittance File </p><p>import was processed</p></td></tr><tr><td><code>Not Paid Amount</code></td><td>Formula field representing the amount not paid by PRODA, or the <code>Claimed Amount</code> less the <code>Paid Amount</code>.<br><br>IF(ISBLANK( <code>maica__Claimed_Amount__c</code> ), 0, <code>maica__Claimed_Amount__c</code> - <code>maica__Paid_Amount__c</code>)</td></tr><tr><td><code>ABA Export</code></td><td>The <code>ABA Export</code> that the <code>Payment Request</code> has been included in.  You can learn more about that <a href="aba-file-generation">here</a>.</td></tr><tr><td><code>NDIS Reference</code></td><td>The identifier or reference assigned to the <code>Payment Request</code> once it has been submitted for claiming via the API.  This is provided in the response from the API and populated in Salesforce.<br><br>Note: to ensure consistency in the Payment Request records, the NDIS Reference will be populated with the Claim Reference when Claim Method = BPR File</td></tr><tr><td><code>Claim Reference</code></td><td>Formula field that generates a unique value that is used to identify the <code>Payment Request</code> in the BPR File claiming process.</td></tr><tr><td><code>Claim Reference Index</code></td><td>Replica of the <code>Claim Reference</code> field but created as a Text (External ID) field to leverage Salesforce indexing and support working with large data volumes.  Managed via a Maica Trigger.</td></tr><tr><td><code>Last NDIS Sync</code></td><td>The date and time of the last sync with PRODA.  Populated only when the Claim Method = API.</td></tr><tr><td><code>Error Details</code></td><td>Stores the details of any unexpected errors returned in the API submission to PRODA.  Populated only when the Claim Method = API.</td></tr></tbody></table>

## Payment Request Status Definition

The table below breaks down each `Payment Request` `Status` value and how it is managed.

<table><thead><tr><th width="192">Status</th><th>Description</th><th>Logic</th></tr></thead><tbody><tr><td><code>Failed</code></td><td>The <code>Payment Request</code> has not been successfully submitted for processing to PRODA.</td><td>Set via the API response from PRODA.  Not applicable when Claim Method = BPR File.</td></tr><tr><td><code>Incomplete</code></td><td>The <code>Payment Request</code> has been returned from PRODA as it considers details missing.  Please review/amend and resubmit using the <strong>Claim</strong> button at the <code>Invoice</code> level.</td><td>Set via the API response from PRODA.  Not applicable when <code>Claim Method</code> = BPR File.</td></tr><tr><td><code>Awaiting Approval</code></td><td>The <code>Payment Request</code> has been submitted to PRODA and Maica is awaiting a response.</td><td>The <code>Payment Request</code> will be set to this <code>Stat</code>us following the BPR File export.  Not generally applicable when Claim Method = API as the response is real-time.</td></tr><tr><td><code>Pending Payment</code></td><td>The <code>Payment Request</code> has been accepted/approved by PRODA and Maica is awaiting payment confirmation.</td><td>When Claim Method = BPR File, the <strong>Results</strong> file import will set this Status for all <code>SUCCESSFUL</code> rows in the file.</td></tr><tr><td><code>Cancelled</code></td><td>The Payment Request has been cancelled by a Maica user via the Credit Management QA (at the <code>Invoice</code> level) or the Cancel QA at the (<code>Payment Request</code> level).</td><td>Applies only when the Credit Management Quick Action is used at the <code>Invoice</code> level OR the <code>Payment Request</code> has been updated directly using the Cancel QA (defined below).</td></tr><tr><td><code>Rejected</code></td><td>The <code>Payment Request</code> has been rejected by PRODA.</td><td>When Claim Method = BPR File, the <strong>Results</strong> file import will set this Status for all <code>ERROR</code> rows in the file.</td></tr><tr><td><code>Paid</code></td><td>The Amount (from the <code>Paid Amount</code> field) has been processed by PRODA.</td><td></td></tr></tbody></table>

## Cancel Payment Request QA

Not all `Payment Request` records that are submitted to PRODA as part the **BPR File Claiming** process are successful.  You will at times receive an error in your BPR Response file where you may need to address the issue directly within PRODA.

In this scenario, once you have made the necessary updates in PRODA, you then need to **Cancel** the existing `Payment Request` in Salesforce to support reclaiming.  You can do this by simply by clicking the Cancel Quick Action in the Payment request record header.

<figure><img src="https://558904096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKdn9R0jFmixyPeVowFpF%2Fuploads%2F8wrDuXr1RukEKsvdTgZy%2Fimage.png?alt=media&#x26;token=869b41e9-ddfc-4b78-a944-ed2f91ee98e5" alt=""><figcaption><p>The Cancel Quick Action on the Payment Request record</p></figcaption></figure>

Once you click **Cancel**, you will be presented with the modal below.  Select the appropriate `Reject Reason` and be sure to add any `Error Details` in the textbox to keep a record in Salesforce of the Error and what was done to rectify it.

<figure><img src="https://558904096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKdn9R0jFmixyPeVowFpF%2Fuploads%2FVQlec7jesQ5RkChtv4rk%2Fimage.png?alt=media&#x26;token=f0257f64-9fae-4283-83a0-5d390170fdca" alt=""><figcaption><p>Cancel Payment Request Quick Action</p></figcaption></figure>

Once you click **Save**, the `Payment Request` `Status` will be set to `Cancelled` and the `Reject Reason` and `Error Details` will be saved also.

{% hint style="warning" %}
You should not **Cancel** any `Payment Request` in the `Status` of `Awaiting Approval` if you have **not uploaded** the BPR Results file.
{% endhint %}

<figure><img src="https://558904096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKdn9R0jFmixyPeVowFpF%2Fuploads%2F4g6frcTXO83YKVYzyrLb%2Fimage.png?alt=media&#x26;token=aa02157b-98cc-4068-b5e6-beb45ba5f4c7" alt=""><figcaption><p>Completing the Cancel process</p></figcaption></figure>
