Verify Email OTP
curl --request POST \
--url https://api.stablepay.global/v2/users/{userId}/verify/email/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"otp": "<string>"
}
'import requests
url = "https://api.stablepay.global/v2/users/{userId}/verify/email/confirm"
payload = { "otp": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({otp: '<string>'})
};
fetch('https://api.stablepay.global/v2/users/{userId}/verify/email/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stablepay.global/v2/users/{userId}/verify/email/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'otp' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stablepay.global/v2/users/{userId}/verify/email/confirm"
payload := strings.NewReader("{\n \"otp\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stablepay.global/v2/users/{userId}/verify/email/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"otp\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.global/v2/users/{userId}/verify/email/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"otp\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Email verified successfully",
"data": {
"emailVerified": true,
"verifiedAt": "2025-06-15T10:30:00.000Z"
}
}
{
"error": "Invalid OTP",
"message": "Invalid OTP",
"attemptsRemaining": 2
}
{
"error": "Max Attempts",
"message": "Maximum attempts exceeded. Please request a new OTP."
}
Verification
Verify Email OTP
Verify the OTP sent to user email address
POST
/
v2
/
users
/
{userId}
/
verify
/
email
/
confirm
Verify Email OTP
curl --request POST \
--url https://api.stablepay.global/v2/users/{userId}/verify/email/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"otp": "<string>"
}
'import requests
url = "https://api.stablepay.global/v2/users/{userId}/verify/email/confirm"
payload = { "otp": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({otp: '<string>'})
};
fetch('https://api.stablepay.global/v2/users/{userId}/verify/email/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stablepay.global/v2/users/{userId}/verify/email/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'otp' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stablepay.global/v2/users/{userId}/verify/email/confirm"
payload := strings.NewReader("{\n \"otp\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stablepay.global/v2/users/{userId}/verify/email/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"otp\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.global/v2/users/{userId}/verify/email/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"otp\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Email verified successfully",
"data": {
"emailVerified": true,
"verifiedAt": "2025-06-15T10:30:00.000Z"
}
}
{
"error": "Invalid OTP",
"message": "Invalid OTP",
"attemptsRemaining": 2
}
{
"error": "Max Attempts",
"message": "Maximum attempts exceeded. Please request a new OTP."
}
Verify Email OTP
Verifies the 6-digit OTP sent to the user’s email address.The unique user ID
The 6-digit OTP received via email
Request
curl -X POST https://api.stablepay.global/v2/users/usr_abc123/verify/email/confirm \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"otp": "123456"
}'
Response
{
"success": true,
"message": "Email verified successfully",
"data": {
"emailVerified": true,
"verifiedAt": "2025-06-15T10:30:00.000Z"
}
}
- Maximum 3 verification attempts per OTP
- After 3 failed attempts, request a new OTP
- OTP expires after 10 minutes
Errors
| Code | Description |
|---|---|
Not Found | User not found |
Already Verified | Email is already verified |
No OTP Found | No pending OTP found. Request a new one |
Max Attempts | Maximum attempts exceeded |
Invalid OTP | OTP is incorrect or expired |
{
"success": true,
"message": "Email verified successfully",
"data": {
"emailVerified": true,
"verifiedAt": "2025-06-15T10:30:00.000Z"
}
}
{
"error": "Invalid OTP",
"message": "Invalid OTP",
"attemptsRemaining": 2
}
{
"error": "Max Attempts",
"message": "Maximum attempts exceeded. Please request a new OTP."
}
⌘I
