# Request OTP to initiate payout

If you require OTP to be sent before payout is initiated, you can configure OTP authorisation on the Duplo Dashboard by clicking on Payout API under Developer section on the Settings page

You can choose to receive the OTP via email address or for phone number.

<figure><img src="https://3240640353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6pUuKn4YJfnLrGRaudp%2Fuploads%2FJGNJYpDbQO2iowedUOzk%2Fphoto_2023-12-13_14-14-49.jpg?alt=media&#x26;token=7e02555a-a1ce-402c-910b-b925d205187b" alt=""><figcaption></figcaption></figure>

### URI

<mark style="color:blue;background-color:blue;">**POST**</mark>

```
https://api.tryduplo.com/v1/recipients/payouts-otp
```

### Parameters

#### Header

<table data-header-hidden><thead><tr><th width="536"></th><th></th></tr></thead><tbody><tr><td><strong>Authorization</strong><br><code>string</code></td><td>set value to <code>Bearer SECRET_KEY</code></td></tr></tbody></table>

#### Body Param

<table data-header-hidden><thead><tr><th width="260"></th><th></th></tr></thead><tbody><tr><td><strong>business_id</strong><br><code>string</code> <mark style="color:red;"><code>required</code></mark></td><td>Merchant business ID</td></tr></tbody></table>

### Sample request

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

```powershell
curl --location --request POST 'https://api.tryduplo.com/v1/recipients/payouts-otp' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "business_id": "2e5071-59cb-4057-a14b-d49a3c90ef"
}'
```

{% endtab %}

{% tab title="Node" %}

```javascript
const axios = require('axios');
const data = JSON.stringify({
  "business_id": "2e5071-59cb-4057-a14b-d49a3c90ef"
});

const config = {
  method: 'post',
  url: 'https://api.tryduplo.com/v1/recipients/payouts-otp',
  headers: {
   'Authorization': 'Bearer SECRET_KEY',
   'Content-Type': 'application/json'
 },
  data : data
};

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

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.tryduplo.com/v1/recipients/payouts-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 =>'{
    "business_id": "2e5071-59cb-4057-a14b-d49a3c90ef"
}',
 CURLOPT_HTTPHEADER => array(
   'Authorization: Bearer SECRET_KEY',
   'Content-Type: application/json'
 ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}
