SMS & OTP
Send a text from your approved sender ID, or issue a code for a flow you own. Call these from your server with a 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
{
"encoding": "gsm7",
"segments_per_message": 1,
"recipient_count": 1,
"excluded_opt_out_count": 0,
"total_expected_fee_minor": 4,
"included": [
{
"to": "233244123456",
"segments": 1,
"expected_fee_minor": 4
}
],
"excluded_opt_out": [],
"message_ids": [
"msg_01EXAMPLE"
],
"status": "queued"
}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_
Optional sender_id must be an approved sender for your merchant. When set, the SMS From name and message use your brand (not Payloqa). When omitted, Payloqa’s platform OTP sender and copy are used.
Request body
{
"msisdn": "233244123456",
"purpose": "login",
"sender_id": "YourBrand"
}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",
"sender_id": "YourBrand"
}'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"
}'