---
title: "Validate an OTP code"
method: POST
path: "/transaction/management/2fa/v1/verify/{transactionId}"
tags: ["One Time Passcode"]
---

# Validate an OTP code

`POST /transaction/management/2fa/v1/verify/{transactionId}`

## Path parameters

- `transactionId` string, required — The id of the transaction that initialized the OTP process

## Request body

- VerificationRequestDto — Message sent to verify a OTP code
  - `otp_code` string, required — The OTP code given by the customer

## Response `200`

OTP code verified successfully

- ApiResponseDtoEntityModel
  - `timestamp` string, date-time, required — When the response was generated
  - `regeneration_possible_in_seconds` integer — The time until another OTP can be sent. Might be null in error responses or when the OTP is verified.
  - `ratepay_transaction_id` string, required — The id of the transaction that was tied to the OTP process
  - `result` 'otp_sent' | 'unexpected_client_input' | 'otp_verified' | 'otp_regenerated' | 'unexpected_server_error' | 'otp_exists' | 'otp_failed' | 'verify_attempt_failed' | 'no_more_verification_attempts_left' | 'transaction_not_found' | 'no_more_regeneration_attempts_left' | 'retry_regeneration_later' | 'no_authorization_data_provided' | 'authorization_data_invalid' | 'no_claims_provided' | 'authorization_data_not_processable' | 'transaction_access_not_allowed' | 'otp_live_daily_sms_rate_limit_exceeded' | 'otp_live_total_sms_rate_limit_exceeded_talk_to_ratepay', required — The machine-readable outcome of the operation of the OTP process
  - `message` unknown, required
  - `_links` Links

## Other responses

- `400` — Input validation error. The sent request could not be parsed or was otherwise invalid. The response will include information on the wrong fields.
- `401` — Failed to authorize the client. Authorization information is either missing or invalid.
- `403` — The client is not authorized to perform the requested operation.
- `404` — The transaction either does not exist
- `422` — OTP verification failed because the provided OTP code was invalid or OTP process failed.
- `500` — Unexpected server error

---

[API](https://skmtc.net/ratepay/apis/one-time-passcode-api.md) · [All operations](https://skmtc.net/ratepay/apis/one-time-passcode-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ratepay/one-time-passcode-api/versions/3316a23fcbed/schema)
