# Before you migrate a LOC portfolio

Complete these steps before beginning the migration process.

## Prerequisites

### 1. Set up a sandbox environment

Create or confirm access to a Peach sandbox environment. You'll use the sandbox to test the full migration workflow with sample loans before running in production.

Sandbox has capacity limits. Migrate no more than **5 loans at a time** in sandbox. Exceeding this limit may cause significant processing delays or migration failures.

### 2. Configure your loan type

Create or confirm a Loan Type for your LOC product. The Loan Type defines interest calculation methods, fee structures, payment schedules, and other product-level rules. You'll reference the Loan Type ID (`loanTypeId`) when creating each loan.

### 3. Configure fee types

If your LOC product charges dynamic fees (late fees, annual fees, draw fees, foreign transaction fees, modification fees), ensure each fee type is configured in Peach with a Fee Type ID. You'll reference these IDs when creating fees during migration.

**Fee type guidance:** Configure the fee types you want Peach to charge going forward with the correct settings. Once the loan migrates, Peach will continue charging these fees according to the loan type configuration. It is also possible to post live fees on the loan during the replay period, so configure fee types that match your production fee structure as closely as possible.

### 4. Prepare your legacy data

Extract the following data from your legacy system. You'll need it throughout the migration process:

- **Borrower data:** Name, date of birth, SSN/identity, contact information (addresses, emails, phone numbers), consent records
- **Loan terms:** Original activation date, credit limit, interest rates (including promo rates if applicable), APR, payment frequency, due date schedule, grace period terms, minimum payment calculation rules
- **Statement history:** Start/end dates, statement dates, due dates, and statement balances for each historical billing cycle
- **Draw data:** Active draws with their individual credit limits, interest rates, and balances
- **Purchase history:** Every purchase with date, amount, merchant details, draw association, and current status
- **Transaction history:** Every payment, service credit, and down payment with date, amount, payment instrument, status, and draw allocation
- **Fee history:** Every fee charged with type, amount, date, and associated draw/purchase
- **Balance snapshot as of the migration cutoff date:** Current balances broken down by due/non-due/overdue for both the line level and each draw, including principal, interest, and each fee type
- **Delinquency data:** Days past due, overdue amounts, date from which account is overdue (if applicable)
- **Payment instruments:** Active and historical bank accounts, cards, and other payment methods


### 5. Plan your migration timing

Migration must be executed within a specific window:

1. The **earliest** you can migrate is immediately after the migration cutoff date (your most recent statement date).
2. The **latest** you should migrate is before the previous period's due date that falls within the migration period.


There is no time limit on the `prepMigration` phase — you can remain in `prepMigration` for as long as needed while you prepare and validate your data. The timing window above applies only to when you call the `POST /migrate` endpoint.

**Example timeline:**

* The previous period runs from Jul 1 through Jul 31
* The statement date is Aug 1
* The due date is Aug 22
* The migration period runs from Aug 1 through Aug 31


In this scenario, the earliest you can migrate is Aug 1 (the cutoff date, which is the most recent statement date). The latest you should migrate is before Aug 22 (the previous period's due date, which falls within the migration period).

## See also

- [LOC migration procedure](/loan-lifecycle/loc-migration/migration-procedure) — Run the migration once prerequisites are in place.
- [LOC migration key concepts](/loan-lifecycle/loc-migration/key-concepts) — The migration period, cutoff date, and migration draw.