DevelopmentTransfer Stock

Transfer Stock

The primary /app transfer flow calls CapTable.transferStock directly from the connected ADMIN wallet. There is no transfer registration endpoint: the poller mirrors the confirmed TransferStock transaction into MongoDB. The server-signed API alternative below uses transferController.js.

Transfer shares from one stakeholder to another. The recipient (transferee) must already exist on the cap table before you can transfer stock to them.

Confirm the transferee exists

The recipient must already be a stakeholder on this issuer. If needed, complete Create a Stakeholder, then return with the recipient’s stakeholder ID.

Transfer the stock

Send a POST request to http://localhost:8293/transactions/transfer/stock

{
    "issuerId": "<YOUR_ISSUER_ID>",
    "data": {
        "transferorId": "<FROM_STAKEHOLDER_ID>",
        "transfereeId": "<TO_STAKEHOLDER_ID>",
        "stockClassId": "<STOCK_CLASS_ID>",
        "quantity": "13",
        "sharePrice": "4.20",
        "isBuyerVerified": true
    }
}

The response returns "success" when the transfer is recorded onchain.

⚠️

sharePrice is the human price per share. The contract stores it scaled by 1e10 (10,000,000,000). Divide raw onchain values by 1e10 before comparing. The server handles scaling automatically.

Verify the transfer

Check historical transactions to confirm:

GET /historical-transactions/issuer-id/<YOUR_ISSUER_ID>

Required fields

FieldDescription
transferorIdStakeholder transferring the shares (seller).
transfereeIdStakeholder receiving the shares (buyer).
stockClassIdThe class of stock being transferred.
quantityNumber of shares to transfer, as a string integer.
sharePriceHuman price per share. The contract stores sharePrice * 1e10 (10,000,000,000).
isBuyerVerifiedtrue once the buyer has cleared whatever KYC/eligibility check your application requires. The contract reverts with UnverifiedBuyer if this is false.

Partial transfers

If quantity is less than the current position on security_id, the contract automatically issues a balance security back to the transferor for the leftover shares. The new security_id shows up in history; use it for any later action on the leftover position.

What’s next?