> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gowasl.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Wasl B2B Cards API: Sell Digital Gift Cards and Vouchers

> Learn how the Wasl Cards API lets merchants connect to a cards and vouchers platform to sell digital gift cards through their own sales channels.

The Wasl Cards API gives merchants a direct, programmatic connection to Wasl's Cards and Vouchers platform so you can offer digital gift cards and vouchers through any sales channel you operate. Whether you run a web storefront, a mobile app, or a point-of-sale system, this API lets you browse available card products, check stock, place orders, and retrieve redeemable card codes — all without leaving your own application.

## What You Can Do

<CardGroup cols={2}>
  <Card title="Browse the Card Catalog" icon="list">
    Retrieve the full list of vendors and their card denominations available to your merchant account, then cache them locally for fast storefront display.
  </Card>

  <Card title="Check Available Stock" icon="chart-bar">
    Query real-time balance information for any specific card type before presenting it to a customer, preventing failed orders.
  </Card>

  <Card title="Place and Confirm Orders" icon="shopping-cart">
    Initiate a card order with a card ID and quantity, receive a transaction ID, then confirm the order to get back the redeemable card codes.
  </Card>

  <Card title="Manage Cards via Console" icon="display">
    Use the Wasl Cards Console Panel to replace faulty cards and generate sales reports directly from a merchant dashboard.
  </Card>
</CardGroup>

## Protocol and Data Format

The Wasl Cards API is a **REST API** that runs over TCP/IP. All request and response bodies use **JSON**. Every API call requires a `Content-Type: application/json` header and a valid authentication token passed in the `Token` header.

<Info>
  Familiarity with a server-side language such as JSP, ASP .NET, PHP, or Java is a prerequisite for integrating with this API.
</Info>

## Environments

Wasl provides two isolated environments so you can build and test without affecting live transactions.

| Environment | Base URL |
| - | - |
| **Development** | `https://development.Payzah.net/` |
| **Production** | `https://Payzah.net/production770/` |

<Warning>
  Always complete your full integration and testing cycle in the Development environment before switching to Production. Orders placed in Production are live and consume real card inventory.
</Warning>

## The Card Lifecycle

Every transaction with the Wasl Cards API follows the same six-step lifecycle. Understanding this flow upfront will help you design your integration cleanly.

<Steps>
  <Step title="Authenticate">
    Call the Authentication API to exchange your credentials for a session token. Pass this token in every subsequent request.
  </Step>

  <Step title="Load the Catalog">
    Call the Get Card List and Get Card Details endpoints once and cache the results in your system to power your storefront.
  </Step>

  <Step title="Present Cards to Customer">
    Display the cached card catalog in your sales channel and let the customer select a card and quantity.
  </Step>

  <Step title="Check Balance">
    Before proceeding, query available stock for the selected card type to confirm Wasl can fulfil the order.
  </Step>

  <Step title="Initiate Order">
    Submit the card ID and quantity. Wasl returns a `transaction_id` that you store against the pending order.
  </Step>

  <Step title="Confirm Order">
    Confirm the order using the `transaction_id`. Wasl responds with the redeemable card codes to deliver to your customer.
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Get Started" icon="rocket" href="/getting-started">
    Register your merchant account, receive your credentials, and make your first API call.
  </Card>

  <Card title="Request Flow Guide" icon="diagram-project" href="/guides/request-flow">
    Walk through the complete end-to-end API request flow with code examples for every step.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.