On this page
GET /api/vas.php · POST /api/vas.php
List digital voucher products
GET without an identifier lists active products available through the supplier. Use product_id or the exact slug and choose an entry from available_amounts.
GET /api/vas.php
curl -4 -sS -i "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/vas.php" \
-H "Authorization: Bearer $SIMCLOUD_API_TOKEN"
HTTP 200 response excerpt
{
"status": "success",
"service": "vas"
}
Place a digital voucher order
Replace YOUR_VOUCHER_SLUG and the amount with a listed product and denomination. You can also send product_id instead of voucher_type. Include your reference, up to 200 characters. HTTP 201 confirms queueing. Keep order_id and transaction_id.
- An invalid denomination can return HTTP 400 and available_amounts. A balance error can include required_balance and available_balance.
- Treat an uncertain result as an existing order to investigate. You may spend wallet funds again if you submit a new order.
POST /api/vas.php
curl -4 -sS -i -X POST "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/vas.php" \
-H "Authorization: Bearer $SIMCLOUD_API_TOKEN" \
-H 'Content-Type: application/json' \
--data '{
"voucher_type": "YOUR_VOUCHER_SLUG",
"amount": 50,
"reference": "DOCS-VAS-01"
}'
HTTP 201 response excerpt
{
"status": "success",
"service": "vas",
"process_status": "Pending"
}
Query an API voucher order
Set SIMCLOUD_VAS_ID to order_id, or query by transaction_id. The API returns orders placed through the API and owned by the token’s account. Poll pending orders. A successful result may contain redeemable codes. Keep them out of logs and sharing channels.
GET /api/vas.php
curl -4 -sS -i "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/vas.php" \
-H "Authorization: Bearer $SIMCLOUD_API_TOKEN" \
--get \
--data-urlencode "order_id=$SIMCLOUD_VAS_ID"
HTTP 200 response excerpt
{
"status": "pending",
"service": "vas"
}