Create Payment

POST /v1/borrowers/{borrower_id}/payments/{payment_id}/create

Create a new payment for a borrower, if the borrower does not exist it will be created

Path parameters

Query parameters

  • When this parameter is set to True, the transaction will be handled as if it had occurred on the date specified in the occurred_on field, rather than the current date and time. This is useful when migrating data from a legacy system or for building test cases.

    Default value is false.

application/json

Body

  • occurred_on string(date-time)

    Represents the date and time at which the lender reported the transaction. This field is expressed as a datetime object with timezone information and is provided for reference purposes only. Please note that the 'occurred on' date is not used in loan management operations and does not affect the processing or status of the transaction. It is provided solely to track when the lender believes the transaction occurred, regardless of when it was actually processed by the loan management system. However if the request comes with the is_migration parameter set to true the occurred_on field will be used to handle the request as if it had happened on that date.

  • payment object

    Additional properties are allowed.

    Hide payment attributes Show payment attributes object
    • The amount paid by the borrower.

      Minimum value is 0.

    • The ID of the payment configuration associated with this payment.

    • payment_date string(date-time)

      The date on which the payment was made.

  • payment_allocations null | array[object]
    Hide payment_allocations attributes Show payment_allocations attributes object
    • amount number

      Represents the allocated amount, which is a specific portion of the payment, assigned to a particular loan. It indicates the portion of the payment that is designated for the specified loan within the payment allocation process. It is important to note that the sum of all the allocated amounts in each payment allocation object must be equal to the total payment amount.

      Minimum value is 0.

    • loan_id string

      Indicates the loan to which the specified amount in the amount field will be allocated. It identifies the specific loan within the payment allocation process where the designated portion of the payment will be directed.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • The amount paid by the borrower.

      Minimum value is 0.

    • The ID of the payment configuration associated with this payment.

    • id string

      Identifier for the recently created payment. It's the same id provided in the request.'

    • kordev_id integer

      Identifier for the payment used internally by Kordev. The ID is unique for each borrower but not globally unique.

    • payment_date string(date-time)

      The date on which the payment was made.

    • Optional field that will be returned unmodified in each response. Especially useful for keeping track of responses in batch requests.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 409 application/json

    Conflict

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

POST /v1/borrowers/{borrower_id}/payments/{payment_id}/create
curl \
 --request POST 'https://lms.kordev.io/v1/borrowers/{borrower_id}/payments/{payment_id}/create' \
 --header "Content-Type: application/json" \
 --data '{"occurred_on":"2020-01-01T10:15:20-05:00","payment":{"amount_paid":163333.34,"config_id":"default_payment_config","payment_date":"2020-01-01T00:00:00-05:00"},"payment_allocations":[{"amount":163333.34,"loan_id":"string"}],"request_id":"string"}'
Request examples
{
  "occurred_on": "2020-01-01T10:15:20-05:00",
  "payment": {
    "amount_paid": 163333.34,
    "config_id": "default_payment_config",
    "payment_date": "2020-01-01T00:00:00-05:00"
  },
  "payment_allocations": [
    {
      "amount": 163333.34,
      "loan_id": "string"
    }
  ],
  "request_id": "string"
}
Response examples (200)
{
  "amount_paid": 163333.34,
  "config_id": "default_payment_config",
  "id": "string",
  "kordev_id": 42,
  "payment_date": "2020-01-01T00:00:00-05:00",
  "request_id": "string"
}
Response examples (400)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (404)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (409)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (500)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}