> For the complete documentation index, see [llms.txt](https://docs.finpay.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finpay.id/api-reference/finpay-money/linkage/registration/verify-otp.md).

# Verify OTP

This is a service used to verify or authenticate customers using One Time Password (OTP) to their mobile number via SMS. Customers need to input the unique random number generated by Finnet for the authentication process.

### Technical Specification <a href="#technical-specification" id="technical-specification"></a>

```
Service Code: 04
```

| Environment | Method | URL                                                   |
| ----------- | ------ | ----------------------------------------------------- |
| Development | POST   | <https://snapstag.finnet.co.id/v1.0/otp-verification> |
| Production  | POST   | <https://snap.finnet.co.id/v1.0/otp-verification>     |

### Body Request <a href="#body-request" id="body-request"></a>

| No | Name                       | Type   | Mandatory | Min Length | Max Length | Description                                             |
| -- | -------------------------- | ------ | --------- | ---------- | ---------- | ------------------------------------------------------- |
| 1  | originalPartnerReferenceNo | String | M         | 1          | 64         | Transaction identifier number from partner              |
| 2  | action                     | String | M         | 1          | 10         | Purpose of the OTP verification, filled with otpLinkage |
| 3  | otp                        | String | M         | 1          | 8          | OTP from SMS sent to customer phone number.             |

#### Sample Request <a href="#sample-request" id="sample-request"></a>

```
{
  "originalPartnerReferenceNo": "123456789876543431",
  "action": "otpCreation",
  "otp": "696969"
}
```

### Body Response <a href="#body-response" id="body-response"></a>

| No | Name                       | Type                                                                    | Mandatory | Min Length | Max Length | Description                                |
| -- | -------------------------- | ----------------------------------------------------------------------- | --------- | ---------- | ---------- | ------------------------------------------ |
| 1  | responseCode               | [Enum](/api-reference/appendix/enumeration/response-code-list.md)       | M         | 1          | 7          | BI SNAP Response Code.                     |
| 2  | responseMessage            | String                                                                  | M         | 1          | 150        | BI SNAP Response Message.                  |
| 3  | originalPartnerReferenceNo | String                                                                  | O         | 1          | 64         | Transaction identifier number from partner |
| 4  | linkageToken               | String                                                                  | O         | 1          | 204        | Access Token expiry time in ISO8601 format |
| 5  | phoneNo                    | String                                                                  | O         | 1          | 16         | Customer's phone number to be created      |
| 6  | qParamsURL                 | String                                                                  | O         | 1          | 100        | Redirect URL for binding actions           |
| 7  | qParams                    | [Object](/api-reference/appendix/json-object/qparams-object.md)         | O         | 1          | 1          | Query parameters for the qParamsURL        |
| 8  | additionalInfo             | [Object](/api-reference/appendix/json-object/additional-info-object.md) | O         | 1          | 2          | Additional Info                            |

#### Sample Response <a href="#sample-response" id="sample-response"></a>

```
{
  "responseCode": "2000400",
  "responseMessage": "Request has been processed successfully",
  "partnerReferenceNo": "78912343452347001",
  "linkageToken": {},
  "phoneNo": "+6281977817919",
  "qParamsUrl": "https://webview.finnet.co.id/partner/creation/pin-registration",
  "qParams": {
    "action": "otpLinkage"
  },
  "additionalInfo": {
    "clientId": "9719394d-af91-4f9c-9d16-6b6233a45889",
    "redirectToDeepLink": "https://snapstag.finnet.co.id/health"
  }
}
```

### Response Code & Message <a href="#response-code--message" id="response-code--message"></a>

The table below lists response codes and messages for the Verify OTP API.

| No | HTTP Code | Code    | Message                         |
| -- | --------- | ------- | ------------------------------- |
| 1  | 200       | 2000400 | Successful                      |
| 2  | 400       | 4000400 | Bad request                     |
| 3  | 400       | 4000401 | Invalid field format {field}    |
| 4  | 400       | 4000402 | Invalid mandatory field {field} |
| 5  | 401       | 4010401 | Invalid token (B2B)             |
| 6  | 401       | 4010400 | Unauthorised. \[Reason]         |
| 7  | 403       | 4030401 | Feature not allowed             |
| 8  | 403       | 4030404 | Activity count limit exceeded   |
| 9  | 404       | 4040408 | Invalid merchant                |
| 10 | 500       | 5000400 | General error                   |
| 11 | 504       | 5040400 | Timeout                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.finpay.id/api-reference/finpay-money/linkage/registration/verify-otp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
