Skip to content

Cancel Requests

Canceling a request will immediately close the customer’s executable order request within our system.

Terminal window
curl --request POST \
--url https://api.staging.pipevest.com/v1/ussd/process \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access-token>' \
--header 'x-client-id: <client-id>' \
--data '{"sessionId": "<session-id>", "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\nSELL: AAPL\nAmount: ZK281.51\n\nAre you sure you want to cancel this order?\n",
"options": [
{
"key": "1",
"label": "Yes, cancel",
"action": "CANCEL_ORDER"
},
{
"key": "0",
"label": "No, go back",
"nextState": "PENDING_REQUEST_DETAILS"
}
],
"isEndState": false
},
"ussdText": "Confirm Order Cancellation:\n\nSELL: AAPL\nAmount: ZK281.51\n\nAre you sure you want to cancel this order?\n\n\n1. Yes, cancel\n0. No, go back",
"expiresAt": "2025-11-10T14:56:05.356Z"
}
}
What the customer sees
Confirm Order Cancellation:

SELL: AAPL
Amount: ZK281.51

Are you sure you want to cancel this order?


1. Yes, cancel
0. No, go back
USSD Cancel Request View

Check out an example of the ussd cancel request view