Confirming a request will create an executable order request for the customer 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 POST request to confirm an order request.

Creating an order request

Make a POST request to /requests

  curl --request GET \
    --url https://api.staging.pipevest.com/v1/ussd/requests?customerId=123456&symbol=AAPL&orderType=PURCHASE
    --header 'Authorization: Bearer 123456' \
    --header 'Content-Digest: sha-512=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:' \
    --header 'Content-Length: 18' \
    --header 'Content-Type: application/json' \
    --header 'Signature: sig1=:OTEyMjY4...A5NTNDMEQ=:' \
    --header 'Signature-Input: sig1=("Authorization" "Content-Digest" "Content-Length" "Content-Type" "X-Client-Id" "X-Idempotency-Key" "@method" "@target-uri" "@path" "@query");keyid="staging-pipevest-ed25519";created=1732893484;expires=1732893584' \
    --header 'X-Client-Id: 123456' \
    --header 'X-Idempotency-Key: 123456' \
    ...
    --data '{"amount": 100 }'

To create a sell order request, simiply set the orderType to SELL

Example Request Payload

{
  "amount": 100
}

Example Response

{
  "data": {
    "ussdMessage": "Zamtel Message\n Thank you for purchasing 100ZK of Apple stock. You will receive a confirmation shortly.",
    "ussdConfirm": {
      "requestUrl": "https://api.staging.pipevest.com/v1/ussd/stocks?customerId=123456&symbol=AAPL",
      "requestType": "GET"
    }
  },
  "code": 200,
  "message": "Success"
}

Request payload

queryDefinitionRequired
amountThe order request amountYes

Query parameters

queryDefinitionRequired
customerIdThe unique customer identiferYes
orderTypeThe type of order request. Either PURCHASE or SELLYes
symbolThe stock symbol for the order requestYes

Confirm request view example

USSD Confirm Request View

Check out an example of the ussd confirm request view