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",
"isThirdParty": false
}
'import requests
url = "https://api.fernhq.com/payment-accounts"
payload = {
"paymentAccountType": "EXTERNAL_BANK_ACCOUNT",
"customerId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"nickname": "Savings Account",
"organizationId": "24ab9fdd-5042-4d96-a616-4bef2877dd01",
"isThirdParty": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentAccountType: 'EXTERNAL_BANK_ACCOUNT',
customerId: '072a8b7b-38c7-429a-a6cf-35dae7f2fb77',
nickname: 'Savings Account',
organizationId: '24ab9fdd-5042-4d96-a616-4bef2877dd01',
isThirdParty: false
})
};
fetch('https://api.fernhq.com/payment-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fernhq.com/payment-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentAccountType' => 'EXTERNAL_BANK_ACCOUNT',
'customerId' => '072a8b7b-38c7-429a-a6cf-35dae7f2fb77',
'nickname' => 'Savings Account',
'organizationId' => '24ab9fdd-5042-4d96-a616-4bef2877dd01',
'isThirdParty' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fernhq.com/payment-accounts"
payload := strings.NewReader("{\n \"paymentAccountType\": \"EXTERNAL_BANK_ACCOUNT\",\n \"customerId\": \"072a8b7b-38c7-429a-a6cf-35dae7f2fb77\",\n \"nickname\": \"Savings Account\",\n \"organizationId\": \"24ab9fdd-5042-4d96-a616-4bef2877dd01\",\n \"isThirdParty\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fernhq.com/payment-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentAccountType\": \"EXTERNAL_BANK_ACCOUNT\",\n \"customerId\": \"072a8b7b-38c7-429a-a6cf-35dae7f2fb77\",\n \"nickname\": \"Savings Account\",\n \"organizationId\": \"24ab9fdd-5042-4d96-a616-4bef2877dd01\",\n \"isThirdParty\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fernhq.com/payment-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentAccountType\": \"EXTERNAL_BANK_ACCOUNT\",\n \"customerId\": \"072a8b7b-38c7-429a-a6cf-35dae7f2fb77\",\n \"nickname\": \"Savings Account\",\n \"organizationId\": \"24ab9fdd-5042-4d96-a616-4bef2877dd01\",\n \"isThirdParty\": false\n}"
response = http.request(request)
puts response.read_body{
"paymentAccountId": "11111111-2222-3333-4444-555555555555",
"paymentAccountType": "EXTERNAL_BANK_ACCOUNT",
"nickname": "Operating Account",
"createdAt": "2025-10-30T12:00:00Z",
"customerId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"paymentAccountStatus": "ACTIVE",
"externalBankAccount": {
"bankAccountType": "CHECKING",
"bankAccountOwnerName": "Acme Corp",
"bankAccountOwnerEmail": "finance@acme.com",
"bankName": "Chase Bank",
"bankAccountCurrency": {
"label": "USD"
},
"bankAccountMask": "***6789",
"bankAccountPaymentMethod": "ACH"
},
"isThirdParty": false
}Create payment account
Create an account for a customer
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",
"isThirdParty": false
}
'import requests
url = "https://api.fernhq.com/payment-accounts"
payload = {
"paymentAccountType": "EXTERNAL_BANK_ACCOUNT",
"customerId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"nickname": "Savings Account",
"organizationId": "24ab9fdd-5042-4d96-a616-4bef2877dd01",
"isThirdParty": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentAccountType: 'EXTERNAL_BANK_ACCOUNT',
customerId: '072a8b7b-38c7-429a-a6cf-35dae7f2fb77',
nickname: 'Savings Account',
organizationId: '24ab9fdd-5042-4d96-a616-4bef2877dd01',
isThirdParty: false
})
};
fetch('https://api.fernhq.com/payment-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fernhq.com/payment-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentAccountType' => 'EXTERNAL_BANK_ACCOUNT',
'customerId' => '072a8b7b-38c7-429a-a6cf-35dae7f2fb77',
'nickname' => 'Savings Account',
'organizationId' => '24ab9fdd-5042-4d96-a616-4bef2877dd01',
'isThirdParty' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fernhq.com/payment-accounts"
payload := strings.NewReader("{\n \"paymentAccountType\": \"EXTERNAL_BANK_ACCOUNT\",\n \"customerId\": \"072a8b7b-38c7-429a-a6cf-35dae7f2fb77\",\n \"nickname\": \"Savings Account\",\n \"organizationId\": \"24ab9fdd-5042-4d96-a616-4bef2877dd01\",\n \"isThirdParty\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fernhq.com/payment-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentAccountType\": \"EXTERNAL_BANK_ACCOUNT\",\n \"customerId\": \"072a8b7b-38c7-429a-a6cf-35dae7f2fb77\",\n \"nickname\": \"Savings Account\",\n \"organizationId\": \"24ab9fdd-5042-4d96-a616-4bef2877dd01\",\n \"isThirdParty\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fernhq.com/payment-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentAccountType\": \"EXTERNAL_BANK_ACCOUNT\",\n \"customerId\": \"072a8b7b-38c7-429a-a6cf-35dae7f2fb77\",\n \"nickname\": \"Savings Account\",\n \"organizationId\": \"24ab9fdd-5042-4d96-a616-4bef2877dd01\",\n \"isThirdParty\": false\n}"
response = http.request(request)
puts response.read_body{
"paymentAccountId": "11111111-2222-3333-4444-555555555555",
"paymentAccountType": "EXTERNAL_BANK_ACCOUNT",
"nickname": "Operating Account",
"createdAt": "2025-10-30T12:00:00Z",
"customerId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"paymentAccountStatus": "ACTIVE",
"externalBankAccount": {
"bankAccountType": "CHECKING",
"bankAccountOwnerName": "Acme Corp",
"bankAccountOwnerEmail": "finance@acme.com",
"bankName": "Chase Bank",
"bankAccountCurrency": {
"label": "USD"
},
"bankAccountMask": "***6789",
"bankAccountPaymentMethod": "ACH"
},
"isThirdParty": false
}Authorizations
To authenticate server-side requests
Body
Schema for creating a new payment account
Type of payment account to create
FERN_CRYPTO_WALLET, EXTERNAL_CRYPTO_WALLET, EXTERNAL_BANK_ACCOUNT, FERN_AUTO_FIAT_ACCOUNT, FERN_FIAT_ACCOUNT "EXTERNAL_BANK_ACCOUNT"
Customer to create payment account
"072a8b7b-38c7-429a-a6cf-35dae7f2fb77"
Nickname for customer to use for the payment account
"Savings Account"
Organization to create payment account
"24ab9fdd-5042-4d96-a616-4bef2877dd01"
Request schema for external bank accounts
Show child attributes
Show child attributes
Request schema for Fern auto fiat accounts
Show child attributes
Show child attributes
Response schema for external crypto wallets
Show child attributes
Show child attributes
Request schema for Fern crypto wallets
Show child attributes
Show child attributes
Whether the payment account is a third-party account. Defaults to false.
false
Response
Create Payment Account Response
Response schema for creating a payment account
The id of the payment account
"03b7030f-6da1-4d76-9352-cdebd82112c8"
Type of payment account to create
FERN_CRYPTO_WALLET, EXTERNAL_CRYPTO_WALLET, EXTERNAL_BANK_ACCOUNT, FERN_AUTO_FIAT_ACCOUNT, FERN_FIAT_ACCOUNT "EXTERNAL_BANK_ACCOUNT"
The status of the payment account
PENDING, ACTIVE, DEACTIVATED "ACTIVE"
"PENDING"
"DEACTIVATED"
Nickname for customer to use for the payment account
"Savings Account"
ISO timestamp when this transaction was created
The id of the customer this payment account belongs to
"03b7030f-6da1-4d76-9352-cdebd82112c8"
Response schema for external bank accounts
Show child attributes
Show child attributes
Response schema for Fern auto fiat accounts
Show child attributes
Show child attributes
Response schema for Fern fiat accounts
Show child attributes
Show child attributes
Response schema for external crypto wallets
Show child attributes
Show child attributes
Response schema for Fern crypto wallets
Show child attributes
Show child attributes
Whether the payment account is a third-party account. Defaults to false.
false
A link to a hosted form to create a bank account
"https://forms.fernhq.com/bank_account/abc"
Was this page helpful?