bcgov / bcgov/entity

Non Gov - Disbursement reversals

Open
#33,870 1 comment 0 reactions 0 assignees View on GitHub
Epic Pay
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

# Refund Recovery for Non-Government Partners

## Problem

Non-government partners receive funds via EFT instead of GL code disbursements. Once funds have been disbursed, a subsequent customer refund leaves BC Registries temporarily covering the refund amount.

We need a mechanism to recover these funds from the partner.

### Current Flow

```
Customer Payment

BC Registries GL

Disbursement Job

CAS AP Payment

Partner EFT
```

If a refund occurs after disbursement, the money must be collected back from the partner.

## Proposed Solution

Use **CAS Accounts Receivable (AR) invoices** to recover refunded amounts.

Partners will need to:
* Be set up as customers in CAS.
* Provide account, party, and site information.
* Link their bank account for AR collections.

These details will be stored in the `non_gov_disbursement_config` table.

## Refund Recovery Flow

A daily job will:

1. Identify refunds for transactions whose funds have already been disbursed.
2. Create an AR invoice in CAS for the refund amount.
3. CAS will debit the partner's bank account and credit the BC Registries GL account.

```
Refund

Daily Recovery Job

CAS AR Invoice

Partner Bank Account

BC Registries GL
```

## Settlement Processing

CAS publishes settlement files to FTP. During settlement processing, Pay will:

* Read AR invoice settlement records.
* Update the invoice status.
* Create receipt records using the existing receipt table with a separate type/status for AR invoice receipts.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the non_gov_disbursement_config table, the daily recovery job, and the existing receipt table. Trace how refunds and disbursement status are represented, then review settlement files from FTP. Done means eligible refunds produce CAS AR invoices and settlement processing updates invoice status and creates appropriately typed receipt records.

Written by the indexing model from the issue text.

Assessment

Domain
backend, database, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.