Step 1 — Check available balance
Before you initiate any order, confirm that Wasl holds enough units of the card your customer wants. EndpointRequired headers
Request body fields
Response
Response
balance is less than the quantity your customer wants to purchase, show an out-of-stock message and do not proceed to the initiate step.
Step 2 — Initiate the card request
Once you have confirmed sufficient stock, reserve the cards by calling the Initiate Card Request endpoint. This creates a pending transaction and returns atransaction_id that you must use in the confirm step.
Endpoint
Required headers
Request body fields
The
quantiry field name is spelled this way in the Wasl API itself. You must pass the key exactly as quantiry — using the correct spelling (quantity) will cause the request to fail silently or be ignored.Step 3 — Confirm the order and receive card codes
After you have collected payment from your customer, call the Confirm Order endpoint to finalize the transaction. Wasl will verify the amount and release the card codes. EndpointRequired headers
Request body fields
Response
A successful response returns an array of card objects — one per unit ordered. Each object contains acard_code and a card_number to deliver to the customer.
Response
Response fields
Deliver the
card_code and card_number to your customer and persist the complete order record in your system.