Vendor
A vendor is a card brand or content provider available on the Wasl platform — for example, Xbox, PlayStation, or a retail gift card issuer. Each vendor is identified by a uniquevendor_id and may offer multiple card denominations under their brand.
When you call the Get Card List endpoint, the response groups cards by vendor. You typically cache vendor data locally and use it to populate brand-level navigation in your storefront.
Card names are returned in both English and Arabic to support multilingual storefronts. The English name is provided in the
name field and the Arabic name in the name_ar field. Display the appropriate version based on your customer’s locale.Card
A card is a specific denomination offered by a vendor — for example, an “Xbox $10” top-up card. Each card is identified by a uniquecard_id and carries two key numeric properties:
amount— the face value of the card (e.g., 10.00)balance— the quantity of that card type currently available in Wasl inventory (see Balance below)
Balance
Balance refers to the available stock quantity of a particular card type held by Wasl at any given moment. Before presenting a card to a customer or placing an order, call the Get Balance Details endpoint with the relevantcard_id to confirm that sufficient stock exists.
Transaction
A transaction represents a card order request. When you call the Initiate Card Request endpoint, Wasl creates a transaction and returns two identifiers:transaction_id— used when calling the Confirm Order endpoint to complete the purchasetransaction_number— the human-readable reference used in the Cards Console Panel (for example, when requesting a card replacement)
A transaction has a two-stage lifecycle: initiated (order placed, codes not yet issued) and confirmed (codes issued and ready to deliver). Always complete the confirm step — an initiated-but-unconfirmed transaction does not deliver card codes to the customer.
Token
A token is a session credential returned by the Authentication API (POST /api-service/card/login). Every request to every other endpoint must include the token in the Token HTTP header. Without a valid token, the API returns error code 10000 (Incorrect Token Access).
Tokens are scoped to your merchant account and tied to the IP address registered with Wasl. If your token expires or becomes invalid, re-authenticate by calling the login endpoint again.
Webhook
A webhook is an HTTP POST callback that Wasl sends to a URL you provide whenever a notable event occurs — such as an order status update or a platform system event. Your endpoint must respond with an HTTP200 status to acknowledge receipt.
Webhooks allow your system to react to events asynchronously rather than polling the API. Configure your webhook endpoint to be publicly accessible and protected against unauthorised requests.
Cards Console Panel
The Cards Console Panel is the Wasl-hosted merchant dashboard. It provides two key capabilities:- Card Replacement — if a customer receives a card code that cannot be redeemed, enter the associated transaction number in the Console to generate a replacement card automatically.
- Sales Reporting — view a summary of your total sales volume and transaction amounts across all card types.
The Cards Console Panel is separate from the API itself. You access it via the Wasl merchant portal using your registered credentials. Use it as an operational tool for support and reconciliation, not as a substitute for the API in your integration.
Environments
Wasl provides two completely isolated environments. Use Development while building and testing your integration, and switch to Production only when you are ready to go live.Error Codes Reference
When an API call fails, Wasl returns a JSON response containing a numeric error code. Use the table below to diagnose and handle errors in your integration.For error
10001, implement retry logic with exponential back-off. For error 10006, call Get Balance Details before retrying so you can present accurate stock information to your customer.