Order
This is an object for you to place an order. The request for an order will first check if there is sufficient balance in your account and if successful, an order will be placed. The response will show that the request is in sync. A callback url is required so as to receive the final status of the order. You could also check the status of the transaction using the status object.
POST: /v1/b2b/order
Services
safaricom
airtel
telkom
jtl
equitel
Request
curl -X POST \
https://api.tupay.africa:8888/v1/b2b/order/{service} \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {token}' \
-H 'Idempotency-Key: {key}' \
-d '"{"account": "{account}", "amount": {amount}, "currency": {currency}}"'
Order Request
{
"account": "0733000000",
"reference": "ref1234",
"amount": 10,
"currency": "KES",
"name": "John",
"phone": "254722000000",
"shortcode": "100100"
}
account
(String): The account e.g. phone numberamount
(Double): The amount requiredcurrency
(String): The currency codereference
(String): Your unique id *optionalname
(String): The customer first name *optionalphone
(String): The customer phone *optionalshortcode
(String): Telco shortcode *optional
Response
Order Response
{
"id": "ABCDEFG250101",
"reference": "ref1234",
"status": 0,
"mesasge": "Pending"
}
id
(String): The transaction id (Optional incase of failure)reference
(String): Your unique idstatus
(Integer): The status of the requestmessage
(String): The response message