Canceling a request will immediately close the customer’s executable order request within our system.
It is highly recommended that you require the customer to input some sort
of security key (i.e. pin, OTP, etc…) before making the request to
cancel an order request.
Canceling an order request
curl --request POST \
--url https://api.staging.pipevest.com/v1/ussd/process
...
--data 'sessionId=<session-id>'
--data 'choice=1'
Example Response
{
"message" : "USSD request processed successfully" ,
"data" : {
"sessionId" : "ussd_2231df057f1f8f5269f0a268249ac104" ,
"currentState" : "CANCEL_REQUEST_CONFIRMATION" ,
"menu" : {
"state" : "CANCEL_REQUEST_CONFIRMATION" ,
"text" : "Confirm Order Cancellation: \n\n SELL: AAPL \n Amount: ZK281.51 \n\n Are you sure you want to cancel this order? \n " ,
"options" : [
{
"key" : "1" ,
"label" : "Yes, Cancel Order" ,
"nextState" : "CANCEL_ORDER"
},
{
"key" : "0" ,
"label" : "No, Go Back" ,
"nextState" : "PENDING_REQUEST_DETAILS"
}
],
"isEndState" : false
},
"ussdText" : "Confirm Order Cancellation: \n\n SELL: AAPL \n Amount: ZK281.51 \n\n Are you sure you want to cancel this order? \n\n\n 1. Yes, Cancel Order \n 0. No, Go Back" ,
"expiresAt" : "2025-11-10T14:56:05.356Z"
}
}
Confirm request view example
USSD Cancel Request View Check out an example of the ussd cancel request view