> For the complete documentation index, see [llms.txt](https://docs.xtrakit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xtrakit.com/overview/payments/send-momo-otp.md).

# Send MoMo OTP

## Endpoint

<mark style="color:$warning;">**`POST`**</mark> `https://api.xtrakit.com/api/v1/momo/send-otp`

## Headers

`Authorization: Bearer API_KEY`

## **Request Body**

<table><thead><tr><th width="289">Parameters</th><th width="100">Type</th><th>Description</th></tr></thead><tbody><tr><td><p>customer_contact</p><p><code>string</code></p></td><td>Required</td><td>The customer's number that will receive the OTP for payment</td></tr></tbody></table>

## Sample Requests <a href="#sample-requests" id="sample-requests"></a>

{% tabs %}
{% tab title="PHP" %}
{% code fullWidth="true" %}

```php
<?php
$curl = curl_init();

$data = [
  'customer_contact' => '+233240000000',
];

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.xtrakit.com/api/v1/momo/send-otp',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data,
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer API_KEY', // Replace 'API_KEY' with your actual API key
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>
```

{% endcode %}
{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

const data = {
  'customer_contact' => '+233240000000',
};

const config = {
    method: 'post',
    url: 'https://api.xtrakit.com/api/v1/momo/send-otp',
    headers: {
        'Authorization': 'Bearer API_KEY' // Replace 'API_KEY' with your actual API key
    },
    data: data
};

axios(config).then(function(response) {
    console.log(JSON.stringify(response.data));
}).catch(function(error) {
    console.error(error);
});
```

{% endtab %}
{% endtabs %}

## Sample Response

{% tabs %}
{% tab title="Success" %}

```json
{
    "status": '200',
    "data": null,
    "message": "An OTP has been sent to +233240000000"
}
```

{% endtab %}

{% tab title="Error" %}

```json
{
    "status": 401,
    "error": "Unauthorized: Missing Bearer Token"
},

{
    "status": 401,
    "error": "Unauthorized: Invalid API Key"
}
```

{% endtab %}
{% endtabs %}
