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",
"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
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",
"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
}Body
application/json
Schema for creating a new payment account
Response
Create Payment Account Response
Response schema for creating a payment account
Was this page helpful?