Skip to main content

Afriquia Wallet Partner APIs

These endpoints expose partner-side B2B operations for Afriquia wallet credits.

Authentication

  • Uses signature authentication
HeaderDescription
X-SIGNATUREThe signature header of the request

See 2-security.md for signature generation details.

Base path

/api/v1/partner/afriquiawallet/

Endpoints

1) Main company balance

GET /api/v1/partner/afriquiawallet/brand/<brand_uuid>/balance

Response 200

{
"balance": "12000.00"
}

2) Main company subsidiaries balances

GET /api/v1/partner/afriquiawallet/brand/<brand_uuid>/shops/balances

Response 200

[
{
"shop_uuid": "4f5a2f26-9aa6-45f8-b7fb-34dc7466a8da",
"balance": "5000.00"
},
{
"shop_uuid": "ae834072-7f2d-4a1f-a3b1-b70d6cf6c807",
"balance": "7000.00"
}
]

3) Subsidiary balance

GET /api/v1/partner/afriquiawallet/shops/<shop_uuid>/balance

Response 200

{
"balance": "5000.00"
}

4) Subsidiary drivers balances

GET /api/v1/partner/afriquiawallet/shops/<shop_uuid>/drivers/balances

Returns staff drivers linked to the source shop.

Response 200

[
{
"customer_uuid": "a7e5f2f3-6b40-4c7e-926a-fef53ad9f9fa",
"customer_mobile_number": "+212600000001",
"balance": "120.00"
},
{
"customer_uuid": null,
"customer_mobile_number": "+212600000002",
"balance": "0.00"
}
]

5) Subsidiary drivers history

GET /api/v1/partner/afriquiawallet/shops/<shop_uuid>/drivers/history

Returns latest driver sales paid with Afriquia credits.

Response 200

[
{
"customer_mobile_number": "+212652106341",
"brand_name": "Afriquia",
"shop_name": "EL OUALIDIA",
"amount": "60.00",
"time": "2026-05-03T16:40:15.000000+01:00"
},
{
"customer_mobile_number": "+212652106341",
"brand_name": "Afriquia",
"shop_name": "STATION GOGADIR",
"amount": "20.00",
"time": "2026-05-03T16:10:03.000000+01:00"
}
]

6) Transfer credits: subsidiary to subsidiary

POST /api/v1/partner/afriquiawallet/transfers/shops

Request body

ParameterTypeDescription
source_shop_uuidstringSender shop UUID
destination_shop_uuidstringReceiver shop UUID
amountfloatTransfer amount
order_idstringPartner request ID

Sample request

{
"source_shop_uuid": "4f5a2f26-9aa6-45f8-b7fb-34dc7466a8da",
"destination_shop_uuid": "ae834072-7f2d-4a1f-a3b1-b70d6cf6c807",
"amount": 500.00,
"order_id": "partner_request_id_001"
}

7) Transfer credits: subsidiary to driver

POST /api/v1/partner/afriquiawallet/transfers/customers

Request body

ParameterTypeDescription
source_shop_uuidstringSender shop UUID
destination_customer_mobile_numberstringReceiver customer mobile number
destination_customer_namestringOptional customer name
destination_customer_addressstringOptional customer address
amountfloatTransfer amount
order_idstringPartner request ID

Sample request

{
"source_shop_uuid": "4f5a2f26-9aa6-45f8-b7fb-34dc7466a8da",
"destination_customer_mobile_number": "+212600000001",
"destination_customer_name": "Driver Name",
"destination_customer_address": "Casablanca",
"amount": 500.00,
"order_id": "partner_request_id_002"
}

Transfer responses

Success (201)

{
"status": "approved",
"uuid": "269cac45-0684-4338-8831-9d3f7324106d",
"order_id": "partner_request_id_001",
"time": "2026-05-03T16:45:30+01:00"
}

Errors (400)

Transfer and validation failures return HTTP 400.

{
"error": "Order id already used."
}