Skip to content

Create new OTP

Send a six-digit code by SMS to the number in the path, so it can be used as otp on Charge a mobile money wallet. The number carries its country code, for example +25779123456.

POST https://api.leapa.co/v2/charges/otp/{number}

This endpoint needs your API key

Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.

Request

curl -X POST "https://api.leapa.co/v2/charges/otp/<number>" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"

Path parameters

Values that go into the URL itself.

  • numberstringrequired

Response

application/json

No fields. The body is empty.

Status codes

  • 201Created
  • 400Bad request
  • 401Unauthorized
  • 402Payment required
  • 403Forbidden
  • 404Not found
  • 428Precondition required
  • 500Server error

Request

curl -X POST "https://api.leapa.co/v2/charges/otp/<number>" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"