# Send Payment

Request to sends a payment from a wallet. The application needs to provide a lightning invoice or Ninjapay username(@ninjatag). We recommend using **ninjatag**(Ninjapay username) for sending BTC rewards/cashbacks/payments to users, since it's instant and zero network fee.

#### **Method**

```

POST https://api.ninjapay.me/lapi/v1/send

```

#### **Parameters**

```javascript
Body (application/json)
 {
  payment_mode: string; // ninjatag, lightning
  ninjatag?: string; // Add this username if you want to send to other ninjapay users
  lightning_invoice?: string; // Add this if you want to send payment via lightning
  lightning_invoice_type?: string; // "invoice"(default) and "lnurl" currently supported (amount required for lnurl type)
  amount?: string; // Amount should be entered in BTC, not SAT. (Amount is not required for lightning_invoice_type is "invoice")
  fiat_value?: string;
  fiat_currency?: string; // INR, USD, EUR...
  description?: string;
  customer_name?: string;
  order_id?: string;
  extra?: {}
}
```

#### **Other info**

| Parameters               | Input options            |
| ------------------------ | ------------------------ |
| `payment_mode`           | `ninjatag` , `lightning` |
| `lightning_invoice_type` | `invoice` , `lnurl`      |

#### **Response**

```json
{
    "status": bool,
    "data": {
        "tid": string
    },
    "message": string
}
```

#### **Example**

{% code overflow="wrap" %}

```javascript

const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'API_KEY' //Admin key required
  },
  body: '{"payment_mode":"ninjatag","amount":0.0018,"description":"sample_description","ninjatag":"nakamoto","order_id":"21"}'
};

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

{% endcode %}

**Note:** You need to use `Admin key` for this request!\
\
**Ex Response**\
Body (application/json)

```json
 {
    "status": true,
    "data": {
        "tid": "128390A389H2920"
    },
    "message": "Paid"
}
```


---

# 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/send-payment.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.
