Create a Bank Account

To create a bank_account send a POST request to /api/user/bank_accounts

HTTP request

POST /api/user/bank_accounts

Parameters

Parameter Type Description Required Notes
form_configuration_name String Name of the form configuration Required underscored
form BankAccountForm BankAccountForm parameters that corresponds with FormConfiguration configuration Required

Bank Account Parameters

Parameter Type Description Required Notes
account_holder_name String Optional
account_holder_type String Optional
account_id String Identifier of account from Plaid Optional
country String Optional
currency String Optional
payment_method_id Integer Identifier of payment method that Account belongs to Optional
public_token String Token string identifying the account from Plaid Optional
routing_number String Optional

Example request

"authorization: Token token=[YOUR API TOKEN]"
"accept: application/json"
"content-type: application/json"

{
  "form_configuration_name": "reference_rest_api_bank_account_create",
  "form": {
    "payment_method_id": 1,
    "account_id": user.id,
    "public_token": "1234567"
  }
}
Element Type Description Required?
form_configuration_name String Name of the defined FormConfiguration Required
form Bank AccountForm Attributes for user, should match configuration defined in corresponding FormConfiguration Required

Example response

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
  "id": 1,
  "errors": {}
}

Element Type Description
id Integer Object identifier
errors Object Validation errors

Error and Status Codes

Code Message Meaning
201 Created Resource was created
401 Unathorized Invalid Authentication
406 Not Acceptable Wrong parameters passed
422 Unprocessable Entity Wrong values, not matched validations