curl https://api.onepay.la/v1/customers/login/verify \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"phone": "+573001234567",
"otp": "482916"
}'
const response = await fetch('https://api.onepay.la/v1/customers/login/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '+573001234567',
otp: '482916'
})
});
const { token, expires_at, customer } = await response.json();
import requests
response = requests.post(
'https://api.onepay.la/v1/customers/login/verify',
headers={
'Authorization': 'Bearer sk_test_xxx',
'Content-Type': 'application/json'
},
json={
'phone': '+573001234567',
'otp': '482916'
}
)
data = response.json()
token = data['token']
{
"token": "12|a1b2c3d4e5f6g7h8i9j0...",
"expires_at": "2026-03-23T17:30:00+00:00",
"customer": {
"id": "9dd4158b-0e45-42bc-b56f-a4c1f856814d",
"first_name": "María",
"last_name": "López",
"phone": "+573001234567",
"email": "maria@ejemplo.com"
}
}
{
"message": "Las credenciales proporcionadas no son válidas."
}
{
"message": "Too Many Attempts."
}
Verificar OTP
Verifica el código OTP y retorna un token de sesión para el cliente.
POST
/
customers
/
login
/
verify
curl https://api.onepay.la/v1/customers/login/verify \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"phone": "+573001234567",
"otp": "482916"
}'
const response = await fetch('https://api.onepay.la/v1/customers/login/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '+573001234567',
otp: '482916'
})
});
const { token, expires_at, customer } = await response.json();
import requests
response = requests.post(
'https://api.onepay.la/v1/customers/login/verify',
headers={
'Authorization': 'Bearer sk_test_xxx',
'Content-Type': 'application/json'
},
json={
'phone': '+573001234567',
'otp': '482916'
}
)
data = response.json()
token = data['token']
{
"token": "12|a1b2c3d4e5f6g7h8i9j0...",
"expires_at": "2026-03-23T17:30:00+00:00",
"customer": {
"id": "9dd4158b-0e45-42bc-b56f-a4c1f856814d",
"first_name": "María",
"last_name": "López",
"phone": "+573001234567",
"email": "maria@ejemplo.com"
}
}
{
"message": "Las credenciales proporcionadas no son válidas."
}
{
"message": "Too Many Attempts."
}
Verifica el código OTP enviado previamente con POST /customers/login/request y retorna un token de sesión temporal con validez de 7 días.
Si el cliente acumula más de 3 intentos fallidos, se dispara un evento de seguridad (
CustomerBanned).Body
string
required
Número de teléfono del cliente en formato E.164.
string
required
Código OTP de 6 dígitos recibido por WhatsApp (o en la respuesta en modo test).
Respuesta exitosa
string
Token de sesión del cliente. Debe enviarse en el header
X-Customer-Token en los endpoints de sesión.string
Fecha de expiración del token en formato ISO 8601 (7 días desde la emisión).
object
curl https://api.onepay.la/v1/customers/login/verify \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"phone": "+573001234567",
"otp": "482916"
}'
const response = await fetch('https://api.onepay.la/v1/customers/login/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '+573001234567',
otp: '482916'
})
});
const { token, expires_at, customer } = await response.json();
import requests
response = requests.post(
'https://api.onepay.la/v1/customers/login/verify',
headers={
'Authorization': 'Bearer sk_test_xxx',
'Content-Type': 'application/json'
},
json={
'phone': '+573001234567',
'otp': '482916'
}
)
data = response.json()
token = data['token']
{
"token": "12|a1b2c3d4e5f6g7h8i9j0...",
"expires_at": "2026-03-23T17:30:00+00:00",
"customer": {
"id": "9dd4158b-0e45-42bc-b56f-a4c1f856814d",
"first_name": "María",
"last_name": "López",
"phone": "+573001234567",
"email": "maria@ejemplo.com"
}
}
{
"message": "Las credenciales proporcionadas no son válidas."
}
{
"message": "Too Many Attempts."
}
Was this page helpful?
⌘I