For the complete documentation index, see llms.txt. This page is also available as Markdown.

Trigger order intermediate action

[POST] /api/v2/order/intermediate-action

Drives the step between creating an order and the user actually paying. What it does depends on the deposit's transfer type:

Transfer type
What this call does

otp_stk_push

Submits the OTP code the user received by SMS or WhatsApp. That unlocks the USSD prompt.

stk_push

Sends a new USSD prompt to the user's phone. Use it when the first one did not arrive.

redirect

Accepted, but a no-op. See below.

Before you call

Check order.deposit.transferInstructions:

  • isIntermediateActionAvailable must be true.

  • Now must be at or after intermediateActionNextAttemptAvailableAt.

  • intermediateActionAttempts must still be below intermediateActionMaxAttempts.

  • fieldsForIntermediateAction lists what to send — otpCode on otp_stk_push, nothing on a plain stk_push retry.

See Transfer types explanation for worked examples of both push types.

Request

Submitting an OTP code:

Retrying an STK push:

Response

Returns the updated order — the same Order object as Get order.

On stk_push and otp_stk_push, read deposit.transferInstructions again: intermediateActionAttempts, intermediateActionNextAttemptAvailableAt and intermediateActionExecuted will have moved, and they tell you whether another retry is allowed.

On redirect nothing moves. The call exists so that a client which treats every transfer type the same is not rejected; it records nothing and none of the counters change. Sending the user to transferInstructions.paymentUrl is what actually matters.

In sandbox, 123456 is always the valid OTP code.

Last updated