Kenal Stamps Docs

Loan Agreement API

Submit loan agreement contracts via the Partner Integration API.

Submit Loan Agreements to Kenal Stamps for stamping using the General Contract schema. This endpoint handles contract creation, PDF upload, and optional immediate confirmation (wallet charging).

For the full request/response schema, see the API Reference.

Endpoint

POST /api/integration/loan/submit

Request Body

FieldTypeRequiredDescription
externalReferenceIdstringYesYour unique identifier for this contract
loanAmountnumberYesTotal loan amount in RM
durationnumberYesLoan duration value
durationUnitMONTHS | YEARSYesDuration unit
confirmbooleanNoIf true, charges the wallet immediately
useServiceCreditFallbackbooleanNoFall back to service credits if duty wallet is insufficient
originalFileNamestringYesPDF filename
fileBase64stringYesBase64-encoded PDF (max 20MB)
contentTypestringYesMust be application/pdf
dataobjectYesGeneral Contract data (see below)

Contract Data (data)

FieldTypeRequiredDescription
titlestringYesContract title
contractDatestringNoYYYY-MM-DD. Required if confirm=true
partiesarrayYesMinimum 2 party objects
effectiveDatestringNoYYYY-MM-DD
expirationDatestringNoYYYY-MM-DD
numberOfDuplicatesnumberNoDefault: 0

Party Object

FieldTypeRequiredDescription
namestringYesParty name
partyTypeindividual | companyYesParty type
rolestringNoe.g. "Lender", "Borrower"
addressobjectYesAddress with addressLine1, addressLine2, postcode, city, state, country
contactNumberstringYesPhone number
emailstringNoEmail address
identityNumberstringNoFor individuals
registrationNumberstringNoFor companies
identityTypeNRIC | PASSPORTNoFor individuals

Response

{
  "contractId": "a1b2c3d4-...",
  "status": "Pending",
  "organizationId": "...",
  "partnerId": "...",
  "externalReferenceId": "LOAN-001",
  "confirmed": false,
  "message": "Contract created",
  "stampDutyAmount": 10.00,
  "latePenaltyAmount": 0,
  "totalDutyPayable": 10.00,
  "balances": {
    "serviceCreditBalance": 50,
    "exemptionCreditBalance": 0,
    "dutyWalletBalance": 1000.00
  }
}

Idempotency

Re-sending the same (x-service-id, externalReferenceId) updates the existing contract's data, as long as the contract is still in a mutable status (Pending).

If the contract has already been confirmed or is in a later status, the request returns a 409 Conflict.

Late-Stamping Penalties

For contracts with a contractDate more than 30 days before the submission date, a late-stamping penalty applies. The penalty amount is included in the latePenaltyAmount field of the response.

Error Responses

StatusDescription
400Validation error (missing fields, invalid schema)
401Authentication failed
402Insufficient wallet balance (when confirm=true)
403Integration is inactive
409Duplicate reference in immutable status
413File exceeds 20MB