---
title: "Regenerate OTP code for an active OTP process"
method: POST
path: "/transaction/management/2fa/v1/regenerate/{transactionId}"
tags: ["One Time Passcode"]
---

# Regenerate OTP code for an active OTP process

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

## Path parameters

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

## Response `200`

OTP code was regenerated successfully

- SendResponseDtoEntityModel
  - `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
  - `time_to_live_in_seconds` integer, required — The time until the OTP process will expire and the OTP will be invalid.
  - `_links` Links

## Other responses

- `401` — Failed to authorize the client. Authorization information is either missing or invalid.
- `403` — The client is not authorized to perform the requested operation.
- `422` — OTP regeneration is not possible at the moment. Client should wait. or No more regeneration are allowed or The transaction is in a "terminal state" (successful, failed, etc.)
- `429` — Too Many Requests. The daily or total live SMS rate limit has been exceeded.
- `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)
