Use One-Time Passwords (OTPs) to confirm that a customer controls a phone number or email address before you sign them in, change sensitive account data, or approve an action. Inttegro generates and sends the time-limited code; your application should continue only after verification returns a
Inttegro.OTPVerificationVerdict.Pass"pass"otp.VerificationVerdictPassOtpVerificationVerdict.PASS\Inttegro\Otp\VerificationVerdict::Passinttegro.otp.VerificationVerdict.PASSInttegro::Otp::VerificationVerdict::PASSInttegro.OtpVerificationVerdicts.Pass verdict.
The OTP transaction object
An OTP transaction represents one code from generation through delivery and verification. Initiation and lookup responses never expose the generated code: collect the code from the customer, then submit that value to the verify endpoint.
Properties
OtpTransactionv13.1.0Go SDK responseTransactionv14.0.0Java SDK responseOtpTransactionv11.1.0PHP SDK responseOTPTransactionv15.0.0Python SDK responseTransactionv15.0.0Ruby SDK responseTransactionv13.0.0TypeScript SDK responseOtpTransactionv15.0.0- #
CancelReasoncancel_reasonCancelReasoncancelReasoncancelReasoncancel_reasoncancel_reasoncancelReasonstring?stringstringStringstringstr | NoneT.nilable(String)string | nullExplanation for why this transaction was canceled. Omitted unless
Statustransaction.statusStatusstatusstatusstatusstatusstatusisInttegro.OTPStatus.Canceled"canceled"otp.StatusCanceledOtpStatus.CANCELED\Inttegro\Otp\Status::Canceledinttegro.otp.Status.CANCELEDInttegro::Otp::Status::CANCELEDInttegro.OtpStatuses.Canceled. - #
CanceledAtcanceled_atCanceledAtcanceledAtcanceledAtcanceled_atcanceled_atcanceledAtDateTimeOffset?timestamp*TimeOffsetDateTimeDateTimeImmutabledatetime | NoneT.nilable(Time)Date | nullWhen this transaction was canceled. Omitted unless
Statustransaction.statusStatusstatusstatusstatusstatusstatusisInttegro.OTPStatus.Canceled"canceled"otp.StatusCanceledOtpStatus.CANCELED\Inttegro\Otp\Status::Canceledinttegro.otp.Status.CANCELEDInttegro::Otp::Status::CANCELEDInttegro.OtpStatuses.Canceled. - #
ExpiresAtexpires_atExpiresAtexpiresAtexpiresAtexpires_atexpires_atexpiresAtDateTimeOffset?timestampTimeOffsetDateTimeDateTimeImmutabledatetimeTimeDateWhen this token expires and can no longer be verified.
- #
FullMessagefull_messageFullMessagefullMessagefullMessagefull_messagefull_messagefullMessagestring?stringstringStringstringstrStringstringThe message template with the service name substituted and the token placeholder preserved as
{token}. The token value is not included in this field. - #
InitiatedAtinitiated_atInitiatedAtinitiatedAtinitiatedAtinitiated_atinitiated_atinitiatedAtDateTimeOffset?timestampTimeOffsetDateTimeDateTimeImmutabledatetimeTimeDateWhen this transaction was created and token generation began.
- #
StatusstatusStatusstatusstatusstatusstatusstatusstring?stringStatusOtpStatusstringLiteral['canceled', 'expired', 'pending', 'pending_delivery', 'pending_verification', 'verified']OTP::StatusOTPStatusCurrent transaction status. Possible values are
Inttegro.OTPStatus.Canceled"canceled"otp.StatusCanceledOtpStatus.CANCELED\Inttegro\Otp\Status::Canceledinttegro.otp.Status.CANCELEDInttegro::Otp::Status::CANCELEDInttegro.OtpStatuses.Canceled,Inttegro.OTPStatus.Expired"expired"otp.StatusExpiredOtpStatus.EXPIRED\Inttegro\Otp\Status::Expiredinttegro.otp.Status.EXPIREDInttegro::Otp::Status::EXPIREDInttegro.OtpStatuses.Expired,Inttegro.OTPStatus.Pending"pending"otp.StatusPendingOtpStatus.PENDING\Inttegro\Otp\Status::Pendinginttegro.otp.Status.PENDINGInttegro::Otp::Status::PENDINGInttegro.OtpStatuses.Pending,Inttegro.OTPStatus.PendingDelivery"pending_delivery"otp.StatusPendingDeliveryOtpStatus.PENDING_DELIVERY\Inttegro\Otp\Status::PendingDeliveryinttegro.otp.Status.PENDING_DELIVERYInttegro::Otp::Status::PENDING_DELIVERYInttegro.OtpStatuses.PendingDelivery,Inttegro.OTPStatus.PendingVerification"pending_verification"otp.StatusPendingVerificationOtpStatus.PENDING_VERIFICATION\Inttegro\Otp\Status::PendingVerificationinttegro.otp.Status.PENDING_VERIFICATIONInttegro::Otp::Status::PENDING_VERIFICATIONInttegro.OtpStatuses.PendingVerification, andInttegro.OTPStatus.Verified"verified"otp.StatusVerifiedOtpStatus.VERIFIED\Inttegro\Otp\Status::Verifiedinttegro.otp.Status.VERIFIEDInttegro::Otp::Status::VERIFIEDInttegro.OtpStatuses.Verified.Inttegro.OTPStatus.PendingDelivery"pending_delivery"otp.StatusPendingDeliveryOtpStatus.PENDING_DELIVERY\Inttegro\Otp\Status::PendingDeliveryinttegro.otp.Status.PENDING_DELIVERYInttegro::Otp::Status::PENDING_DELIVERYInttegro.OtpStatuses.PendingDeliverymeans delivery-attempt fields are not available yet;Inttegro.OTPStatus.PendingVerification"pending_verification"otp.StatusPendingVerificationOtpStatus.PENDING_VERIFICATION\Inttegro\Otp\Status::PendingVerificationinttegro.otp.Status.PENDING_VERIFICATIONInttegro::Otp::Status::PENDING_VERIFICATIONInttegro.OtpStatuses.PendingVerificationmeans the message was sent and the transaction is waiting for a verification attempt. #
TransmissiontransmissionTransmissiontransmissiontransmissiontransmissiontransmissiontransmissionChimeTransmission?object*TransmissionOtpTransmissionarray<string, mixed>OTPTransmission | NoneT.nilable(OTP::Transmission)OtpTransmission | nullDelivery details for the OTP message. Recipient and sender are always present; attempt fields are omitted until delivery begins.Click or tap to expand- #
SentViasent_viaSentViasentViasentViasent_viasent_viasentViastring?stringstringStringstringLiteral['sms'] | NoneT.nilable(Chime::Transport)stringDelivery mechanism:"sms""sms""sms""sms"'sms''sms''sms'"sms"or"email""email""email""email"'email''email''email'"email". Omitted until the delivery attempt starts. - #
StatusstatusStatusstatusstatusstatusstatusstatusstring?stringTransmissionStatusOtpTransmissionStatusstringLiteral['delivered', 'failed', 'submitted'] | NoneT.nilable(OTP::TransmissionStatus)OTPTransmissionStatusDelivery status:Inttegro.OTPTransmissionStatus.Submitted"submitted"otp.TransmissionStatusSubmittedOtpTransmissionStatus.SUBMITTED\Inttegro\Otp\TransmissionStatus::Submittedinttegro.otp.TransmissionStatus.SUBMITTEDInttegro::Otp::TransmissionStatus::SUBMITTEDInttegro.OtpTransmissionStatuses.Submitted,Inttegro.OTPTransmissionStatus.Delivered"delivered"otp.TransmissionStatusDeliveredOtpTransmissionStatus.DELIVERED\Inttegro\Otp\TransmissionStatus::Deliveredinttegro.otp.TransmissionStatus.DELIVEREDInttegro::Otp::TransmissionStatus::DELIVEREDInttegro.OtpTransmissionStatuses.Delivered, orInttegro.OTPTransmissionStatus.Failed"failed"otp.TransmissionStatusFailedOtpTransmissionStatus.FAILED\Inttegro\Otp\TransmissionStatus::Failedinttegro.otp.TransmissionStatus.FAILEDInttegro::Otp::TransmissionStatus::FAILEDInttegro.OtpTransmissionStatuses.Failedfor SMS.acceptedmeans an email provider accepted the send, not that the inbox received it. Omitted until the delivery attempt.
Initiate OTP transaction POST /otp/initiate
Generate a one-time password, deliver it by SMS to an international phone number or by email to a bare email address, and return a typed transaction ID for verification.
Required attributes
InitiateParamsv14.0.0Java SDK requestInitiateOtpParamsv11.1.0PHP SDK requestv15.0.0Python SDK requestInitiateRequestv15.0.0Ruby SDK requestOTP::InitiateRequestv13.0.0TypeScript SDK requestInitiateOtpRequestv15.0.0- #
ServiceNameservice_nameServiceNameserviceName(…)serviceNameservice_nameservice_nameserviceNamestringstringstringStringstringstrStringstringService or application name substituted for
{service}in the message template. Length: 2-20 characters. - #
PurposepurposePurposepurpose(…)purposepurposepurposepurposeenumenumstringStringstring enumLiteral['account_creation', 'account_recovery', 'email_verification', 'financial_account_verification', 'password_reset', 'payment_confirmation', 'payment_method_verification', 'payout_confirmation', 'phone_verification', 'sensitive_action', 'sign_in', 'transaction_confirmation', 'unspecified', OTPPurpose.ACCOUNT_CREATION, OTPPurpose.ACCOUNT_RECOVERY, OTPPurpose.EMAIL_VERIFICATION, OTPPurpose.FINANCIAL_ACCOUNT_VERIFICATION, OTPPurpose.PASSWORD_RESET, OTPPurpose.PAYMENT_CONFIRMATION, OTPPurpose.PAYMENT_METHOD_VERIFICATION, OTPPurpose.PAYOUT_CONFIRMATION, OTPPurpose.PHONE_VERIFICATION, OTPPurpose.SENSITIVE_ACTION, OTPPurpose.SIGN_IN, OTPPurpose.TRANSACTION_CONFIRMATION, OTPPurpose.UNSPECIFIED]OTP::PurposeOTPPurposerequiredIntent of the verification flow. Supported values are
account_creation,account_recovery,email_verification,financial_account_verification,password_reset,payment_confirmation,payment_method_verification,payout_confirmation,phone_verification,sensitive_action,sign_in,transaction_confirmation, andunspecified. Unsupported values are rejected. Useunspecifiedexplicitly for a general verification request. - #
TokenSizetoken_sizeTokenSizetokenSize(…)tokenSizetoken_sizetoken_sizetokenSizelongintegerintIntegerintintIntegernumberGenerated token length. The current API requires a value from 5 through 10, inclusive.
Optional attributes
InitiateParamsv14.0.0Java SDK requestInitiateOtpParamsv11.1.0PHP SDK requestv15.0.0Python SDK requestInitiateRequestv15.0.0Ruby SDK requestOTP::InitiateRequestv13.0.0TypeScript SDK requestInitiateOtpRequestv15.0.0- #
AsyncDeliveryasync_deliveryAsyncDeliveryasyncDelivery(…)asyncDeliveryasync_deliveryasync_deliveryasyncDeliveryboolboolean*boolBooleanboolboolT.nilable(T::Boolean)booleanWhen
falsefalsefalsefalsefalseFalsefalsefalseor omitted, the request waits for the initial transmission attempt. WhentruetruetruetruetrueTruetruetrue, the transaction can be returned before transmission details are available, with statusInttegro.OTPStatus.PendingDelivery"pending_delivery"otp.StatusPendingDeliveryOtpStatus.PENDING_DELIVERY\Inttegro\Otp\Status::PendingDeliveryinttegro.otp.Status.PENDING_DELIVERYInttegro::Otp::Status::PENDING_DELIVERYInttegro.OtpStatuses.PendingDelivery.
- #
MessageTemplatemessage_templateMessageTemplatemessageTemplate(…)messageTemplatemessage_templatemessage_templatemessageTemplatestringstringstringStringstringstrT.nilable(String)stringCustom SMS body or email copy. It must include
{token}exactly once and can include{service}. Email sends it as the plain-text fallback and renders the copy around the code in a branded HTML layout. For email, custom copy overrides the purpose-specific default body, but the selected purpose still controls the subject and heading. If omitted, the API uses its transport-specific purpose-aware template. - #
TransporttransportTransporttransporttransporttransporttransporttransportenumenumstring enumenumstring enumEnumT.nilable(Chime::Transport)string unionOptional
"sms""sms""sms""sms"'sms''sms'Inttegro::Chime::Transport::SMS"sms"or"email""email""email""email"'email''email'Inttegro::Chime::Transport::EMAIL"email". A phone recipient selects SMS and an email recipient selects email when omitted. - #
TokenAlphabettoken_alphabetTokenAlphabettokenAlphabet(…)tokenAlphabettoken_alphabettoken_alphabettokenAlphabetstringstringstringStringstringstrT.nilable(String)stringCustom alphabet for token generation. Pass a string of characters to use (for example,
"0123456789ABCDEF""0123456789ABCDEF""0123456789ABCDEF""0123456789ABCDEF"'0123456789ABCDEF''0123456789ABCDEF''0123456789ABCDEF'"0123456789ABCDEF"for hexadecimal tokens). Mutually exclusive withTokenAlphabetTypetoken_alphabet_typeTokenAlphabetTypetokenAlphabetTypetoken_alphabet_typetoken_alphabet_typetoken_alphabet_typetokenAlphabetType—use one or the other, not both. - #
TokenAlphabetTypetoken_alphabet_typeTokenAlphabetTypetokenAlphabetType(…)tokenAlphabetTypetoken_alphabet_typetoken_alphabet_typetokenAlphabetTypeenumenumAlphabetTypeOtpAlphabetTypestring enumLiteral['numeric', 'alpha', 'alphanumeric', OTPAlphabetType.NUMERIC, OTPAlphabetType.ALPHA, OTPAlphabetType.ALPHANUMERIC]T.nilable(OTP::AlphabetType)OTPAlphabetTypePredefined alphabet type for token generation. Supported values are
Inttegro.OTPAlphabetType.Alpha"alpha"otp.AlphabetTypeAlphaOtpAlphabetType.ALPHA\Inttegro\Otp\AlphabetType::Alphainttegro.otp.AlphabetType.ALPHAInttegro::Otp::AlphabetType::ALPHAInttegro.OtpAlphabetTypes.Alpha,Inttegro.OTPAlphabetType.Alphanumeric"alphanumeric"otp.AlphabetTypeAlphanumericOtpAlphabetType.ALPHANUMERIC\Inttegro\Otp\AlphabetType::Alphanumericinttegro.otp.AlphabetType.ALPHANUMERICInttegro::Otp::AlphabetType::ALPHANUMERICInttegro.OtpAlphabetTypes.Alphanumeric, andInttegro.OTPAlphabetType.Numeric"numeric"otp.AlphabetTypeNumericOtpAlphabetType.NUMERIC\Inttegro\Otp\AlphabetType::Numericinttegro.otp.AlphabetType.NUMERICInttegro::Otp::AlphabetType::NUMERICInttegro.OtpAlphabetTypes.Numeric. If neither alphabet field is supplied, the default alphabet is alphanumeric. Mutually exclusive withTokenAlphabettoken_alphabetTokenAlphabettokenAlphabettoken_alphabettoken_alphabettoken_alphabettokenAlphabet. - #
ValidityDurationInMinutesvalidity_duration_in_minutesValidityDurationInMinutesvalidityDurationInMinutes(…)validityDurationInMinutesvalidity_duration_in_minutesvalidity_duration_in_minutesvalidityDurationInMinuteslongintegerintIntegerintintT.nilable(Integer)numberHow long the token remains valid. Accepted values are 3 through 10,080 minutes (7 days), inclusive. Defaults to 10 minutes.
The fully rendered SMS, including the generated code and substituted service name, must be no longer than 120 characters; email text is limited to 2,048 characters. The transaction expires after its validity window even if delivery is delayed.
For email OTP, send a bare email recipient. The
{service_name} <noreply@inttegro.com> From mailbox and
delivery route are selected automatically:
{
"recipient": "customer@example.com",
"service_name": "Inttegro",
"token_size": 6,
"purpose": "sign_in"
}The verification request uses the returned transaction ID, this same recipient, and the code supplied by the customer.
Response
With synchronous delivery, inspect Transmission.Statustransaction.transmission.statusTransmission.Statustransmission.statustransmission.statustransmission.statustransmission.statustransmission.status: Inttegro.OTPTransmissionStatus.Submitted"submitted"otp.TransmissionStatusSubmittedOtpTransmissionStatus.SUBMITTED\Inttegro\Otp\TransmissionStatus::Submittedinttegro.otp.TransmissionStatus.SUBMITTEDInttegro::Otp::TransmissionStatus::SUBMITTEDInttegro.OtpTransmissionStatuses.Submitted means the SMS message was submitted for delivery, Inttegro.OTPTransmissionStatus.Delivered"delivered"otp.TransmissionStatusDeliveredOtpTransmissionStatus.DELIVERED\Inttegro\Otp\TransmissionStatus::Deliveredinttegro.otp.TransmissionStatus.DELIVEREDInttegro::Otp::TransmissionStatus::DELIVEREDInttegro.OtpTransmissionStatuses.Delivered means delivery was confirmed, and Inttegro.OTPTransmissionStatus.Failed"failed"otp.TransmissionStatusFailedOtpTransmissionStatus.FAILED\Inttegro\Otp\TransmissionStatus::Failedinttegro.otp.TransmissionStatus.FAILEDInttegro::Otp::TransmissionStatus::FAILEDInttegro.OtpTransmissionStatuses.Failed means the delivery attempt failed. For email, accepted means the delivery service accepted the send; it does not prove inbox delivery.
Request
curl https://api.inttegro.com/otp/initiate \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: otp-login-67890" \
-d '{
"message_template": "Your {service} code is {token}.",
"purpose": "transaction_confirmation",
"recipient": "+233241234567",
"sender": "Acme",
"service_name": "Acme Bank",
"token_alphabet_type": "numeric",
"token_size": 6,
"validity_duration_in_minutes": 10
}'import { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.otp.initiate({
messageTemplate: "Your {service} code is {token}.",
purpose: "transaction_confirmation",
recipient: "+233241234567",
sender: "Acme",
serviceName: "Acme Bank",
tokenAlphabetType: "numeric",
tokenSize: 6,
validityDurationInMinutes: 10,
})package main
import (
"context"
"log"
"os"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
"github.com/inttegro/inttegro-sdk-go/v14/otp"
"github.com/inttegro/inttegro-sdk-go/v14/request"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := otp.InitiateParams{
MessageTemplate: "Your {service} code is {token}.",
Purpose: "transaction_confirmation",
Recipient: "+233241234567",
Sender: "Acme",
ServiceName: "Acme Bank",
TokenAlphabetType: otp.AlphabetTypeNumeric,
TokenSize: 6,
ValidityDurationInMinutes: 10,
}
result, err := client.Otp.Initiate(ctx, params, request.WithIdempotencyKey("otp-login-67890"))
if err != nil {
log.Fatal(err)
}
_ = result
}import os
import inttegro
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.otp.initiate(inttegro.otp.InitiateRequest(
message_template="Your {service} code is {token}.",
purpose="transaction_confirmation",
recipient="+233241234567",
sender="Acme",
service_name="Acme Bank",
token_alphabet_type="numeric",
token_size=6,
validity_duration_in_minutes=10,
))<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->otp->initiate([
'message_template' => 'Your {service} code is {token}.',
'purpose' => 'transaction_confirmation',
'recipient' => '+233241234567',
'sender' => 'Acme',
'service_name' => 'Acme Bank',
'token_alphabet_type' => 'numeric',
'token_size' => 6,
'validity_duration_in_minutes' => 10,
]);require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.otp.initiate(
message_template: "Your {service} code is {token}.",
purpose: "transaction_confirmation",
recipient: "+233241234567",
sender: "Acme",
service_name: "Acme Bank",
token_alphabet_type: "numeric",
token_size: 6,
validity_duration_in_minutes: 10
)import com.inttegro.Client;
import com.inttegro.otp.InitiateOtpParams;
import com.inttegro.otp.OtpAlphabetType;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var params = InitiateOtpParams.builder()
.messageTemplate("Your {service} code is {token}.")
.purpose("transaction_confirmation")
.recipient("+233241234567")
.sender("Acme")
.serviceName("Acme Bank")
.tokenAlphabetType(OtpAlphabetType.NUMERIC)
.tokenSize(6)
.validityDurationInMinutes(10)
.build();
var result = client.otp().initiate(params);
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Otp.InitiateAsync(new {
message_template = "Your {service} code is {token}.",
purpose = "transaction_confirmation",
recipient = "+233241234567",
sender = "Acme",
service_name = "Acme Bank",
token_alphabet_type = "numeric",
token_size = 6,
validity_duration_in_minutes = 10,
});{
"transaction": {
"expires_at": "2026-08-28T10:10:00Z",
"full_message": "Your Acme Bank code is {token}.",
"id": "ot_<TRANSACTION_ID>",
"initiated_at": "2026-08-28T10:00:00Z",
"status": "pending_verification",
"transmission": {
"recipient": "+233241234567",
"sender_id": "Acme",
"sent_at": "2026-08-28T10:00:01Z",
"sent_via": "sms",
"status": "submitted"
}
}
}Verify OTP POST /otp/verify
VerificationAttempt.Result.Verdictverification_attempt.result.verdictVerificationAttempt.Result.VerdictverificationAttempt.result.verdictverificationAttempt.result.verdictverification_attempt.result.verdictverification_attempt.result.verdictverificationAttempt.result.verdict is Inttegro.OTPVerificationVerdict.Pass"pass"otp.VerificationVerdictPassOtpVerificationVerdict.PASS\Inttegro\Otp\VerificationVerdict::Passinttegro.otp.VerificationVerdict.PASSInttegro::Otp::VerificationVerdict::PASSInttegro.OtpVerificationVerdicts.Pass.Required attributes
VerifyParamsv14.0.0Java SDK requestVerifyOtpParamsv11.1.0PHP SDK requestv15.0.0Python SDK requestVerifyRequestv15.0.0Ruby SDK requestOTP::VerifyRequestv13.0.0TypeScript SDK requestVerifyOtpRequestv15.0.0- #
TransactionIdtransaction_idTransactionIDtransactionId(…)transactionIdtransaction_idtransaction_idtransactionIdstringstringstringStringstringstrStringstringTyped ID returned from
/otp/initiate, in the formot_<TRANSACTION_ID>.
The current transaction accepts at most five recorded attempts; after that, initiate a new transaction.
Response
Returns bothTransactiontransactionTransactiontransactiontransactiontransactiontransactiontransaction and VerificationAttemptverification_attemptVerificationAttemptverificationAttemptverificationAttemptverification_attemptverification_attemptverificationAttempt. The attempt contains VerificationAttempt.AttemptedAtverification_attempt.attempted_atVerificationAttempt.AttemptedAtverificationAttempt.attemptedAtverificationAttempt.attemptedAtverification_attempt.attempted_atverification_attempt.attempted_atverificationAttempt.attemptedAt, VerificationAttempt.Idverification_attempt.idVerificationAttempt.IDverificationAttempt.idverificationAttempt.idverification_attempt.idverification_attempt.idverificationAttempt.id, VerificationAttempt.PresentedTokenverification_attempt.presented_tokenVerificationAttempt.PresentedTokenverificationAttempt.presentedTokenverificationAttempt.presentedTokenverification_attempt.presented_tokenverification_attempt.presented_tokenverificationAttempt.presentedToken, VerificationAttempt.Recipientverification_attempt.recipientVerificationAttempt.RecipientverificationAttempt.recipientverificationAttempt.recipientverification_attempt.recipientverification_attempt.recipientverificationAttempt.recipient, and VerificationAttempt.Resultverification_attempt.resultVerificationAttempt.ResultverificationAttempt.resultverificationAttempt.resultverification_attempt.resultverification_attempt.resultverificationAttempt.result. VerificationAttempt.Result.Verdictverification_attempt.result.verdictVerificationAttempt.Result.VerdictverificationAttempt.result.verdictverificationAttempt.result.verdictverification_attempt.result.verdictverification_attempt.result.verdictverificationAttempt.result.verdict is Inttegro.OTPVerificationVerdict.Pass"pass"otp.VerificationVerdictPassOtpVerificationVerdict.PASS\Inttegro\Otp\VerificationVerdict::Passinttegro.otp.VerificationVerdict.PASSInttegro::Otp::VerificationVerdict::PASSInttegro.OtpVerificationVerdicts.Pass or Inttegro.OTPVerificationVerdict.Fail"fail"otp.VerificationVerdictFailOtpVerificationVerdict.FAIL\Inttegro\Otp\VerificationVerdict::Failinttegro.otp.VerificationVerdict.FAILInttegro::Otp::VerificationVerdict::FAILInttegro.OtpVerificationVerdicts.Fail; VerificationAttempt.Result.Detailverification_attempt.result.detailVerificationAttempt.Result.DetailverificationAttempt.result.detailverificationAttempt.result.detailverification_attempt.result.detailverification_attempt.result.detailverificationAttempt.result.detail is omitted for a passing result and explains a failed match when available. Treat VerificationAttempt.PresentedTokenverification_attempt.presented_tokenVerificationAttempt.PresentedTokenverificationAttempt.presentedTokenverificationAttempt.presentedTokenverification_attempt.presented_tokenverification_attempt.presented_tokenverificationAttempt.presentedToken as sensitive and exclude verification request and response bodies from logs. Matching and non-matching tokens both produce a successful response. Use VerificationAttempt.Result.Verdictverification_attempt.result.verdictVerificationAttempt.Result.VerdictverificationAttempt.result.verdictverificationAttempt.result.verdictverification_attempt.result.verdictverification_attempt.result.verdictverificationAttempt.result.verdict to determine whether verification passed.Request
response=$(curl https://api.inttegro.com/otp/verify \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Idempotency-Key: otp-verify-67890" \
-H "Content-Type: application/json" \
-d '{
"recipient": "+233241234567",
"token": "<OTP_CODE_FROM_USER>",
"transaction_id": "ot_<TRANSACTION_ID>"
}')
jq -e '.verification_attempt.result.verdict == "pass"' <<< "$response"import { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.otp.verify({
recipient: "+233241234567",
token: "<OTP_CODE_FROM_USER>",
transactionId: "ot_<TRANSACTION_ID>",
})package main
import (
"context"
"log"
"os"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
"github.com/inttegro/inttegro-sdk-go/v14/otp"
"github.com/inttegro/inttegro-sdk-go/v14/request"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := otp.VerifyParams{
Recipient: "+233241234567",
Token: "<OTP_CODE_FROM_USER>",
TransactionID: "ot_<TRANSACTION_ID>",
}
result, err := client.Otp.Verify(ctx, params, request.WithIdempotencyKey("otp-verify-67890"))
if err != nil {
log.Fatal(err)
}
_ = result
}import os
import inttegro
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.otp.verify(inttegro.otp.VerifyRequest(
recipient="+233241234567",
token="<OTP_CODE_FROM_USER>",
transaction_id="ot_<TRANSACTION_ID>",
))<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->otp->verify([
'recipient' => '+233241234567',
'token' => '<OTP_CODE_FROM_USER>',
'transaction_id' => 'ot_<TRANSACTION_ID>',
]);require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.otp.verify(
recipient: "+233241234567",
token: "<OTP_CODE_FROM_USER>",
transaction_id: "ot_<TRANSACTION_ID>"
)import com.inttegro.Client;
import com.inttegro.otp.VerifyOtpParams;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var params = VerifyOtpParams.builder()
.recipient("+233241234567")
.token("<OTP_CODE_FROM_USER>")
.transactionId("ot_<TRANSACTION_ID>")
.build();
var result = client.otp().verify(params);
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Otp.VerifyAsync(new {
recipient = "+233241234567",
token = "<OTP_CODE_FROM_USER>",
transaction_id = "ot_<TRANSACTION_ID>",
});Inttegro.OTPVerificationVerdict.Fail"fail"otp.VerificationVerdictFailOtpVerificationVerdict.FAIL\Inttegro\Otp\VerificationVerdict::Failinttegro.otp.VerificationVerdict.FAILInttegro::Otp::VerificationVerdict::FAILInttegro.OtpVerificationVerdicts.Fail verdict. The API echoes the submitted value as VerificationAttempt.PresentedTokenverification_attempt.presented_tokenVerificationAttempt.PresentedTokenverificationAttempt.presentedTokenverificationAttempt.presentedTokenverification_attempt.presented_tokenverification_attempt.presented_tokenverificationAttempt.presentedToken; the example uses a placeholder so no real code is exposed.{
"verification_attempt": {
"attempted_at": "2026-08-28T10:03:00Z",
"id": "ov_<ATTEMPT_ID>",
"presented_token": "<OTP_CODE_FROM_USER>",
"recipient": "+233241234567",
"result": {
"detail": "token_mismatch",
"verdict": "fail"
}
},
"transaction": {
"expires_at": "2026-08-28T10:10:00Z",
"full_message": "Your Acme Bank code is {token}.",
"id": "ot_<TRANSACTION_ID>",
"initiated_at": "2026-08-28T10:00:00Z",
"status": "pending_verification",
"transmission": {
"recipient": "+233241234567",
"sender_id": "Acme",
"sent_at": "2026-08-28T10:00:01Z",
"sent_via": "sms",
"status": "submitted"
}
}
}Lookup OTP transaction POST /otp/lookup
Retrieve details of an existing OTP transaction by its ID. Check transaction status, delivery state, and verification status.
Required attributes
LookupParamsv14.0.0Java SDK requestLookupOtpParamsv11.1.0PHP SDK requestv15.0.0Python SDK requestLookupRequestv15.0.0Ruby SDK requestOTP::LookupRequestv13.0.0TypeScript SDK requestLookupOtpRequestv15.0.0- #
TransactionIdtransaction_idTransactionIDtransactionId(…)transactionIdtransaction_idtransaction_idtransactionIdstringstringstringStringstringstrStringstringTyped OTP transaction ID to look up.
Response
Returns the transaction without the generated code or verification-attempt history. Optional cancellation and delivery-attempt fields are omitted when they do not apply.
Request
curl https://api.inttegro.com/otp/lookup \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "ot_<TRANSACTION_ID>"
}'import { InttegroClient } from '@inttegro/inttegro-sdk'
const inttegro = new InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.otp.lookup({
transactionId: "ot_<TRANSACTION_ID>",
})package main
import (
"context"
"log"
"os"
inttegro "github.com/inttegro/inttegro-sdk-go/v14"
"github.com/inttegro/inttegro-sdk-go/v14/otp"
)
func main() {
ctx := context.Background()
client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))
params := otp.LookupParams{
TransactionID: "ot_<TRANSACTION_ID>",
}
result, err := client.Otp.Lookup(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}import os
import inttegro
from inttegro import InttegroClient
client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])
result = client.otp.lookup(inttegro.otp.LookupRequest(
transaction_id="ot_<TRANSACTION_ID>",
))<?php
use Inttegro\Client;
$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->otp->lookup([
'transaction_id' => 'ot_<TRANSACTION_ID>',
]);require "inttegro"
client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.otp.lookup(
transaction_id: "ot_<TRANSACTION_ID>"
)import com.inttegro.Client;
import com.inttegro.otp.LookupOtpParams;
public class Example {
public static void main(String[] args) throws Exception {
var client = new Client(System.getenv("INTTEGRO_API_KEY"));
var params = LookupOtpParams.builder()
.transactionId("ot_<TRANSACTION_ID>")
.build();
var result = client.otp().lookup(params);
}
}using Inttegro;
using var inttegro = new InttegroClient(
Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Otp.LookupAsync(new {
transaction_id = "ot_<TRANSACTION_ID>",
});{
"transaction": {
"expires_at": "2026-08-28T10:10:00Z",
"full_message": "Your Acme Bank code is {token}.",
"id": "ot_<TRANSACTION_ID>",
"initiated_at": "2026-08-28T10:00:00Z",
"status": "pending_verification",
"transmission": {
"recipient": "+233241234567",
"sender_id": "Acme",
"sent_at": "2026-08-28T10:00:01Z",
"sent_via": "sms",
"status": "submitted"
}
}
}Related resources
- Create customer - Associate verified contact details with a customer record.
- Send Chime - Send transactional SMS and email notifications after verification.