The gate is on the policy, not on your organization:
Policy.settlementMode is frozen
at purchase, so a tier change never strands cover you already sold.
Tier 2 — collecting a premium
After purchasing a policy (statusPENDING),
trigger an STK push to the payer’s phone:
referenceis the policy id.amountis local currency and must be at least the quoted premium.- Returns a
transactionIdandreference(a transaction UUID) withstatus: PENDING. The payer approves the prompt on their phone.
POST /api/payments/initiate is rate limited to 10 requests/hour per organization —
see Rate limits.Optional: pre-quote the conversion
Confirming payment
On a successful charge, MicroCrop creates the policy on-chain and flips it toACTIVE
automatically. Poll the transaction or the policy:
Provider callbacks
The payment provider notifies MicroCrop directly at an internal, signature-verified callback endpoint — you don’t implement or call it. You observe results by polling, or by subscribing topolicy.activated on webhooks.
Tier 1 — attesting off-platform premium
On theDETERMINATION tier MicroCrop never touches the premium. You collect it however
you already do — M-Pesa till, bank transfer, deduction from an input loan, cash — and
then tell MicroCrop that cover is paid for:
paymentReference is your own evidence that money was
received (3–200 chars), and reason justifies activating without a provider-verified
payment (10–500 chars). Requires the policy:activate capability, which your
organization API key holds.
This writes an audited PREMIUM transaction marked manual: true and
providerVerified: false — deliberately distinguishable from money a payment provider
actually settled — and flips the policy to ACTIVE.
It is refused if the policy is not PENDING, or if a provider premium payment is still
PENDING on it (400 INVALID_INPUT), so a farmer cannot be charged twice.
PUT /api/policies/{policyId}/activate is available on both tiers. It exists as a
reconciliation fallback for Tier 2, and it is the normal path for Tier 1. See the
Tier 1 integration guide.