curl https://api.onepay.la/v1/customers/login/request \
-X POST \
-H "Authorization: Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi" \
-H "Content-Type: application/json" \
-d '{
"phone": "+573001234567"
}'
const response = await fetch('https://api.onepay.la/v1/customers/login/request', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '+573001234567'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.onepay.la/v1/customers/login/request',
headers={
'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
'Content-Type': 'application/json'
},
json={
'phone': '+573001234567'
}
)
data = response.json()
{
"message": "OTP enviado exitosamente."
}
{
"message": "OTP enviado exitosamente.",
"otp": "482916"
}
{
"message": "El campo teléfono es obligatorio.",
"errors": {
"phone": [
"El campo teléfono es obligatorio."
]
}
}
{
"message": "Too Many Attempts."
}
Solicitar OTP
Envía un código OTP de 6 dígitos al cliente vía WhatsApp para iniciar sesión.
POST
/
customers
/
login
/
request
curl https://api.onepay.la/v1/customers/login/request \
-X POST \
-H "Authorization: Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi" \
-H "Content-Type: application/json" \
-d '{
"phone": "+573001234567"
}'
const response = await fetch('https://api.onepay.la/v1/customers/login/request', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '+573001234567'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.onepay.la/v1/customers/login/request',
headers={
'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
'Content-Type': 'application/json'
},
json={
'phone': '+573001234567'
}
)
data = response.json()
{
"message": "OTP enviado exitosamente."
}
{
"message": "OTP enviado exitosamente.",
"otp": "482916"
}
{
"message": "El campo teléfono es obligatorio.",
"errors": {
"phone": [
"El campo teléfono es obligatorio."
]
}
}
{
"message": "Too Many Attempts."
}
Envía un código de verificación (OTP) al número de teléfono del cliente vía WhatsApp. El cliente debe estar previamente registrado con POST /customers.
En modo test (
sk_test_), el OTP se retorna directamente en la respuesta y no se envía por WhatsApp.Body
string
required
Número de teléfono del cliente en formato E.164 (ejemplo:
+573001234567).Rate limiting
Este endpoint tiene un rate limit de 1 request cada 30 segundos por teléfono, con un cooldown de 1 minuto entre reenvíos.curl https://api.onepay.la/v1/customers/login/request \
-X POST \
-H "Authorization: Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi" \
-H "Content-Type: application/json" \
-d '{
"phone": "+573001234567"
}'
const response = await fetch('https://api.onepay.la/v1/customers/login/request', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phone: '+573001234567'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.onepay.la/v1/customers/login/request',
headers={
'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
'Content-Type': 'application/json'
},
json={
'phone': '+573001234567'
}
)
data = response.json()
{
"message": "OTP enviado exitosamente."
}
{
"message": "OTP enviado exitosamente.",
"otp": "482916"
}
{
"message": "El campo teléfono es obligatorio.",
"errors": {
"phone": [
"El campo teléfono es obligatorio."
]
}
}
{
"message": "Too Many Attempts."
}
Was this page helpful?
⌘I