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:

NameTypeDescription
idstringrequired 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:

NameTypeDescription
idstringLoan Id
applicationIdstringApplication Id of the application that the loan was created from
programIdstringProgram Id of the program that the loan is associated with
approvedAmountdoubleThe amount that the loan was approved for
amountFundeddoubleThe 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
originationFeeAmountdoubleThe 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:

NameTypeDescription
paginateResultsbooleanindicates whether the request should be paginated
pageint32indicates the page to return
perPageint32indicates how many items are on a page
sortOnstringindicates the attribute by which the data is sorted
sortAscendingstringindicates 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:

NameTypeDescription
pageSizeint32Number of items displayed on a page
pageOffsetint32Offset index indicating starting point for page items
totalPagesing32Total number of pages
totalItemCountint32Total count of items across all pages
itemsarray of objectsThe object includes the following data:
> idstringLoan Id
> applicationIdstringApplication Id of the application that the loan was created from
> programIdstringProgram Id of the program that the loan is associated with
> approvedAmountdoubleThe amount that the loan was approved for
> amountFundeddoubleThe 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
> originationFeeAmountdoubleThe 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:

NameTypeDescription
paginateResultsbooleanindicates whether the request should be paginated
pageint32indicates the page to return
perPageint32indicates how many items are on a page
sortOnstringindicates the attribute by which the data is sorted
sortAscendingstringindicates 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:

NameTypeDescription
idstringLoan Id
applicationIdstringApplication Id of the application that the loan was created from
programIdstringProgram Id of the program that the loan is associated with
approvedAmountdoubleThe amount that the loan was approved for
amountFundeddoubleThe 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
originationFeeAmountdoubleThe 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:

NameTypeDescription
idstringrequired Format - uuid. Loan id of the loan being funded

Body Parameter Data Element Details:

NameTypeDescription
amountToFunddoublerequiredAmount of money to disburse against the loan. Must be greater than 0
routingNumberstring | nullrequiredRouting number of the account the funds are disbursing to. Must be between 1 and 10 characters long
accountNumberstring | nullrequiredAccount number that the funds are disbursing to. Must be 255 characters long or less
accountNamestring | nullrequiredThe name on the account that the funds are disbursing to. Must be 255 characters long or less
accountTypestringOptions are: Checking Savings
platformReferenceNumberstring | nullrequired Reference number provided by the API caller. Must be 255 characters long or less

Header Data Element Details:

NameTypeDescription
x-idempotency-keystringrequiredFormat - 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:

NameTypeDescription
idstring
fundingInstructionsarray of objects | nullList 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:
> platformReferenceNumberstring | nullThe Platform Reference Number that was provided when the funding instruction was submitted
> fundingInstructionIdstringThe 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:

NameTypeDescription
idstringrequired 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:

NameTypeDescription
pageSizeint32
pageOffsetint32
totalPagesint32
totalItemCountint32
itemsarray of objects
> accountNumberstring | nullThe account number that funds are disbursing to
> accountNamestring | nullThe name on the account that funds are disbursing to
> accountTypestringOptions are: Checking Savings
> routingNumberstring | nullthe routing number for the account that funds are disbursing to
> amountToFunddoubleThe amount of money to be disbursed in this funding instruction
> fundingTypestringOptions are: OnDemand Immediate
> fundingStatestringOptions are: Unfunded Rejected SentToRail Failed Funded
> receivedDatedate-timeThe date that the funding instruction was received. This will UTC
> submissionIdstringThe id of the funding submission that this funding instruction was a part of
> sentToRailDatedate-time | nullThe 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
> platformReferenceNumberstring | nullThe platform reference number that was included on the submitted funding instruction
> rejectionReasonstring | nullIf 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:

https://cubi-sandbox-api.customersbank.com/consumerlending/v1/loan/{id}/funding/{fundingInstructionId}

This request requires the additional data to be included in the path of the request.

Path Parameter Data Element Details:

NameTypeDescription
idstringrequired Format - uuid. The loan id
fundingInstructionIdstringrequiredFormat - 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:

NameTypeDescription
idstringLoan Id
applicationIdstringApplication Id of the application that the loan was created from
programIdstringProgram Id of the program that the loan is associated with
approvedAmountdoubleThe amount that the loan was approved for
amountFundeddoubleThe 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
originationFeeAmountdoubleThe 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.