Skip to main content
An investment puts a customer’s money into one plan. You start it with invest, which creates a Payment: one attempt to move money to Ndovu, with its own reference. Once the money arrives, the Payment completes and a Transaction is created for the investment. Ndovu then invests it, and the customer receives units in the plan.
Whether this is the customer’s first investment in the plan or a top-up is decided by us from the customer’s holdings. You never say which.

Before you start

  • Your account has a referenceCode in your configuration. Your customers’ payment references start with it (e.g. ACM7F3K9Q). Until it’s set, invest returns 403 PARTNER_REFERENCE_CODE_MISSING.
  • The customer is onboarded.
  • The plan is one of your products and accepts new money (investable: true).
  • The channel is enabled for your account: bankTransferEnabled or mpesaEnabled in your configuration.

Request

Idempotency-Key

Every invest call needs an Idempotency-Key header: a value you generate (a UUID is a good choice) that identifies one intended investment on your side. Save it with your own order record before calling us, and send the same key on every retry of that investment. See Retrying.

Body

Any other field is refused.

Minimums

Every plan has a minimum per currency, and a separate minimum for top-ups. They are in the plan’s minInvestableAmounts (first investment) and minTopUpAmounts (top-up) from Getting Products. The same minimums apply to every channel and every partner. A currency with no minimum set can’t be used for that plan.

Response

201 Created with the new Payment (or 200 OK with the same Payment when you resend a key you’ve used before):
The bank details above are example values, not a real account. Always show your customer the bankDetails from the response, never hard-coded account details: they can differ by currency and environment.
The fields are described in Payments. Two are only on this response: transactionId is null until the Payment completes. That’s when the Transaction is created.

Completing the payment

Show your customer the transfer instructions, built from the response:
Send currency finalAmount to bankDetails.accountName, bankDetails.bankName, account bankDetails.accountNumber, with the reference reference.
With the example response above, that reads: send KES 5,000 to Ndovu Example Account, Example Bank, account 0000000000, with the reference ACM7F3K9Q.The customer (or you, on their behalf) makes the transfer. The reference must be in the transfer’s memo or narration: it’s how we match the money to the Payment. The amount must be exactly finalAmount.A bank transfer that never arrives expires after 5 days and the Payment becomes FAILED. If the money arrives later, we still match it and our team follows up.
Then follow the Payment and the Transaction as described in Checking Status.

Retrying

If a call times out or fails with a 5xx, resend it with the same Idempotency-Key. You can never create the same investment twice: Keys never expire. To try again after a Payment FAILED, call invest with a new key: a failed Payment is never reused, and resending its key just returns it, still FAILED.

Errors

See Errors for the format.