PayloqaDocs

API

SMS & OTP

Send SMS to your customers and issue OTP codes for your own flows. Authenticate with your secret key.

Estimate SMS cost

POST/v1/sms/estimate

Auth: Authorization: Bearer sk_test_ or sk_live_

Request body

{
  "sender_id": "YourBrand",
  "to": [
    "233244123456"
  ],
  "body": "Your order is ready for pickup."
}

Response

{
  "segments": 1,
  "recipients": 1,
  "estimated_cost_minor": 5
}
curl 'https://api.payloqa.com/v1/sms/estimate' \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sk_test_...' \
  -d '{
  "sender_id": "YourBrand",
  "to": [
    "233244123456"
  ],
  "body": "Your order is ready for pickup."
}'

Send SMS

POST/v1/sms/send

Auth: Authorization: Bearer sk_test_ or sk_live_

Request body

{
  "sender_id": "YourBrand",
  "to": [
    "233244123456"
  ],
  "body": "Your order is ready for pickup."
}

202

{
  "message_id": "sms_01EXAMPLE",
  "status": "queued",
  "segments": 1,
  "recipients": 1
}
curl 'https://api.payloqa.com/v1/sms/send' \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sk_test_...' \
  -H 'Idempotency-Key: sms-001' \
  -d '{
  "sender_id": "YourBrand",
  "to": [
    "233244123456"
  ],
  "body": "Your order is ready for pickup."
}'

Request OTP

POST/v1/otp/request

Auth: Authorization: Bearer sk_test_ or sk_live_

Request body

{
  "msisdn": "233244123456",
  "purpose": "login"
}

201

{
  "otp_request_id": "otpr_01EXAMPLE",
  "expires_at": "2026-08-30T12:10:00.000Z"
}
curl 'https://api.payloqa.com/v1/otp/request' \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sk_test_...' \
  -H 'Idempotency-Key: otp-001' \
  -d '{
  "msisdn": "233244123456",
  "purpose": "login"
}'

Verify OTP

POST/v1/otp/verify

Auth: Authorization: Bearer sk_test_ or sk_live_

Request body

{
  "otp_request_id": "otpr_01EXAMPLE",
  "code": "123456"
}

Response

{
  "verified": true
}
curl 'https://api.payloqa.com/v1/otp/verify' \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sk_test_...' \
  -d '{
  "otp_request_id": "otpr_01EXAMPLE",
  "code": "123456"
}'