# Redeem Voucher

Redeem a particular voucher using the voucher code.

#### **Method**

```

GET https://api.ninjapay.me/lapi/v1/revokeVoucher

```

#### **Parameters**

```javascript
Body (application/json)
{
  "voucher_code": string, // Voucher code of a particular voucher
  "redeem_mode": string, // "ninjatag" or "invoice" as inputs.... ninjatag is basically username of ninjapay user & "invoice" means a btc lightning invoice
  "redeem_to": string, // add username(ninjatag) or lightining invoice(lnbc....82je)
}
```

#### **Other info**

| Parameters    | Input options          |
| ------------- | ---------------------- |
| `redeem_mode` | `ninjatag` , `invoice` |

#### **Response**

<pre class="language-json"><code class="lang-json"><strong>{  
</strong><strong> "status": true, 
</strong>    "data":{
      "voucher_code": "7ee15185",
      "redeemed": true,
      "redeemed_mode": "ninjatag",
      "redeemed_by": "satoshinakamoto",
      "redeemed_tid": 628660213994,
      "redeemed_at": 1714912921
    },
  "message": ""
}
    
</code></pre>

#### **Code Example**

```jsx

const options = {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'API_KEY' 
  },
  body: '{"voucher_code": "7ee15185"}'
};

fetch('https://api.ninjapay.me/lapi/v1/redeemVoucher', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ninjapay.gitbook.io/ninjapay-api-docs/how-to/api-reference-btc/withdraw-vouchers/redeem-voucher.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
