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

# Collect OTT Voucher payments in Botswana

> Charge a BWP customer paying with an OTT Voucher by redeeming their voucher PIN.

Use this recipe to collect a `BWP` payment from a customer paying with an OTT Voucher in Botswana.

This differs from a normal mobile money prompt: the customer must **already hold an OTT Voucher
PIN**. You send that PIN as `voucherPin` in the charge request.

<Warning>
  Do not ask for any wallet PIN. Zerocash needs only the OTT Voucher PIN and the customer's phone
  number.
</Warning>

## Step 1. Show the customer voucher instructions

```text Customer copy theme={null}
1. Enter your phone number. Your digital receipt will be sent there.
2. Buy an OTT Voucher from a physical outlet or a digital vendor.
3. Enter the voucher PIN/code from your printed slip, SMS, or email.
4. Click Complete to verify and redeem the voucher.
5. Wait for confirmation. Your balance will update once the voucher is validated.
```

## Step 2. Choose the operator code

OTT Voucher in Botswana is `ott-voucher`. Confirm against
[mobile money operators](/guides/mobile-money-operators) and send it as `momoOperatorId`.

<Note>
  `ott-voucher` is enabled for **collections only** — it cannot be used as a payout destination.
</Note>

## Step 3. Create the charge with `voucherPin`

The voucher PIN is 16 characters.

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url "https://api.zerocash.tech/api/b2b/fiat/deposit/momo" \
    --header "Authorization: Bearer $ZEROCASH_TOKEN" \
    --header "content-type: application/json" \
    --data '{
      "amount": 100,
      "currency": "BWP",
      "phoneNumber": "26770000000",
      "momoOperatorId": "ott-voucher",
      "externalReference": "order_ott_bwp_12345",
      "voucherPin": "1111111111111111"
    }'
  ```

  ```javascript Node.js theme={null}
  const axios = require("axios");

  const ZEROCASH_TOKEN = process.env.ZEROCASH_TOKEN;
  const BASE_URL = "https://api.zerocash.tech/api/b2b";

  async function collectOttVoucherBotswana({ amount, phoneNumber, voucherPin, externalReference }) {
    const headers = {
      accept: "application/json",
      "content-type": "application/json",
      Authorization: `Bearer ${ZEROCASH_TOKEN}`,
    };

    const chargeResponse = await axios.post(
      `${BASE_URL}/fiat/deposit/momo`,
      {
        amount,
        currency: "BWP",
        phoneNumber,
        momoOperatorId: "ott-voucher",
        externalReference,
        voucherPin,
      },
      { headers },
    );

    const transactionId = chargeResponse.data.transactionId;
    const transactionResponse = await axios.get(
      `${BASE_URL}/transactions/${transactionId}`,
      { headers },
    );

    return {
      charge: chargeResponse.data,
      transaction: transactionResponse.data,
    };
  }

  collectOttVoucherBotswana({
    amount: 100,
    phoneNumber: "26770000000",
    voucherPin: "1111111111111111",
    externalReference: "order_ott_bwp_12345",
  })
    .then(console.log)
    .catch((error) => {
      console.error(error.response?.data || error.message);
    });
  ```
</CodeGroup>

```json Response theme={null}
{
  "success": true,
  "message": "Initiated request.",
  "transactionId": "123456789"
}
```

A successful response means accepted for processing. Store the `transactionId` and your
`externalReference` for reconciliation.

## Step 4. Confirm the final status

```bash theme={null}
curl --request GET \
  --url "https://api.zerocash.tech/api/b2b/transactions/123456789" \
  --header "Authorization: Bearer $ZEROCASH_TOKEN" \
  --header "accept: application/json"
```

Only fulfil the order once the transaction reaches a successful final state.

## Step 5. Handle common issues

| Issue                               | What to check                                                                             |
| :---------------------------------- | :---------------------------------------------------------------------------------------- |
| `voucherPin` is required            | The provider requires `voucherPin` — collect it before creating the charge.               |
| Invalid voucher                     | Confirm the PIN was entered exactly as shown, without spaces. Vouchers are single-use.    |
| Amount must equal the voucher value | The charge `amount` has to match the voucher's face value exactly.                        |
| Operator not found                  | Confirm the OTT Voucher code in [mobile money operators](/guides/mobile-money-operators). |
| Transaction remains pending         | Wait for webhook updates or poll the transaction. Do not fulfil until final success.      |
