Loan Updates
Under Construction
The following document represent functionality that is in active development and subject to change. Please use as a reference for planning purposes but contact Preczn before implementing to validate documentation matches released functionality.
Loans are unique in that they represent an active and ever changing payment method. Many features of a loan may change in time, notably a loans approval state and the remaining balance of available funds upon which your merchants may perform draws.
Preczn provides 2 means for platforms to receive updates about changes at it relates to a loan:
- Token Webhook Subscription
- Get Token API
Token Webhook Subscription
Since many attributes of a loan may change asynchronous of loan origination (status, balance, etc) may lending providers webhook notifications. Where available Preczn will subscribe to loan webhooks and forward these changes as Token Update events.
If your platform would like to take advantage of these Token Webhooks, please review our Webhook documentation for how to configure, sign, and consumer Preczn webhooks.
Example Token.Updated Webhook Request
{
"id": "what_6k022ss0jj8vp9g85xv1z357m7",
"webhookId": "wh_5jg1dx62za981aqkanv3cd99zh",
"eventType": "token.updated",
"data": {
"Id": "tkn_1jp486atmr8r390qwbat6xj2g4",
"modifiedOn": "2022-11-04T15:37:30Z",
"loan": {
"brand": "greensky",
"type": "B2B2C",
"loanId": "2317600039",
"status": "approved/underReview/declined",
"openToBuy": "0.00",
"creditLimitOffered": "3500.00",
"creditLimit": "0.00",
"currentBalance": "0.00",
"stageFundingThreshold": "100/0",
"expirationDate": "12/18/2023"
}
}
}
GET Token API
Before performing certain functions like a drawdown transaction you may wish to confirm the latest information about a loan.
While Preczn stores data about a loan, the central source of truth will always be the loan provider.
To account for this, Preczn's GET Token API allows platforms to request the latest data about a loan. When a request is made to Preczn for a given Preczn token, if the token is a loan Preczn will contact the loan provider and return the latest information about the loan.
Example GET Token Request
To request the latest status of a token, perform a GET request to https://api.preczn.com/v1/token/{tokenId}, where the tokenId is the token that you wish to retrieve data.
Preczn will respond with the latest information from the lending provider.
{
"token": "tkn_5ptw6a9dd8brzz5qw2b7xqkt1",
"type": "loan",
"createdDate": "2023-02-22T15:35:57Z",
"modifiedOn": "2023-02-22T15:35:57Z",
"merchant": "mid_5ptw6a9dd8brzz5qw2b7xqkt1",
"loan": {
"brand": "greensky",
"type": "B2B2C",
"loanId": "2317600039",
"status": "approved/underReview/declined",
"openToBuy": "0.00",
"creditLimitOffered": "3500.00",
"creditLimit": "0.00",
"currentBalance": "0.00",
"stageFundingThreshold": "100/0",
"expirationDate": "12/18/2023"
}
}
Updated 6 months ago