---
title: Purchasing a loan
slug: apis/lending/purchasing-a-loan
description: This page describes Cross River’s Lending Selling API, enabling automated loan purchases with validation, funding, reporting, flexible workflows, and multiple supported loan types.
docTags: 
createdAt: 2025-03-31T14:07:53.107Z
---

## Lending Selling APIs

### Overview

The COS Lending Selling API enables Marketplace Lenders (MPLs) and Investors to purchase loans through a streamlined API. The purchase process includes validation, fund transfers, interest accrual calculations, and automated reporting.

Cross River provides you (or your investor) three options to purchase your loans using the Selling system (part of Lending).

- **Recommended**:  API and Webhook integration for full automation and loan level monitoring as the loan moves from "Pending" to "In Seasoning" to "Ready For Purchase" to "Purchased".
- **Low touch**: Log in to the UI, review and click to Purchase
- **No touch**: Auto Debit your account with Cross River

Regardless of the option, you can configure [Hooks](https://docs.crossriver.com/apis/digital-lending/hook-notifications#nXa6z) to receive a purchase confirmation via email or Slack.

HoldForSale ("HFS") and Long Term Hold For Sale ("LTHFS") are the loan types managed in Selling. You can also view loans that Cross River Retains ("RET").

### APIs

| API                                                                                 | Description                                                                                                                  |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [GET/selling/api/loans/&#x7B;loanType}](docId\:aclS7XmQOriQexuwKChI_)               | Get all loans by loan type                                                                                                   |
| [POST /selling/api/loans/purchase  ](docId\:ScuWXdVKgmK0wtoc74toj)                  | Purchase loans                                                                                                               |
| [POST/selling/api/purchase/total](docId\:lMG_V_pDpsrY6_Tnb2unx)                     | Calculate the expected total purchase amount **before&#x20;**&#x65;xecuting the purchase.                                    |
| [POST/selling/api/loans/endSeasoning](docId:4b70vPlfUjUCEiP95OQEZ)                  | Transition LTHFS loans from InSeasoning status to `ReadyForPurchase` status, making them immediately available for purchase. |
| [GET /selling/api/sofr  ](docId\:ABRFf5sje3Z0qj_VvBhfc)                             | Retrieve the most recent SOFT (Secured Overnight Financing Rate) value used for interest rate calculations.                  |
| [GET /selling/api/loans/&#x7B;id}/info](docId\:AHb0AJpxgcw4kmr-aRBmG)               | Retrieve detailed information for a specific loan by its ID.                                                                 |
| [GET /selling/api/loans/&#x7B;id}/purchase\_details](docId:6zdZZ_wBF0jUldlUAfIXv)   | Retrieve sale details for a loan including statuses, dates, amounts, and fee collection information.                         |
| [GET /selling/api/loans/&#x7B;id}/total](docId:6Ee5TCHad98vi2v8Pholk)               | Calculate the total amount for a specific loan, including adjusted loan amount plus accrued interest.                        |
| [GET /selling/api/loans/aggregation](docId\:gW-q12__5Et5mupyZAHh8)                  | Retrieve aggregated loan counts and amounts grouped by loan type and sale status for a specific MPL.                         |
| [GET /selling/api/loans/receipt/&#x7B;purchaseId}](docId\:c6HyxlpTQsvA1ffOp_Msz)    | Retrieve the purchase receipt (invoice) for a completed purchase batch by its purchase batch ID.                             |
| [POST /selling/api/loans/purchase/balance](docId:1KsF6yXedMp6mpzQCSXvJ)             | Get the current balance of the purchase account that would be used for the specified purchase parameters.                    |
| [POST /selling/api/loans/purchase/accounts-balances](docId\:niFW54Ln-G7hSf2V9zaUV)  | Get the purchase accounts and their balances for loans matching the given purchase parameters.                               |
| [GET /selling/api/loans/purchase/accounts](docId\:Q3vC3-8hVXxHkOioJ0G3m)            | Retrieve all purchase accounts that can be used for purchasing loans with the specified parameters.                          |
| [GET /selling/api/loans/purchase/purchaseAllowed](docId\:KEI4AcLgwId0kt9dtMEta)     | Check if loan purchasing is allowed on a specific date based on system configuration and business rules.                     |

### UI

- The sandbox UI is [https://lendingappsandbox.crbcos.com/loans/selling](https://lendingappsandbox.crbcos.com/preapproval/applications)<u>****</u>
- The production UI is <u>**https\://lendingapp.crbcos.com/loans/selling**</u>

### API location

- Swagger: [[https://lendingsandbox.crbcos.com/selling/swagger/index.html](https://lendingsandbox.crbcos.com/selling/swagger/index.html)<u>****</u>](https://lendingsandbox.crbcos.com/selling/swagger/index.html)
- URL for sandbox: [[https://lendingappsandbox.crbcos.com/loans/selling](https://lendingappsandbox.crbcos.com/loans/selling)](https://lendingappsandbox.crbcos.com/loans/selling)
- Base URL for production:[[https://lendingapp.crbcos.com/loans/selling](https://lendingapp.crbcos.com/loans/selling)](https://lending.crbcos.com/preapproval/v1)
- API scope for sandbox is: **CosLending\:Selling\:stg**
- API scope for production is: **CosLending\:Selling\:prd**



