Skip to content

Update the customer bank destination

Update the customer bank destination

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

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 PUT "https://api.leapa.co/v2/customers/cus_3d8e51fa20/destination/bank/acc_62f3a8d15b" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": {
      "city": "string",
      "state": "string",
      "type": "personal",
      "country": "BI",
      "zip": "string",
      "line1": "string",
      "line2": "string"
    },
    "default": false
  }'

Response

OK

{
  "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
  • account_idstringrequired
    Example:acc_62f3a8d15b

Request body

application/json

Required. Send it as JSON.

  • addressAddressRequestRestricted
  • defaultboolean

    Indicating whether this bank account is the default payout account. Constraints: Not null

Response

application/json
  • holder_typestringrequired

    Holder Type

    Allowed values:individualcompany
  • bank_responseBankResponserequired

Status codes

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

Request

curl -X PUT "https://api.leapa.co/v2/customers/cus_3d8e51fa20/destination/bank/acc_62f3a8d15b" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": {
      "city": "string",
      "state": "string",
      "type": "personal",
      "country": "BI",
      "zip": "string",
      "line1": "string",
      "line2": "string"
    },
    "default": false
  }'

Response

OK

{
  "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
  }
}