Skip to main content

Afriqiua Gaz Vouchers

3.5 Verifiy Afriquia Gaz Voucher Status:

This endpoint allows to retrieve the status of an Afriquia Gaz Voucher by its unique code.

GET /api/v1/shops/<shop_uuid>/vouchers/<voucher_code>

Response Parameters:

ParameterTypeDescription
statusstringThe status of the voucher (available|burned|canceled)
codestringUnique code ID of the voucher
points_amountfloatVoucher's points worth
customerstringE.164 format mobile number of the voucher owner

Sample Response:

[{
"status": "available",
"code": "dF54GFd7",
"points_amount": 10.55,
"customer": "+212612345678",
"created_at": "2022-01-21T10:16:57.131872+01:00"
},
{
"status": "available",
"code": "dF54GFd6",
"points_amount": 12.55,
"customer": "+212612475678",
"created_at": "2022-01-20T10:16:57.131872+01:00"
}]

3.6 Burn Afriquia Gaz Voucher(s)

This endpoint is somewhat similar to a Payment Request. It allows to burn one or more valid voucher(s) within a transaction by providing an array of the voucher(s) code(s) called vouchers alongside the other sale-related attributes (amount, order_id, terminal_id ...)

POST /api/v1/shops/<shop_uuid>/vouchers-burn

Request Parameters:

ParameterTypeDescription
terminal_idstringA unique ID for the POS/terminal/till
agent_idstring(optional) ID of the agent/cashier performing the transaction
agent_mobile_numberstring(optional) E.164 format or national (06/07xxxxxxxx) mobile number of the agent
amountfloatThe total amount of the sale
currencystringISO 4217 code of the currency of the completed sale (e.g. MAD for Moroccan dirham)
order_idstringA unique ID representing the completed sale that can be used later on to refund or for reconciliation
timestringISO 8601 string representing the time the sale was completed
customerstringE.164 format or national (06/07xxxxxxxx) mobile number of the voucher(s) owner
vouchersarrayNon-empty array containing valid voucher(s) code(s)

Sample Request:

{
"terminal_id": "POS_123456789",
"amount": 100.00,
"currency": "MAD",
"order_id": "TX_123456789",
"time": "2021-02-12T19:20:30+01:00",
"customer": "+212611223344",
"vouchers": [
"abcd0001",
"abcd0002",
"abcd0003"
]
}

Response Parameters:

ParameterTypeDescription
order_idstringThe unique ID representing this sale

Sample Response:

{
"order_id": "TX_123456789",
}