> 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/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](/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](/appendix/json-object/qparams-object.md)         | O         | 1          | 1          | Query parameters for the qParamsURL        |
| 8  | additionalInfo             | [Object](/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
