# OTP Control

If there is an OTP requirement in card storage transactions, it validates the code generated in the OTP sending service

{% hint style="success" %}
&#x20;<https://api.paynet.com.tr/v1/card/check_otp>
{% endhint %}

{% tabs %}
{% tab title="Request Parameters" %}

| Parameter Name                 | Type   | Required | Description                                                          |
| ------------------------------ | ------ | -------- | -------------------------------------------------------------------- |
| **otp\_code**                  | string | Yes      | The Last user's number sent as a parameter in the send\_otp service. |
| **otp\_session*****\_*****id** | string | Yes      | The unique value that will be associate with the OTP.                |
| **user\_gsm**                  | string | Yes      | OTP verification in format of 5XXXXXXXXXX, gsm no.                   |

{% endtab %}

{% tab title="Response Parameters" %}

| Parameter Name | Type   | Description                                                                                            |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| **code**       | string | Code of response result. [Expr](https://doc.paynet.com.tr/genel-bilgiler/hata-kodlari/doenues-kodlari) |
| **message**    | string | Response result message.                                                                               |
| {% endtab %}   |        |                                                                                                        |

{% tab title="Request" %}

```
{  
   "user_gsm":"5324818942",
   "otp_session_id":"123456",
   "otp_code":"ART2"
}
```

{% endtab %}

{% tab title="Response" %}

```
{  
   "code":0,
   "message":"Başarılı İşlem"
}
```

{% endtab %}

{% tab title="Service URL" %}

| System          | URL                                                                                                                                                                                                     |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Live System** | [https://api.paynet.com.tr\[/v1/card/check\\\_otp](https://doc.paynet.com.tr/english/card-save/https:/api.paynet.com.tr\[/v1/card/check\\_otp)]\(<https://api.paynet.com.tr/v1/card/check_otp>)         |
| **Test System** | [https://pts-api.paynet.com.tr\[/v1/card/check\\\_otp](https://doc.paynet.com.tr/english/card-save/https:/pts-api.paynet.com.tr\[/v1/card/check\\_otp)]\(<https://api.paynet.com.tr/v1/card/check_otp>) |
| {% endtab %}    |                                                                                                                                                                                                         |
| {% endtabs %}   |                                                                                                                                                                                                         |
