Loan
Get Loan Details for a Specific Loan
A user has the ability to retrieve the details of a specific loan if it knows the ID of that loan. To view the details, a user can initiate a GET request directed to the following endpoint:
https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/{id}
This request requires the additional data to be included in the path of the request.
Path Parameter Data Element Details:
Name | Type | Description |
---|---|---|
id | string | required Format - uuid. The loan id to be retrieved |
Example Request:
curl --request GET \
--url https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/c58c02f4-ce15-40ca-a94a-4c5758e00c3c \
--header 'accept: application/json'
A successful request will generate a response of 200 – Ok.
Example Response:
{
"id": "c58c02f4-ce15-40ca-a94a-4c5758e00c3c",
"applicationId": "a64d4499-c0fd-408f-8db3-b1bf010eee8a",
"programId": "a3cf82e1-14ff-477a-9459-b1bf010a1b8e",
"approvedAmount": 24000.00,
"amountFunded": 100.50,
"originationFeeAmount": 200.00
}
Response Data Element Details:
Name | Type | Description |
---|---|---|
id | string | Loan Id |
applicationId | string | Application Id of the application that the loan was created from |
programId | string | Program Id of the program that the loan is associated with |
approvedAmount | double | The amount that the loan was approved for |
amountFunded | double | The amount that has been funded on this loan. This will include all funding instructions that have been successfully processed by payment rails and all funding instructions that have been sent to the payment rail but have not been returned, cancelled or successfully processed |
originationFeeAmount | double | The origination fee amount for the loan. The total fundable amount on the loan will be the ApprovedAmount less the OriginationFeeAmount |
Error Handling:
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 - Forbidden
404 – Not Found
422 – Unprocessable Content
500 – Internal Server Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.
Get Loan Details for All Loans (with pagination)
Similar to the above request, a user has the ability to view the same level of details for all loans. This endpoint includes pagination which allows a user to request a subset of applications. To view these details, a user can initiate a GET request directed to the following endpoint:
https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan
This request requires the additional data to be included in the query of the request.
Query Parameter Data Element Details:
Name | Type | Description |
---|---|---|
paginateResults | boolean | indicates whether the request should be paginated |
page | int32 | indicates the page to return |
perPage | int32 | indicates how many items are on a page |
sortOn | string | indicates the attribute by which the data is sorted |
sortAscending | string | indicates if the data is sorted in ascending or descending order |
Example Request:
curl --request GET \
--url 'https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan?paginateResults=true&page=1&perPage=10' \
--header 'accept: application/json'
A successful request will generate a response of 200 – Ok.
Example Response:
{
"pageSize": 10,
"pageOffset": 0,
"totalPages": 1,
"totalItemCount": 2,
"items": [
{
"id": "af8c476d-ca90-4561-a73a-0552d834cadf",
"applicationId": "fc47b2a2-6884-4d87-911e-b1bf010ea894",
"programId": "a3cf82e1-14ff-477a-9459-b1bf010a1b8e",
"approvedAmount": 10000.00,
"amountFunded": 2139.98,
"originationFeeAmount": 200.00
},
{
"id": "c58c02f4-ce15-40ca-a94a-4c5758e00c3c",
"applicationId": "a64d4499-c0fd-408f-8db3-b1bf010eee8a",
"programId": "a3cf82e1-14ff-477a-9459-b1bf010a1b8e",
"approvedAmount": 24000.00,
"amountFunded": 0,
"originationFeeAmount": 200.00
}
]
}
Response Data Element Details:
Name | Type | Description |
---|---|---|
pageSize | int32 | Number of items displayed on a page |
pageOffset | int32 | Offset index indicating starting point for page items |
totalPages | ing32 | Total number of pages |
totalItemCount | int32 | Total count of items across all pages |
items | array of objects | The object includes the following data: |
> id | string | Loan Id |
> applicationId | string | Application Id of the application that the loan was created from |
> programId | string | Program Id of the program that the loan is associated with |
> approvedAmount | double | The amount that the loan was approved for |
> amountFunded | double | The amount that has been funded on this loan. This will include all funding instructions that have been successfully processed by payment rails and all funding instructions that have been sent to the payment rail but have not been returned, cancelled or successfully processed |
> originationFeeAmount | double | The origination fee amount for the loan. The total fundable amount on the loan will be the ApprovedAmount less the OriginationFeeAmount |
Error Handling:
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 - Forbidden
404 – Not Found
422 – Unprocessable Content
500 – Internal Server Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.
Get Loan Details for All Loans (without pagination)
Similar to the above request, a user has the ability to view the same level of details for all loans. This endpoint does not allow for pagination and provides a complete list of applications for all time. To view these details, a user can initiate a GET request directed to the following endpoint:
https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/download
This request requires the additional data to be included in the query of the request.
Query Parameter Data Element Details:
Name | Type | Description |
---|---|---|
paginateResults | boolean | indicates whether the request should be paginated |
page | int32 | indicates the page to return |
perPage | int32 | indicates how many items are on a page |
sortOn | string | indicates the attribute by which the data is sorted |
sortAscending | string | indicates if the data is sorted in ascending or descending order |
Example Request:
curl --request GET \
--url 'https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/download?paginateResults=true&page=1&perPage=10' \
--header 'accept: application/json'
A successful request will result in a response of 200 - Ok.
Example Response:
{
"pageSize": 10,
"pageOffset": 0,
"totalPages": 1,
"totalItemCount": 2,
"items": [
{
"id": "af8c476d-ca90-4561-a73a-0552d834cadf",
"applicationId": "fc47b2a2-6884-4d87-911e-b1bf010ea894",
"programId": "a3cf82e1-14ff-477a-9459-b1bf010a1b8e",
"approvedAmount": 10000.00,
"amountFunded": 2139.98,
"originationFeeAmount": 200.00
},
{
"id": "c58c02f4-ce15-40ca-a94a-4c5758e00c3c",
"applicationId": "a64d4499-c0fd-408f-8db3-b1bf010eee8a",
"programId": "a3cf82e1-14ff-477a-9459-b1bf010a1b8e",
"approvedAmount": 24000.00,
"amountFunded": 0,
"originationFeeAmount": 200.00
}
]
}
Response Data Element Details:
Name | Type | Description |
---|---|---|
id | string | Loan Id |
applicationId | string | Application Id of the application that the loan was created from |
programId | string | Program Id of the program that the loan is associated with |
approvedAmount | double | The amount that the loan was approved for |
amountFunded | double | The amount that has been funded on this loan. This will include all funding instructions that have been successfully processed by payment rails and all funding instructions that have been sent to the payment rail but have not been returned, cancelled or successfully processed |
originationFeeAmount | double | The origination fee amount for the loan. The total fundable amount on the loan will be the ApprovedAmount less the OriginationFeeAmount |
Error Handling:
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 - Forbidden
404 – Not Found
422 – Unprocessable Content
500 – Internal Server Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.
Submit Funding Instructions
A user has the ability to submit one or many funding instructions to initiate a disbursement for a specific loan, as long as it knows the loan ID. In order to submit the instructions, a user can initiate a POST request directed to the following endpoint:
https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/{id}/funding
This request requires the additional data to be included in the path, body and header of the request.
Path Parameter Data Element Details:
Name | Type | Description |
---|---|---|
id | string | required Format - uuid. Loan id of the loan being funded |
Body Parameter Data Element Details:
Name | Type | Description |
---|---|---|
amountToFund | double | requiredAmount of money to disburse against the loan. Must be greater than 0 |
routingNumber | string | null | requiredRouting number of the account the funds are disbursing to. Must be between 1 and 10 characters long |
accountNumber | string | null | requiredAccount number that the funds are disbursing to. Must be 255 characters long or less |
accountName | string | null | requiredThe name on the account that the funds are disbursing to. Must be 255 characters long or less |
accountType | string | Options are: Checking Savings |
platformReferenceNumber | string | null | required Reference number provided by the API caller. Must be 255 characters long or less |
Header Data Element Details:
Name | Type | Description |
---|---|---|
x-idempotency-key | string | requiredFormat - uuid. Unique request identifier for idempotency. |
Example Request:
curl --request POST \
--url https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/81dbadfb-2538-4ef5-b636-b2020123892c/funding \
--header 'accept: application/json' \
--header 'content-type: application/*+json' \
--header 'x-idempotency-key: 80DFF6F8-2F95-4A92-9E80-620ED2B371E0' \
--data '
[
{
"amountToFund": 5555.55,
"routingNumber": "434898736",
"accountNumber": "234588767",
"accountName": "Katrina Gilchrist",
"accountType": "Checking",
"platformReferenceNumber": "1234abc-ref"
},
{
"amountToFund": 2812.44,
"routingNumber": "435001237",
"accountNumber": "8722838",
"accountName": "Sam Smith",
"accountType": "Savings",
"platformReferenceNumber": "9876def-ref"
}
]
'
A successful request will result in a response of 202 - Accepted.
Example Response:
{
"id": "d4985695-0796-46ca-9fdb-b2180133c93a",
"fundingInstructions": [
{
"platformReferenceNumber": "1234abc-ref",
"fundingInstructionId": "bd694e8b-28d6-4c85-b6b1-b2180133c93b"
},
{
"platformReferenceNumber": "9876def-ref",
"fundingInstructionId": "bd694e8b-28d6-4c85-b6b1-b2180133c93b"
}
]
}
Response Body Data Element Details:
Name | Type | Description |
---|---|---|
id | string | |
fundingInstructions | array of objects | null | List of all the funding instructions that were received as part of this request. This includes the Platform Reference Number that was submitted and the Funding Instruction Id to allow the caller to link any webhooks about the funding instruction to this request. The object includes the following data: |
> platformReferenceNumber | string | null | The Platform Reference Number that was provided when the funding instruction was submitted |
> fundingInstructionId | string | The Funding Instruction Id that will be used in webhooks indicating changes in state to the funding instruction |
Error Handling:
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 - Forbidden
404 – Not Found
422 – Unprocessable Content
500 – Internal Server Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.
Get All Funding Instructions for a Specific Loan
A user has the ability to retrieve funding instruction details for a specific loan, as long as it knows the loan ID. This endpoint will provide all of the loan instructions ever processed on the given loan. In order to retrieve the instructions, a user can initiate a GET request directed to the following endpoint:
https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/{id}/funding
This request requires the additional data to be included in the path of the request.
Path Parameter Data Element Details:
Name | Type | Description |
---|---|---|
id | string | required Format - uuid. The loan id to be retrieved |
Example Request:
curl --request GET \
--url https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/c58c02f4-ce15-40ca-a94a-4c5758e00c3c/funding \
--header 'accept: application/json'
A successful request will result in a response code on 200 - Ok.
Example Response:
{
"pageSize": 100,
"pageOffset": 1,
"totalPages": 1,
"totalItemCount": 2,
"items": [
{
"accountNumber": "234588767",
"accountName": "Katrina Gilchrist",
"accountType": "Checking",
"routingNumber": "434898736",
"amountToFund": 5555.55,
"fundingType": "Immediate",
"fundingState": "Rejected",
"receivedDate": "2024-08-01T17:25:59.1372335",
"submissionId": "cfa9f614-704a-4ff2-8316-43a18032c7be",
"sentToRailDate": "2024-08-01T18:28:29.5044686"
},
{
"accountNumber": "8722838",
"accountName": "Sam Smith",
"accountType": "Savings",
"routingNumber": "435001237",
"amountToFund": 2812.44,
"fundingType": "OnDemand",
"fundingState": "Funded",
"receivedDate": "2024-08-01T17:25:59.1384849",
"submissionId": "7e0ed1b0-e856-40d2-915b-56e8b10d8337",
"sentToRailDate": "2024-08-01T18:28:29.5044705"
}
]
}
Response Body Data Element Details:
Name | Type | Description |
---|---|---|
pageSize | int32 | |
pageOffset | int32 | |
totalPages | int32 | |
totalItemCount | int32 | |
items | array of objects | |
> accountNumber | string | null | The account number that funds are disbursing to |
> accountName | string | null | The name on the account that funds are disbursing to |
> accountType | string | Options are: Checking Savings |
> routingNumber | string | null | the routing number for the account that funds are disbursing to |
> amountToFund | double | The amount of money to be disbursed in this funding instruction |
> fundingType | string | Options are: OnDemand Immediate |
> fundingState | string | Options are: Unfunded Rejected SentToRail Failed Funded |
> receivedDate | date-time | The date that the funding instruction was received. This will UTC |
> submissionId | string | The id of the funding submission that this funding instruction was a part of |
> sentToRailDate | date-time | null | The date that the funding instruction was sent to a payment rail. If the funding instruction failed or was rejected before being sent to the payment rail this value will be null. When not null, this value will be UTC |
> platformReferenceNumber | string | null | The platform reference number that was included on the submitted funding instruction |
> rejectionReason | string | null | If the funding instruction was rejected, or if the funding failed, this will contain the reason. Otherwise this will be null. |
Error Handling:
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 - Forbidden
404 – Not Found
422 – Unprocessable Content
500 – Internal Server Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.
Get Specific Funding Instructions for a Loan
A user has the ability to retrieve the details of a specific funding instruction if it knows the ID of the loan and the Funding Instruction ID. This endpoint should be used if the user only wants to retrieve one of many fundings for the given loan. In order to retrieve these details, a user can initiate a GET request directed to the following endpoint:
This request requires the additional data to be included in the path of the request.
Path Parameter Data Element Details:
Name | Type | Description |
---|---|---|
id | string | required Format - uuid. The loan id |
fundingInstructionId | string | requiredFormat - uuid. The funding instruction id to be retrieved |
Example Request:
curl --request GET \
--url https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/c58c02f4-ce15-40ca-a94a-4c5758e00c3c/funding/FB1484D3-0827-4C42-B907-E373010C7D74 \
--header 'accept: application/json'
A successful request will result in a response code of 200 - Ok.
Example Response:
{
"accountNumber": "234588767",
"accountName": "Katrina Gilchrist",
"accountType": "Checking",
"routingNumber": "434898736",
"amountToFund": 5555.55,
"fundingType": "Immediate",
"fundingState": "Rejected",
"receivedDate": "2024-08-01T16:26:26.3766667",
"submissionId": "5745673e-4f36-4705-a98d-ea7e4581cd4a"
}
Response Body Data Element Details:
Name | Type | Description |
---|---|---|
id | string | Loan Id |
applicationId | string | Application Id of the application that the loan was created from |
programId | string | Program Id of the program that the loan is associated with |
approvedAmount | double | The amount that the loan was approved for |
amountFunded | double | The amount that has been funded on this loan. This will include all funding instructions that have been successfully processed by payment rails and all funding instructions that have been sent to the payment rail but have not been returned, cancelled or successfully processed |
originationFeeAmount | double | The origination fee amount for the loan. The total fundable amount on the loan will be the ApprovedAmount less the OriginationFeeAmount |
Error Handling:
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 - Forbidden
404 – Not Found
500 – Internal Server Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.
Updated 5 months ago