Repayment webhooks

Partners an surface repayment information within their UI, we have multiple webhooks to allow for this use-case.

YouLend have a SettlementProcessed webhook that triggers whenever we process a settlement sent by a partner into a Virtual IBAN.

Settlement Processed webhookLOA10055 example payload

{
  "EventCode": "LOA10055",
  "Message": "A settlement from a partner has been processed - payments towards the loan have been initiated",
  "EventProperties": {
    "LoanId": "a3c3279c-d84a-4ec7-9191-b2b371515bd9",
    "TotalSettlementAmount": "600",
    "SettlementReference": "test repayment",
    "PaymentsToLenders": [
      {
        "Amount": "400",
        "PaymentCorrelationId": "a61e16ef-e63a-4cda-b755-95b22ddfae3a"
      },
      {
        "Amount": "200",
        "PaymentCorrelationId": "a5ee16ef-e443a-4cda-b6665-55b12ddfae3a"
      }
    ],
    "LeadId": "d8c38d41-6256-44b2-8bd2-3d0219f04b4e"
  }
}
ParameterDescription
TotalSettlementAmountThe amount sent to the virtual/settlement account by the partner
SettlementReferenceThe reference included in the transfer made to the virtual/settlement account, you can use this reference to reconcile the PaymentCorrelationId to the transfer
AmountThe amount sent to each individual lender
PaymentCorrelationIdA unique Id correlated with the Id sent in the Repayment webhook

With this webhook (LOA10055), the partner will receive confirmation that:

  1. YouLend has received £600 in the Virtual Account linked to loanId: a3c3279c-d84a-4ec7-9191-b2b371515bd9, with the reference test repayment
  2. YouLend has processed the settlement and initiated the necessary loan repayments to the lenders.

After this, YouLend then create a transaction that triggers the next webhook LOA10040 once the money has been used as a repayment against the loan.

Repayment webhook LOA10040 example payload

{
    "EventCode": "LOA10040",
    "EventProperties": {
      	"CorrelationId": "cf08c5de-ef80-460c-aedd-76a49c2ca388",
        "LeadId": "113222a1-1a89-4ef0-bda3-bad07224fe11",
        "LoanId": "d90c9fc1-cdd0-4dfc-810a-e2bab1f76199",
        "PaymentAmount": "10.00",
        "PaymentDate": "2023-10-20T00:00:00Z",
        "PrincipalRemaining": "9880.40"
    },
    "Message": "A repayment was made towards the loan"
}

The above webhook also contains the CorrelationId to allow the partner to accurately reconcile the repayments YouLend processes.

Manual payments

For manual payments, where a merchant contacts YouLend and sends a payment manually, our Operations team will manually instruct the repayments to the lender. This will trigger the standard repayment webhook, but the CorrelationIdwill not correlate with any Id stored.

📘

Good to know

If you receive a Repayment webhook with a CorrelationId that does not match any CorrelationId you have ever received in the Process Settlement webhook, you can assume it was a manual payment