> ## 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.

# Confirm a Wasl Card Order and Retrieve Card Codes

> Finalise a reserved card order by submitting your payment reference, and receive redeemable card codes and numbers ready for delivery to your customers.

After initiating a card request and receiving a `transaction_id`, you call this endpoint to confirm the order and complete the purchase. Wasl processes the payment reference you provide and returns the actual card codes and card numbers that you deliver to your customers. This is the final step in the card order flow.

<Note>
  You must call [Initiate Card Request](/api-reference/orders/initiate-card-request) first and use the `transaction_id` it returns. Attempting to confirm an order without a valid `transaction_id` from a prior initiation will fail.
</Note>

## Endpoint

```
POST /api-service/card/confirm-order
```

**Base URL (Development)**

```
https://development.payzah.net
```

## Request Headers

| Header | Value |
| - | - |
| `Content-Type` | `application/json` |
| `Authorization` | `<your token>` |
| `Token` | `token` |

## Request Body

<ParamField body="transaction_id" type="string" required>
  The transaction ID returned by the [initiate-card-request](/api-reference/orders/initiate-card-request) endpoint. This links the confirmation to the earlier reservation.
</ParamField>

<ParamField body="total_amount" type="double" required>
  The total monetary amount for the order. This should match the value of the cards being confirmed.
</ParamField>

<ParamField body="payment_id" type="string" required>
  Your internal payment reference identifier. Use this to correlate the Wasl transaction with your payment records.
</ParamField>

### Example Request

```json Request theme={null}
{
  "transaction_id": "244101585669013",
  "total_amount": 6.6,
  "payment_id": "12345672312"
}
```

```bash cURL theme={null}
curl --request POST \
  --url https://development.payzah.net/api-service/card/confirm-order \
  --header 'Authorization: <your token>' \
  --header 'Content-Type: application/json' \
  --header 'Token: token' \
  --data '{
    "transaction_id": "244101585669013",
    "total_amount": 6.6,
    "payment_id": "12345672312"
  }'
```

## Response

On success, Wasl returns an array of card objects under the `data` key. Each object contains a redeemable code and a card number corresponding to one of the cards in your order.

<ResponseField name="status" type="boolean">
  `true` when the order was confirmed successfully.
</ResponseField>

<ResponseField name="code" type="string">
  A response code for the operation. `"11111"` indicates success.
</ResponseField>

<ResponseField name="data" type="array">
  An array of card objects — one entry per card in the order.

  <Expandable title="data item fields">
    <ResponseField name="card_code" type="string">
      The redeemable card code to deliver to your customer. Guard this value carefully — it has monetary value.
    </ResponseField>

    <ResponseField name="card_number" type="string">
      The card number associated with this card code.
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json Response theme={null}
{
  "status": true,
  "code": "11111",
  "data": [
    {
      "card_code": "QWERTY123",
      "card_number": "123456789"
    },
    {
      "card_code": "QWERTY123",
      "card_number": "123456789"
    }
  ]
}
```

<Warning>
  Deliver card codes to your customers promptly after receiving them. Card codes have monetary value — treat them as sensitive data in transit and at rest. If a card turns out to be faulty or unredeemable, use the **Cards Console Panel** to request a replacement from Wasl support.
</Warning>

<Tip>
  The number of objects in the `data` array will match the `quantiry` value you specified during the initiate step. Verify the count before delivering codes to customers.
</Tip>


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