Skip to content

Add a destination bank account to the customer account

Add a destination Bank to the customer account

POST https://api.leapa.co/v2/customers/{customer_id}/destination/bank

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/destination/bank" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "holder_type": "individual",
    "bank_request": {
      "currency": "BIF",
      "address": {
        "city": "string",
        "state": "string",
        "type": "personal",
        "country": "BI",
        "zip": "string",
        "line1": "string",
        "line2": "string"
      },
      "account_number": "00012345678901",
      "routing_number": "string",
      "bank_name": "Jeanne Ndayishimiye"
    }
  }'

Response

Created

{
  "holder_type": "individual",
  "bank_response": {
    "object": "string",
    "address": {
      "object": "string",
      "city": "string",
      "type": "personal",
      "status": "invalid",
      "state": "string",
      "zip": "string",
      "line1": "string",
      "line2": "string"
    },
    "defaultPayout": false,
    "owner_name": "Jeanne Ndayishimiye",
    "type": "bank",
    "bank_name": "Jeanne Ndayishimiye",
    "account_id": "acc_62f3a8d15b",
    "default": false,
    "account_number": "00012345678901",
    "routing_number": "string",
    "created_at_date": 0
  }
}

Path parameters

Values that go into the URL itself.

  • customer_idstringrequired
    Example:cus_3d8e51fa20

Request body

application/json

Required. Send it as JSON.

  • holder_typestringrequired

    Holder Type

    Allowed values:individualcompany
  • bank_requestBankRequestrequired

Response

application/json
  • holder_typestringrequired

    Holder Type

    Allowed values:individualcompany
  • bank_responseBankResponserequired

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/destination/bank" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "holder_type": "individual",
    "bank_request": {
      "currency": "BIF",
      "address": {
        "city": "string",
        "state": "string",
        "type": "personal",
        "country": "BI",
        "zip": "string",
        "line1": "string",
        "line2": "string"
      },
      "account_number": "00012345678901",
      "routing_number": "string",
      "bank_name": "Jeanne Ndayishimiye"
    }
  }'

Response

Created

{
  "holder_type": "individual",
  "bank_response": {
    "object": "string",
    "address": {
      "object": "string",
      "city": "string",
      "type": "personal",
      "status": "invalid",
      "state": "string",
      "zip": "string",
      "line1": "string",
      "line2": "string"
    },
    "defaultPayout": false,
    "owner_name": "Jeanne Ndayishimiye",
    "type": "bank",
    "bank_name": "Jeanne Ndayishimiye",
    "account_id": "acc_62f3a8d15b",
    "default": false,
    "account_number": "00012345678901",
    "routing_number": "string",
    "created_at_date": 0
  }
}