Skip to main content
POST
/
payment-accounts
Create payment account
curl --request POST \
  --url https://api.fernhq.com/payment-accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "paymentAccountType": "EXTERNAL_BANK_ACCOUNT",
  "customerId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
  "nickname": "Savings Account",
  "organizationId": "24ab9fdd-5042-4d96-a616-4bef2877dd01",
  "externalBankAccount": {
    "accountNumber": "00123456789",
    "bankName": "Chase Bank",
    "bankAccountCurrency": "USD",
    "bankAddress": {
      "country": "US",
      "addressLine1": "350 5th Avenue",
      "addressLine2": "Floor 21",
      "city": "New York",
      "state": "New York",
      "stateCode": "NY",
      "postalCode": "10016",
      "locale": "en-US"
    },
    "bankAccountType": "CHECKING",
    "bankAccountPaymentMethod": "ACH",
    "bankAccountOwner": {
      "email": "john@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "businessName": "Fern LLC",
      "address": {
        "country": "US",
        "addressLine1": "350 5th Avenue",
        "addressLine2": "Floor 21",
        "city": "New York",
        "state": "New York",
        "stateCode": "NY",
        "postalCode": "10016",
        "locale": "en-US"
      },
      "type": "INDIVIDUAL"
    },
    "routingNumber": "11110000",
    "sortCode": "123456",
    "iban": "GB29NWBK60161331926819",
    "bicSwift": "SMCOGB2LXXX",
    "transitNumber": "12345",
    "institutionNumber": "111",
    "bsbNumber": "123-456",
    "ifscCode": "IFSC0001234",
    "clabeNumber": "123456789012345678",
    "bankCode": "123456",
    "branchCode": "12345",
    "cnapsCode": "123456789",
    "nubanNumber": "123456789012",
    "pixCode": "123456789",
    "clearingCode": "123456",
    "taxNumber": "123456789"
  },
  "fernAutoFiatAccount": {
    "bankAccountCurrency": "USD",
    "destinationPaymentAccountId": "03b7030f-6da1-4d76-9352-cdebd82112c8",
    "destinationCurrency": "USDC",
    "destinationPaymentMethod": "BASE",
    "developerFeePercent": "0.1"
  },
  "fernFiatAccount": {
    "bankAccountCurrency": "USD"
  },
  "externalCryptoWallet": {
    "cryptoWalletType": "EVM",
    "chain": "BASE",
    "address": "0x1234567890123456789012345678901234567890"
  },
  "fernCryptoWallet": {
    "cryptoWalletType": "EVM"
  },
  "isThirdParty": false
}'
{
"paymentAccountId": "03b7030f-6da1-4d76-9352-cdebd82112c8",
"paymentAccountType": "EXTERNAL_BANK_ACCOUNT",
"nickname": "Savings Account",
"createdAt": "2023-11-07T05:31:56Z",
"customerId": "03b7030f-6da1-4d76-9352-cdebd82112c8",
"paymentAccountStatus": "ACTIVE",
"externalBankAccount": {
"bankAccountType": "CHECKING",
"bankAccountOwnerName": "John Doe",
"bankAccountOwnerEmail": "john@exmaple.com",
"bankName": "Chase Bank",
"bankAccountCurrency": {
"label": "<string>"
},
"bankAccountMask": "***6789",
"bankAccountPaymentMethod": "<any>",
"bankAccountNumber": "12346789",
"routingNumber": "11110000",
"wireRoutingNumber": "026009593",
"iban": "GB29NWBK60161331926819",
"bicSwift": "SMCOGB2LXXX",
"sortCode": "123456",
"transitNumber": "12345",
"institutionNumber": "111",
"bsbNumber": "123-456",
"ifscCode": "IFSC0001234",
"clabeNumber": "123456789012345678",
"bankCode": "123456",
"branchCode": "12345",
"cnapsCode": "123456789",
"nubanNumber": "123456789012",
"pixCode": "123456789",
"clearingCode": "123456",
"taxNumber": "123456789"
},
"fernAutoFiatAccount": {
"bankAccountOwnerName": "John Doe",
"bankName": "Chase Bank",
"bankAccountCurrency": {
"label": "<string>"
},
"bankAccountPaymentMethods": [
"ACH",
"WIRE"
],
"bankAccountNumber": "12346789",
"routingNumber": "12346789",
"iban": "GB29NWBK60161331926819",
"bicSwift": "SMCOGB2LXXX",
"destinationPaymentAccountId": "03b7030f-6da1-4d76-9352-cdebd82112c8",
"destinationCurrency": {
"label": "USDC",
"chain": "ETHEREUM",
"contractAddress": "0x123456789abcd123456789abcd123456789abcd",
"currencyDecimals": 18
},
"destinationPaymentMethod": "BASE"
},
"fernFiatAccount": {
"bankAccountOwnerName": "John Doe",
"bankName": "Chase Bank",
"bankAccountCurrency": {
"label": "<string>"
},
"bankAccountPaymentMethods": [
"ACH",
"WIRE"
],
"bankAccountNumber": "12346789",
"routingNumber": "12346789",
"iban": "GB29NWBK60161331926819",
"bicSwift": "SMCOGB2LXXX",
"sortCode": "123456",
"transitNumber": "12345",
"institutionNumber": "111",
"bsbNumber": "123-456",
"clabeNumber": "123456789012345678",
"bankCode": "123456",
"cnapsCode": "123456789",
"clearingCode": "123456"
},
"externalCryptoWallet": {
"cryptoWalletType": "EVM",
"chain": "BASE",
"address": "0x1234567890123456789012345678901234567890"
},
"fernCryptoWallet": {
"cryptoWalletType": "EVM",
"address": "0x1234567890123456789012345678901234567890"
},
"isThirdParty": false,
"bankAccountFormLink": "https://app.fernhq.com/bank_account/abc"
}

Authorizations

Authorization
string
header
required

To authenticate server-side requests

Body

application/json
paymentAccountType
enum<string>
required

Type of payment account to create

Available options:
FERN_CRYPTO_WALLET,
EXTERNAL_CRYPTO_WALLET,
EXTERNAL_BANK_ACCOUNT,
FERN_AUTO_FIAT_ACCOUNT,
FERN_FIAT_ACCOUNT
Example:

"EXTERNAL_BANK_ACCOUNT"

customerId
string<uuid>
required

Customer to create payment account

Example:

"072a8b7b-38c7-429a-a6cf-35dae7f2fb77"

nickname
string

Nickname for customer to use for the payment account

Example:

"Savings Account"

organizationId
string<uuid>

Organization to create payment account

Example:

"24ab9fdd-5042-4d96-a616-4bef2877dd01"

externalBankAccount
object

The external bank account to create

fernAutoFiatAccount
object

The fern auto fiat account to create

fernFiatAccount
object

The fern fiat account to create

externalCryptoWallet
object

The external crypto wallet to link

fernCryptoWallet
object

The fern crypto wallet to create

isThirdParty
boolean
default:false

Whether the payment account is a third-party account. Defaults to false.

Example:

false

Response

Default Response

paymentAccountId
string<uuid>
required

The id of the payment account

Example:

"03b7030f-6da1-4d76-9352-cdebd82112c8"

paymentAccountType
required

Type of payment account to create

Available options:
FERN_CRYPTO_WALLET
Example:

"EXTERNAL_BANK_ACCOUNT"

paymentAccountStatus
required

The status of the payment account

Available options:
PENDING
Example:

"ACTIVE"

nickname
string

Nickname for customer to use for the payment account

Example:

"Savings Account"

createdAt
string<date-time>

ISO timestamp when this transaction was created

customerId
string<uuid>

The id of the customer this payment account belongs to

Example:

"03b7030f-6da1-4d76-9352-cdebd82112c8"

externalBankAccount
object

The bank account to create

fernAutoFiatAccount
object

The fern auto fiat account to create

fernFiatAccount
object

The fern fiat account

externalCryptoWallet
object

The external crypto wallet to link

fernCryptoWallet
object

The fern crypto wallet to create

isThirdParty
boolean
default:false

Whether the payment account is a third-party account. Defaults to false.

Example:

false

A link to a hosted form to create a bank account

Example:

"https://app.fernhq.com/bank_account/abc"