Skip to content

Add a mobile money source to the customer account

POST https://api.leapa.co/v2/customers/{customer_id}/sources/mobile

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/customers/cus_3d8e51fa20/sources/mobile" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "brand": "ecocash",
    "currency": "BIF",
    "number": "string",
    "country_code": "BI",
    "default": false
  }'

Response

Created

{
  "id": "obj_5f21c8a40b",
  "object": "string",
  "type": "bank",
  "status": "created",
  "currency": "BIF",
  "address": {
    "object": "string",
    "city": "string",
    "type": "personal",
    "status": "invalid",
    "state": "string",
    "zip": "string",
    "line1": "string",
    "line2": "string"
  },
  "duplicateMobile": false,
  "brand": "ecocash",
  "language": "en",
  "number": "string",
  "holder_type": "individual",
  "default": false,
  "holder_name": "Jeanne Ndayishimiye"
}

Path parameters

Values that go into the URL itself.

  • customer_idstringrequired
    Example:cus_3d8e51fa20

Request body

application/json

Required. Send it as JSON.

  • brandstringrequired

    Customer mobile money brand)

    Allowed values:ecocashenotiibb+pesaflashbrbbcbbancobubbciand 78 more
  • currencystringrequired

    Currency code

    Allowed values:BIFUSDKESXAF
  • numberstringrequired

    Customer mobile money number)

  • country_codestringrequired

    Customer mobile money country code)

    Allowed values:BI
  • defaultbooleanrequired

    Indicating whether this payment method is the default sources of payment. Constraints: Not null

Response

application/json
  • idstring

    Account Id

  • objectstring

    Card Object Name

  • typestring

    Account Type

    Allowed values:bankbalancecardfeesmobilewalletcaships
  • statusstring

    Status of the card account

    Allowed values:createdvalidatedverifiedverification_failederroreddeleted
  • currencystring

    The 3 letter representing the Currency.

    Allowed values:BIFUSDKESXAF
  • addressAddressResponse
  • duplicateMobileboolean
  • brandstring

    The brand name.

    Allowed values:ecocashenotiibb+pesaflashbrbbcbbancobubbciand 78 more
  • languagestring

    The Customer Prefered Language.

    Allowed values:enfrkr
  • numberstring

    Mobile Money Account

  • holder_typestring

    Source Holder Type.

    Allowed values:individualcompany
  • defaultboolean

    This flag indicate if this is the default source or not.

  • holder_namestring

    Holder name. Name of the owner as written on the mobile mobile account.

Status codes

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

Request

curl -X POST "https://api.leapa.co/v2/customers/cus_3d8e51fa20/sources/mobile" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "brand": "ecocash",
    "currency": "BIF",
    "number": "string",
    "country_code": "BI",
    "default": false
  }'

Response

Created

{
  "id": "obj_5f21c8a40b",
  "object": "string",
  "type": "bank",
  "status": "created",
  "currency": "BIF",
  "address": {
    "object": "string",
    "city": "string",
    "type": "personal",
    "status": "invalid",
    "state": "string",
    "zip": "string",
    "line1": "string",
    "line2": "string"
  },
  "duplicateMobile": false,
  "brand": "ecocash",
  "language": "en",
  "number": "string",
  "holder_type": "individual",
  "default": false,
  "holder_name": "Jeanne Ndayishimiye"
}