Create a new payment means
curl --request POST \
--url https://api.wellapp.ai/v1/payment-means \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "payment_means",
"attributes": {
"type": "account_details",
"scheme": "ACH",
"status": "active",
"account_details": {
"account_number": "1234567890",
"routing_number": "021000021",
"account_type": "checking",
"currency": "USD"
},
"bank_details": {
"bank_name": "JPMorgan Chase Bank, N.A.",
"bank_code": "CHASUS33",
"branch_name": "New York Main Branch",
"branch_code": "NY001"
},
"compliance": {
"kyc_status": "verified",
"aml_status": "cleared"
},
"nickname": "US Operating Account",
"description": "Primary USD account for US operations",
"tags": [
"usd",
"operating",
"us",
"primary"
]
},
"relationships": {
"holder": {
"data": {
"type": "company",
"id": "holder-company-1"
}
},
"account_location": {
"data": {
"type": "location",
"id": "bank-location-1"
}
},
"holder_location": {
"data": {
"type": "location",
"id": "holder-location-1"
}
},
"bank": {
"data": {
"type": "company",
"id": "bank-company-1"
}
},
"intermediary_banks": {
"data": [
{
"type": "company",
"id": "intermediary-bank-1"
}
]
},
"ultimate_beneficiary": {
"data": {
"type": "people",
"id": "beneficiary-person-1"
}
},
"created_by": {
"data": {
"type": "people",
"id": "creator-person-1"
}
},
"documents": {
"data": [
{
"type": "document",
"id": "bank-statement-1"
},
{
"type": "document",
"id": "verification-letter-1"
}
]
},
"transactions": {
"data": [
{
"type": "transaction",
"id": "recent-transaction-1"
}
]
},
"linked_payment_means": {
"data": [
{
"type": "payment_means",
"id": "corporate-card-1"
}
]
}
},
"included": [
{
"type": "company",
"id": "holder-company-1",
"attributes": {
"name": "ACME Corporation",
"description": "Technology solutions provider",
"registration": {
"registered_name": "ACME Corporation Inc.",
"trade_name": "ACME"
},
"tax_id": {
"value": "12-3456789",
"type": "EIN"
}
}
},
{
"type": "location",
"id": "bank-location-1",
"attributes": {
"street": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US",
"is_primary": true
}
},
{
"type": "location",
"id": "holder-location-1",
"attributes": {
"street": "123 Business Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US",
"is_primary": true
}
},
{
"type": "company",
"id": "bank-company-1",
"attributes": {
"name": "JPMorgan Chase Bank",
"description": "Major US financial institution",
"registration": {
"registered_name": "JPMorgan Chase Bank, N.A."
},
"tax_id": {
"value": "13-2624428",
"type": "EIN"
}
}
},
{
"type": "company",
"id": "intermediary-bank-1",
"attributes": {
"name": "Wells Fargo Bank",
"description": "Intermediary bank for routing",
"registration": {
"registered_name": "Wells Fargo Bank, N.A."
}
}
},
{
"type": "people",
"id": "beneficiary-person-1",
"attributes": {
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"date_of_birth": "1980-05-15"
}
},
{
"type": "people",
"id": "creator-person-1",
"attributes": {
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
},
{
"type": "document",
"id": "bank-statement-1",
"attributes": {
"name": "Bank Statement January 2025.pdf",
"file_size": 245678,
"content_type": "application/pdf"
}
},
{
"type": "document",
"id": "verification-letter-1",
"attributes": {
"name": "Account Verification Letter.pdf",
"file_size": 123456,
"content_type": "application/pdf"
}
},
{
"type": "transaction",
"id": "recent-transaction-1",
"attributes": {
"amount": {
"value": 5000,
"currency": "USD"
},
"description": "Monthly supplier payment",
"transaction_date": "2025-01-15T00:00:00.000Z",
"status": "completed"
}
},
{
"type": "payment_means",
"id": "corporate-card-1",
"attributes": {
"type": "card",
"nickname": "Corporate Visa Card",
"scheme": "visa",
"status": "active",
"card_details": {
"last_four": "1234",
"expiry_month": 12,
"expiry_year": 2026,
"cardholder_name": "ACME CORPORATION"
}
}
}
]
}
'import requests
url = "https://api.wellapp.ai/v1/payment-means"
payload = {
"type": "payment_means",
"attributes": {
"type": "account_details",
"scheme": "ACH",
"status": "active",
"account_details": {
"account_number": "1234567890",
"routing_number": "021000021",
"account_type": "checking",
"currency": "USD"
},
"bank_details": {
"bank_name": "JPMorgan Chase Bank, N.A.",
"bank_code": "CHASUS33",
"branch_name": "New York Main Branch",
"branch_code": "NY001"
},
"compliance": {
"kyc_status": "verified",
"aml_status": "cleared"
},
"nickname": "US Operating Account",
"description": "Primary USD account for US operations",
"tags": ["usd", "operating", "us", "primary"]
},
"relationships": {
"holder": { "data": {
"type": "company",
"id": "holder-company-1"
} },
"account_location": { "data": {
"type": "location",
"id": "bank-location-1"
} },
"holder_location": { "data": {
"type": "location",
"id": "holder-location-1"
} },
"bank": { "data": {
"type": "company",
"id": "bank-company-1"
} },
"intermediary_banks": { "data": [
{
"type": "company",
"id": "intermediary-bank-1"
}
] },
"ultimate_beneficiary": { "data": {
"type": "people",
"id": "beneficiary-person-1"
} },
"created_by": { "data": {
"type": "people",
"id": "creator-person-1"
} },
"documents": { "data": [
{
"type": "document",
"id": "bank-statement-1"
},
{
"type": "document",
"id": "verification-letter-1"
}
] },
"transactions": { "data": [
{
"type": "transaction",
"id": "recent-transaction-1"
}
] },
"linked_payment_means": { "data": [
{
"type": "payment_means",
"id": "corporate-card-1"
}
] }
},
"included": [
{
"type": "company",
"id": "holder-company-1",
"attributes": {
"name": "ACME Corporation",
"description": "Technology solutions provider",
"registration": {
"registered_name": "ACME Corporation Inc.",
"trade_name": "ACME"
},
"tax_id": {
"value": "12-3456789",
"type": "EIN"
}
}
},
{
"type": "location",
"id": "bank-location-1",
"attributes": {
"street": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US",
"is_primary": True
}
},
{
"type": "location",
"id": "holder-location-1",
"attributes": {
"street": "123 Business Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US",
"is_primary": True
}
},
{
"type": "company",
"id": "bank-company-1",
"attributes": {
"name": "JPMorgan Chase Bank",
"description": "Major US financial institution",
"registration": { "registered_name": "JPMorgan Chase Bank, N.A." },
"tax_id": {
"value": "13-2624428",
"type": "EIN"
}
}
},
{
"type": "company",
"id": "intermediary-bank-1",
"attributes": {
"name": "Wells Fargo Bank",
"description": "Intermediary bank for routing",
"registration": { "registered_name": "Wells Fargo Bank, N.A." }
}
},
{
"type": "people",
"id": "beneficiary-person-1",
"attributes": {
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"date_of_birth": "1980-05-15"
}
},
{
"type": "people",
"id": "creator-person-1",
"attributes": {
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
},
{
"type": "document",
"id": "bank-statement-1",
"attributes": {
"name": "Bank Statement January 2025.pdf",
"file_size": 245678,
"content_type": "application/pdf"
}
},
{
"type": "document",
"id": "verification-letter-1",
"attributes": {
"name": "Account Verification Letter.pdf",
"file_size": 123456,
"content_type": "application/pdf"
}
},
{
"type": "transaction",
"id": "recent-transaction-1",
"attributes": {
"amount": {
"value": 5000,
"currency": "USD"
},
"description": "Monthly supplier payment",
"transaction_date": "2025-01-15T00:00:00.000Z",
"status": "completed"
}
},
{
"type": "payment_means",
"id": "corporate-card-1",
"attributes": {
"type": "card",
"nickname": "Corporate Visa Card",
"scheme": "visa",
"status": "active",
"card_details": {
"last_four": "1234",
"expiry_month": 12,
"expiry_year": 2026,
"cardholder_name": "ACME CORPORATION"
}
}
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'payment_means',
attributes: {
type: 'account_details',
scheme: 'ACH',
status: 'active',
account_details: {
account_number: '1234567890',
routing_number: '021000021',
account_type: 'checking',
currency: 'USD'
},
bank_details: {
bank_name: 'JPMorgan Chase Bank, N.A.',
bank_code: 'CHASUS33',
branch_name: 'New York Main Branch',
branch_code: 'NY001'
},
compliance: {kyc_status: 'verified', aml_status: 'cleared'},
nickname: 'US Operating Account',
description: 'Primary USD account for US operations',
tags: ['usd', 'operating', 'us', 'primary']
},
relationships: {
holder: {data: {type: 'company', id: 'holder-company-1'}},
account_location: {data: {type: 'location', id: 'bank-location-1'}},
holder_location: {data: {type: 'location', id: 'holder-location-1'}},
bank: {data: {type: 'company', id: 'bank-company-1'}},
intermediary_banks: {data: [{type: 'company', id: 'intermediary-bank-1'}]},
ultimate_beneficiary: {data: {type: 'people', id: 'beneficiary-person-1'}},
created_by: {data: {type: 'people', id: 'creator-person-1'}},
documents: {
data: [
{type: 'document', id: 'bank-statement-1'},
{type: 'document', id: 'verification-letter-1'}
]
},
transactions: {data: [{type: 'transaction', id: 'recent-transaction-1'}]},
linked_payment_means: {data: [{type: 'payment_means', id: 'corporate-card-1'}]}
},
included: [
{
type: 'company',
id: 'holder-company-1',
attributes: {
name: 'ACME Corporation',
description: 'Technology solutions provider',
registration: {registered_name: 'ACME Corporation Inc.', trade_name: 'ACME'},
tax_id: {value: '12-3456789', type: 'EIN'}
}
},
{
type: 'location',
id: 'bank-location-1',
attributes: {
street: '270 Park Avenue',
city: 'New York',
state: 'NY',
postal_code: '10017',
country: 'US',
is_primary: true
}
},
{
type: 'location',
id: 'holder-location-1',
attributes: {
street: '123 Business Avenue',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US',
is_primary: true
}
},
{
type: 'company',
id: 'bank-company-1',
attributes: {
name: 'JPMorgan Chase Bank',
description: 'Major US financial institution',
registration: {registered_name: 'JPMorgan Chase Bank, N.A.'},
tax_id: {value: '13-2624428', type: 'EIN'}
}
},
{
type: 'company',
id: 'intermediary-bank-1',
attributes: {
name: 'Wells Fargo Bank',
description: 'Intermediary bank for routing',
registration: {registered_name: 'Wells Fargo Bank, N.A.'}
}
},
{
type: 'people',
id: 'beneficiary-person-1',
attributes: {
first_name: 'Jane',
last_name: 'Doe',
full_name: 'Jane Doe',
date_of_birth: '1980-05-15'
}
},
{
type: 'people',
id: 'creator-person-1',
attributes: {first_name: 'John', last_name: 'Smith', full_name: 'John Smith'}
},
{
type: 'document',
id: 'bank-statement-1',
attributes: {
name: 'Bank Statement January 2025.pdf',
file_size: 245678,
content_type: 'application/pdf'
}
},
{
type: 'document',
id: 'verification-letter-1',
attributes: {
name: 'Account Verification Letter.pdf',
file_size: 123456,
content_type: 'application/pdf'
}
},
{
type: 'transaction',
id: 'recent-transaction-1',
attributes: {
amount: {value: 5000, currency: 'USD'},
description: 'Monthly supplier payment',
transaction_date: '2025-01-15T00:00:00.000Z',
status: 'completed'
}
},
{
type: 'payment_means',
id: 'corporate-card-1',
attributes: {
type: 'card',
nickname: 'Corporate Visa Card',
scheme: 'visa',
status: 'active',
card_details: {
last_four: '1234',
expiry_month: 12,
expiry_year: 2026,
cardholder_name: 'ACME CORPORATION'
}
}
}
]
})
};
fetch('https://api.wellapp.ai/v1/payment-means', 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.wellapp.ai/v1/payment-means",
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([
'type' => 'payment_means',
'attributes' => [
'type' => 'account_details',
'scheme' => 'ACH',
'status' => 'active',
'account_details' => [
'account_number' => '1234567890',
'routing_number' => '021000021',
'account_type' => 'checking',
'currency' => 'USD'
],
'bank_details' => [
'bank_name' => 'JPMorgan Chase Bank, N.A.',
'bank_code' => 'CHASUS33',
'branch_name' => 'New York Main Branch',
'branch_code' => 'NY001'
],
'compliance' => [
'kyc_status' => 'verified',
'aml_status' => 'cleared'
],
'nickname' => 'US Operating Account',
'description' => 'Primary USD account for US operations',
'tags' => [
'usd',
'operating',
'us',
'primary'
]
],
'relationships' => [
'holder' => [
'data' => [
'type' => 'company',
'id' => 'holder-company-1'
]
],
'account_location' => [
'data' => [
'type' => 'location',
'id' => 'bank-location-1'
]
],
'holder_location' => [
'data' => [
'type' => 'location',
'id' => 'holder-location-1'
]
],
'bank' => [
'data' => [
'type' => 'company',
'id' => 'bank-company-1'
]
],
'intermediary_banks' => [
'data' => [
[
'type' => 'company',
'id' => 'intermediary-bank-1'
]
]
],
'ultimate_beneficiary' => [
'data' => [
'type' => 'people',
'id' => 'beneficiary-person-1'
]
],
'created_by' => [
'data' => [
'type' => 'people',
'id' => 'creator-person-1'
]
],
'documents' => [
'data' => [
[
'type' => 'document',
'id' => 'bank-statement-1'
],
[
'type' => 'document',
'id' => 'verification-letter-1'
]
]
],
'transactions' => [
'data' => [
[
'type' => 'transaction',
'id' => 'recent-transaction-1'
]
]
],
'linked_payment_means' => [
'data' => [
[
'type' => 'payment_means',
'id' => 'corporate-card-1'
]
]
]
],
'included' => [
[
'type' => 'company',
'id' => 'holder-company-1',
'attributes' => [
'name' => 'ACME Corporation',
'description' => 'Technology solutions provider',
'registration' => [
'registered_name' => 'ACME Corporation Inc.',
'trade_name' => 'ACME'
],
'tax_id' => [
'value' => '12-3456789',
'type' => 'EIN'
]
]
],
[
'type' => 'location',
'id' => 'bank-location-1',
'attributes' => [
'street' => '270 Park Avenue',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10017',
'country' => 'US',
'is_primary' => true
]
],
[
'type' => 'location',
'id' => 'holder-location-1',
'attributes' => [
'street' => '123 Business Avenue',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country' => 'US',
'is_primary' => true
]
],
[
'type' => 'company',
'id' => 'bank-company-1',
'attributes' => [
'name' => 'JPMorgan Chase Bank',
'description' => 'Major US financial institution',
'registration' => [
'registered_name' => 'JPMorgan Chase Bank, N.A.'
],
'tax_id' => [
'value' => '13-2624428',
'type' => 'EIN'
]
]
],
[
'type' => 'company',
'id' => 'intermediary-bank-1',
'attributes' => [
'name' => 'Wells Fargo Bank',
'description' => 'Intermediary bank for routing',
'registration' => [
'registered_name' => 'Wells Fargo Bank, N.A.'
]
]
],
[
'type' => 'people',
'id' => 'beneficiary-person-1',
'attributes' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'full_name' => 'Jane Doe',
'date_of_birth' => '1980-05-15'
]
],
[
'type' => 'people',
'id' => 'creator-person-1',
'attributes' => [
'first_name' => 'John',
'last_name' => 'Smith',
'full_name' => 'John Smith'
]
],
[
'type' => 'document',
'id' => 'bank-statement-1',
'attributes' => [
'name' => 'Bank Statement January 2025.pdf',
'file_size' => 245678,
'content_type' => 'application/pdf'
]
],
[
'type' => 'document',
'id' => 'verification-letter-1',
'attributes' => [
'name' => 'Account Verification Letter.pdf',
'file_size' => 123456,
'content_type' => 'application/pdf'
]
],
[
'type' => 'transaction',
'id' => 'recent-transaction-1',
'attributes' => [
'amount' => [
'value' => 5000,
'currency' => 'USD'
],
'description' => 'Monthly supplier payment',
'transaction_date' => '2025-01-15T00:00:00.000Z',
'status' => 'completed'
]
],
[
'type' => 'payment_means',
'id' => 'corporate-card-1',
'attributes' => [
'type' => 'card',
'nickname' => 'Corporate Visa Card',
'scheme' => 'visa',
'status' => 'active',
'card_details' => [
'last_four' => '1234',
'expiry_month' => 12,
'expiry_year' => 2026,
'cardholder_name' => 'ACME CORPORATION'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/payment-means"
payload := strings.NewReader("{\n \"type\": \"payment_means\",\n \"attributes\": {\n \"type\": \"account_details\",\n \"scheme\": \"ACH\",\n \"status\": \"active\",\n \"account_details\": {\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\",\n \"currency\": \"USD\"\n },\n \"bank_details\": {\n \"bank_name\": \"JPMorgan Chase Bank, N.A.\",\n \"bank_code\": \"CHASUS33\",\n \"branch_name\": \"New York Main Branch\",\n \"branch_code\": \"NY001\"\n },\n \"compliance\": {\n \"kyc_status\": \"verified\",\n \"aml_status\": \"cleared\"\n },\n \"nickname\": \"US Operating Account\",\n \"description\": \"Primary USD account for US operations\",\n \"tags\": [\n \"usd\",\n \"operating\",\n \"us\",\n \"primary\"\n ]\n },\n \"relationships\": {\n \"holder\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"holder-company-1\"\n }\n },\n \"account_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"bank-location-1\"\n }\n },\n \"holder_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"holder-location-1\"\n }\n },\n \"bank\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"bank-company-1\"\n }\n },\n \"intermediary_banks\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\"\n }\n ]\n },\n \"ultimate_beneficiary\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\"\n }\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"creator-person-1\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\"\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\"\n }\n ]\n },\n \"transactions\": {\n \"data\": [\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\"\n }\n ]\n },\n \"linked_payment_means\": {\n \"data\": [\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"company\",\n \"id\": \"holder-company-1\",\n \"attributes\": {\n \"name\": \"ACME Corporation\",\n \"description\": \"Technology solutions provider\",\n \"registration\": {\n \"registered_name\": \"ACME Corporation Inc.\",\n \"trade_name\": \"ACME\"\n },\n \"tax_id\": {\n \"value\": \"12-3456789\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"bank-location-1\",\n \"attributes\": {\n \"street\": \"270 Park Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10017\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"holder-location-1\",\n \"attributes\": {\n \"street\": \"123 Business Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"bank-company-1\",\n \"attributes\": {\n \"name\": \"JPMorgan Chase Bank\",\n \"description\": \"Major US financial institution\",\n \"registration\": {\n \"registered_name\": \"JPMorgan Chase Bank, N.A.\"\n },\n \"tax_id\": {\n \"value\": \"13-2624428\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\",\n \"attributes\": {\n \"name\": \"Wells Fargo Bank\",\n \"description\": \"Intermediary bank for routing\",\n \"registration\": {\n \"registered_name\": \"Wells Fargo Bank, N.A.\"\n }\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\",\n \"attributes\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"full_name\": \"Jane Doe\",\n \"date_of_birth\": \"1980-05-15\"\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"creator-person-1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\",\n \"attributes\": {\n \"name\": \"Bank Statement January 2025.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\",\n \"attributes\": {\n \"name\": \"Account Verification Letter.pdf\",\n \"file_size\": 123456,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\",\n \"attributes\": {\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"USD\"\n },\n \"description\": \"Monthly supplier payment\",\n \"transaction_date\": \"2025-01-15T00:00:00.000Z\",\n \"status\": \"completed\"\n }\n },\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\",\n \"attributes\": {\n \"type\": \"card\",\n \"nickname\": \"Corporate Visa Card\",\n \"scheme\": \"visa\",\n \"status\": \"active\",\n \"card_details\": {\n \"last_four\": \"1234\",\n \"expiry_month\": 12,\n \"expiry_year\": 2026,\n \"cardholder_name\": \"ACME CORPORATION\"\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/payment-means")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"payment_means\",\n \"attributes\": {\n \"type\": \"account_details\",\n \"scheme\": \"ACH\",\n \"status\": \"active\",\n \"account_details\": {\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\",\n \"currency\": \"USD\"\n },\n \"bank_details\": {\n \"bank_name\": \"JPMorgan Chase Bank, N.A.\",\n \"bank_code\": \"CHASUS33\",\n \"branch_name\": \"New York Main Branch\",\n \"branch_code\": \"NY001\"\n },\n \"compliance\": {\n \"kyc_status\": \"verified\",\n \"aml_status\": \"cleared\"\n },\n \"nickname\": \"US Operating Account\",\n \"description\": \"Primary USD account for US operations\",\n \"tags\": [\n \"usd\",\n \"operating\",\n \"us\",\n \"primary\"\n ]\n },\n \"relationships\": {\n \"holder\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"holder-company-1\"\n }\n },\n \"account_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"bank-location-1\"\n }\n },\n \"holder_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"holder-location-1\"\n }\n },\n \"bank\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"bank-company-1\"\n }\n },\n \"intermediary_banks\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\"\n }\n ]\n },\n \"ultimate_beneficiary\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\"\n }\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"creator-person-1\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\"\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\"\n }\n ]\n },\n \"transactions\": {\n \"data\": [\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\"\n }\n ]\n },\n \"linked_payment_means\": {\n \"data\": [\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"company\",\n \"id\": \"holder-company-1\",\n \"attributes\": {\n \"name\": \"ACME Corporation\",\n \"description\": \"Technology solutions provider\",\n \"registration\": {\n \"registered_name\": \"ACME Corporation Inc.\",\n \"trade_name\": \"ACME\"\n },\n \"tax_id\": {\n \"value\": \"12-3456789\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"bank-location-1\",\n \"attributes\": {\n \"street\": \"270 Park Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10017\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"holder-location-1\",\n \"attributes\": {\n \"street\": \"123 Business Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"bank-company-1\",\n \"attributes\": {\n \"name\": \"JPMorgan Chase Bank\",\n \"description\": \"Major US financial institution\",\n \"registration\": {\n \"registered_name\": \"JPMorgan Chase Bank, N.A.\"\n },\n \"tax_id\": {\n \"value\": \"13-2624428\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\",\n \"attributes\": {\n \"name\": \"Wells Fargo Bank\",\n \"description\": \"Intermediary bank for routing\",\n \"registration\": {\n \"registered_name\": \"Wells Fargo Bank, N.A.\"\n }\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\",\n \"attributes\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"full_name\": \"Jane Doe\",\n \"date_of_birth\": \"1980-05-15\"\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"creator-person-1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\",\n \"attributes\": {\n \"name\": \"Bank Statement January 2025.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\",\n \"attributes\": {\n \"name\": \"Account Verification Letter.pdf\",\n \"file_size\": 123456,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\",\n \"attributes\": {\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"USD\"\n },\n \"description\": \"Monthly supplier payment\",\n \"transaction_date\": \"2025-01-15T00:00:00.000Z\",\n \"status\": \"completed\"\n }\n },\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\",\n \"attributes\": {\n \"type\": \"card\",\n \"nickname\": \"Corporate Visa Card\",\n \"scheme\": \"visa\",\n \"status\": \"active\",\n \"card_details\": {\n \"last_four\": \"1234\",\n \"expiry_month\": 12,\n \"expiry_year\": 2026,\n \"cardholder_name\": \"ACME CORPORATION\"\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/payment-means")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"payment_means\",\n \"attributes\": {\n \"type\": \"account_details\",\n \"scheme\": \"ACH\",\n \"status\": \"active\",\n \"account_details\": {\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\",\n \"currency\": \"USD\"\n },\n \"bank_details\": {\n \"bank_name\": \"JPMorgan Chase Bank, N.A.\",\n \"bank_code\": \"CHASUS33\",\n \"branch_name\": \"New York Main Branch\",\n \"branch_code\": \"NY001\"\n },\n \"compliance\": {\n \"kyc_status\": \"verified\",\n \"aml_status\": \"cleared\"\n },\n \"nickname\": \"US Operating Account\",\n \"description\": \"Primary USD account for US operations\",\n \"tags\": [\n \"usd\",\n \"operating\",\n \"us\",\n \"primary\"\n ]\n },\n \"relationships\": {\n \"holder\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"holder-company-1\"\n }\n },\n \"account_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"bank-location-1\"\n }\n },\n \"holder_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"holder-location-1\"\n }\n },\n \"bank\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"bank-company-1\"\n }\n },\n \"intermediary_banks\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\"\n }\n ]\n },\n \"ultimate_beneficiary\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\"\n }\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"creator-person-1\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\"\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\"\n }\n ]\n },\n \"transactions\": {\n \"data\": [\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\"\n }\n ]\n },\n \"linked_payment_means\": {\n \"data\": [\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"company\",\n \"id\": \"holder-company-1\",\n \"attributes\": {\n \"name\": \"ACME Corporation\",\n \"description\": \"Technology solutions provider\",\n \"registration\": {\n \"registered_name\": \"ACME Corporation Inc.\",\n \"trade_name\": \"ACME\"\n },\n \"tax_id\": {\n \"value\": \"12-3456789\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"bank-location-1\",\n \"attributes\": {\n \"street\": \"270 Park Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10017\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"holder-location-1\",\n \"attributes\": {\n \"street\": \"123 Business Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"bank-company-1\",\n \"attributes\": {\n \"name\": \"JPMorgan Chase Bank\",\n \"description\": \"Major US financial institution\",\n \"registration\": {\n \"registered_name\": \"JPMorgan Chase Bank, N.A.\"\n },\n \"tax_id\": {\n \"value\": \"13-2624428\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\",\n \"attributes\": {\n \"name\": \"Wells Fargo Bank\",\n \"description\": \"Intermediary bank for routing\",\n \"registration\": {\n \"registered_name\": \"Wells Fargo Bank, N.A.\"\n }\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\",\n \"attributes\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"full_name\": \"Jane Doe\",\n \"date_of_birth\": \"1980-05-15\"\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"creator-person-1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\",\n \"attributes\": {\n \"name\": \"Bank Statement January 2025.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\",\n \"attributes\": {\n \"name\": \"Account Verification Letter.pdf\",\n \"file_size\": 123456,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\",\n \"attributes\": {\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"USD\"\n },\n \"description\": \"Monthly supplier payment\",\n \"transaction_date\": \"2025-01-15T00:00:00.000Z\",\n \"status\": \"completed\"\n }\n },\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\",\n \"attributes\": {\n \"type\": \"card\",\n \"nickname\": \"Corporate Visa Card\",\n \"scheme\": \"visa\",\n \"status\": \"active\",\n \"card_details\": {\n \"last_four\": \"1234\",\n \"expiry_month\": 12,\n \"expiry_year\": 2026,\n \"cardholder_name\": \"ACME CORPORATION\"\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "payment_means",
"id": "pm-550e8400-e29b-41d4-a716-446655440099",
"attributes": {
"type": "account_details",
"scheme": "ACH",
"status": "active",
"account_details": {
"account_number": "1234567890",
"routing_number": "021000021",
"account_type": "checking",
"currency": "USD"
},
"bank_details": {
"bank_name": "JPMorgan Chase Bank, N.A.",
"bank_code": "CHASUS33",
"branch_name": "New York Main Branch",
"branch_code": "NY001"
},
"compliance": {
"kyc_status": "verified",
"aml_status": "cleared",
"sanctions_check": "passed",
"last_compliance_check": "2025-01-15T10:00:00.000Z"
},
"metadata": {
"source": "api",
"external_id": null,
"last_used_at": null,
"usage_count": 0
},
"nickname": "US Operating Account",
"description": "Primary USD account for US operations",
"tags": [
"usd",
"operating",
"us",
"primary"
],
"is_primary": true,
"is_verified": true,
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
},
"relationships": {
"holder": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"account_location": {
"data": {
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440101"
}
},
"holder_location": {
"data": {
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440102"
}
},
"bank": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440103"
}
},
"intermediary_banks": {
"data": [
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440104"
}
]
},
"ultimate_beneficiary": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440201"
}
},
"created_by": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440202"
}
},
"documents": {
"data": [
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440301"
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440302"
}
]
},
"transactions": {
"data": [
{
"type": "transaction",
"id": "550e8400-e29b-41d4-a716-446655440401"
}
]
},
"linked_payment_means": {
"data": [
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440501"
}
]
}
},
"included": [
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"name": "ACME Corporation",
"description": "Technology solutions provider",
"registration": {
"registered_name": "ACME Corporation Inc.",
"trade_name": "ACME"
},
"tax_id": {
"value": "12-3456789",
"type": "EIN"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440101",
"attributes": {
"street": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US",
"is_primary": true,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440102",
"attributes": {
"street": "123 Business Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US",
"is_primary": true,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440103",
"attributes": {
"name": "JPMorgan Chase Bank",
"description": "Major US financial institution",
"registration": {
"registered_name": "JPMorgan Chase Bank, N.A."
},
"tax_id": {
"value": "13-2624428",
"type": "EIN"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440104",
"attributes": {
"name": "Wells Fargo Bank",
"description": "Intermediary bank for routing",
"registration": {
"registered_name": "Wells Fargo Bank, N.A."
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440201",
"attributes": {
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"date_of_birth": "1980-05-15",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440202",
"attributes": {
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440301",
"attributes": {
"name": "Bank Statement January 2025.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-01-15T09:00:00.000Z",
"updated_at": "2025-01-15T09:00:00.000Z"
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440302",
"attributes": {
"name": "Account Verification Letter.pdf",
"file_size": 123456,
"content_type": "application/pdf",
"created_at": "2025-01-15T09:30:00.000Z",
"updated_at": "2025-01-15T09:30:00.000Z"
}
},
{
"type": "transaction",
"id": "550e8400-e29b-41d4-a716-446655440401",
"attributes": {
"amount": {
"value": 5000,
"currency": "USD"
},
"description": "Monthly supplier payment",
"transaction_date": "2025-01-15T00:00:00.000Z",
"status": "completed",
"created_at": "2025-01-15T08:00:00.000Z",
"updated_at": "2025-01-15T08:30:00.000Z"
}
},
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440501",
"attributes": {
"type": "card",
"scheme": "visa",
"status": "active",
"card_details": {
"last_four": "1234",
"expiry_month": 12,
"expiry_year": 2026,
"cardholder_name": "ACME CORPORATION",
"nickname": "Corporate Visa Card",
"is_primary": false,
"created_at": "2024-06-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
}
}
]
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"id": "unauthorized",
"status": "401",
"code": "UNAUTHORIZED",
"title": "Unauthorized",
"detail": "Valid authentication credentials are required"
}
]
}{
"errors": [
{
"id": "holder_not_found",
"status": "404",
"code": "HOLDER_NOT_FOUND",
"title": "Holder Not Found",
"detail": "The specified holder company or person does not exist",
"source": {
"pointer": "/data/relationships/holder/data/id"
}
}
]
}Payment Means
Create Payment Mean
Create a new payment method or account for financial transactions. This endpoint supports various payment means types including bank accounts (IBAN/SWIFT), credit/debit cards, digital wallets, and other payment instruments.
POST
/
v1
/
payment-means
Create a new payment means
curl --request POST \
--url https://api.wellapp.ai/v1/payment-means \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "payment_means",
"attributes": {
"type": "account_details",
"scheme": "ACH",
"status": "active",
"account_details": {
"account_number": "1234567890",
"routing_number": "021000021",
"account_type": "checking",
"currency": "USD"
},
"bank_details": {
"bank_name": "JPMorgan Chase Bank, N.A.",
"bank_code": "CHASUS33",
"branch_name": "New York Main Branch",
"branch_code": "NY001"
},
"compliance": {
"kyc_status": "verified",
"aml_status": "cleared"
},
"nickname": "US Operating Account",
"description": "Primary USD account for US operations",
"tags": [
"usd",
"operating",
"us",
"primary"
]
},
"relationships": {
"holder": {
"data": {
"type": "company",
"id": "holder-company-1"
}
},
"account_location": {
"data": {
"type": "location",
"id": "bank-location-1"
}
},
"holder_location": {
"data": {
"type": "location",
"id": "holder-location-1"
}
},
"bank": {
"data": {
"type": "company",
"id": "bank-company-1"
}
},
"intermediary_banks": {
"data": [
{
"type": "company",
"id": "intermediary-bank-1"
}
]
},
"ultimate_beneficiary": {
"data": {
"type": "people",
"id": "beneficiary-person-1"
}
},
"created_by": {
"data": {
"type": "people",
"id": "creator-person-1"
}
},
"documents": {
"data": [
{
"type": "document",
"id": "bank-statement-1"
},
{
"type": "document",
"id": "verification-letter-1"
}
]
},
"transactions": {
"data": [
{
"type": "transaction",
"id": "recent-transaction-1"
}
]
},
"linked_payment_means": {
"data": [
{
"type": "payment_means",
"id": "corporate-card-1"
}
]
}
},
"included": [
{
"type": "company",
"id": "holder-company-1",
"attributes": {
"name": "ACME Corporation",
"description": "Technology solutions provider",
"registration": {
"registered_name": "ACME Corporation Inc.",
"trade_name": "ACME"
},
"tax_id": {
"value": "12-3456789",
"type": "EIN"
}
}
},
{
"type": "location",
"id": "bank-location-1",
"attributes": {
"street": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US",
"is_primary": true
}
},
{
"type": "location",
"id": "holder-location-1",
"attributes": {
"street": "123 Business Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US",
"is_primary": true
}
},
{
"type": "company",
"id": "bank-company-1",
"attributes": {
"name": "JPMorgan Chase Bank",
"description": "Major US financial institution",
"registration": {
"registered_name": "JPMorgan Chase Bank, N.A."
},
"tax_id": {
"value": "13-2624428",
"type": "EIN"
}
}
},
{
"type": "company",
"id": "intermediary-bank-1",
"attributes": {
"name": "Wells Fargo Bank",
"description": "Intermediary bank for routing",
"registration": {
"registered_name": "Wells Fargo Bank, N.A."
}
}
},
{
"type": "people",
"id": "beneficiary-person-1",
"attributes": {
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"date_of_birth": "1980-05-15"
}
},
{
"type": "people",
"id": "creator-person-1",
"attributes": {
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
},
{
"type": "document",
"id": "bank-statement-1",
"attributes": {
"name": "Bank Statement January 2025.pdf",
"file_size": 245678,
"content_type": "application/pdf"
}
},
{
"type": "document",
"id": "verification-letter-1",
"attributes": {
"name": "Account Verification Letter.pdf",
"file_size": 123456,
"content_type": "application/pdf"
}
},
{
"type": "transaction",
"id": "recent-transaction-1",
"attributes": {
"amount": {
"value": 5000,
"currency": "USD"
},
"description": "Monthly supplier payment",
"transaction_date": "2025-01-15T00:00:00.000Z",
"status": "completed"
}
},
{
"type": "payment_means",
"id": "corporate-card-1",
"attributes": {
"type": "card",
"nickname": "Corporate Visa Card",
"scheme": "visa",
"status": "active",
"card_details": {
"last_four": "1234",
"expiry_month": 12,
"expiry_year": 2026,
"cardholder_name": "ACME CORPORATION"
}
}
}
]
}
'import requests
url = "https://api.wellapp.ai/v1/payment-means"
payload = {
"type": "payment_means",
"attributes": {
"type": "account_details",
"scheme": "ACH",
"status": "active",
"account_details": {
"account_number": "1234567890",
"routing_number": "021000021",
"account_type": "checking",
"currency": "USD"
},
"bank_details": {
"bank_name": "JPMorgan Chase Bank, N.A.",
"bank_code": "CHASUS33",
"branch_name": "New York Main Branch",
"branch_code": "NY001"
},
"compliance": {
"kyc_status": "verified",
"aml_status": "cleared"
},
"nickname": "US Operating Account",
"description": "Primary USD account for US operations",
"tags": ["usd", "operating", "us", "primary"]
},
"relationships": {
"holder": { "data": {
"type": "company",
"id": "holder-company-1"
} },
"account_location": { "data": {
"type": "location",
"id": "bank-location-1"
} },
"holder_location": { "data": {
"type": "location",
"id": "holder-location-1"
} },
"bank": { "data": {
"type": "company",
"id": "bank-company-1"
} },
"intermediary_banks": { "data": [
{
"type": "company",
"id": "intermediary-bank-1"
}
] },
"ultimate_beneficiary": { "data": {
"type": "people",
"id": "beneficiary-person-1"
} },
"created_by": { "data": {
"type": "people",
"id": "creator-person-1"
} },
"documents": { "data": [
{
"type": "document",
"id": "bank-statement-1"
},
{
"type": "document",
"id": "verification-letter-1"
}
] },
"transactions": { "data": [
{
"type": "transaction",
"id": "recent-transaction-1"
}
] },
"linked_payment_means": { "data": [
{
"type": "payment_means",
"id": "corporate-card-1"
}
] }
},
"included": [
{
"type": "company",
"id": "holder-company-1",
"attributes": {
"name": "ACME Corporation",
"description": "Technology solutions provider",
"registration": {
"registered_name": "ACME Corporation Inc.",
"trade_name": "ACME"
},
"tax_id": {
"value": "12-3456789",
"type": "EIN"
}
}
},
{
"type": "location",
"id": "bank-location-1",
"attributes": {
"street": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US",
"is_primary": True
}
},
{
"type": "location",
"id": "holder-location-1",
"attributes": {
"street": "123 Business Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US",
"is_primary": True
}
},
{
"type": "company",
"id": "bank-company-1",
"attributes": {
"name": "JPMorgan Chase Bank",
"description": "Major US financial institution",
"registration": { "registered_name": "JPMorgan Chase Bank, N.A." },
"tax_id": {
"value": "13-2624428",
"type": "EIN"
}
}
},
{
"type": "company",
"id": "intermediary-bank-1",
"attributes": {
"name": "Wells Fargo Bank",
"description": "Intermediary bank for routing",
"registration": { "registered_name": "Wells Fargo Bank, N.A." }
}
},
{
"type": "people",
"id": "beneficiary-person-1",
"attributes": {
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"date_of_birth": "1980-05-15"
}
},
{
"type": "people",
"id": "creator-person-1",
"attributes": {
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
},
{
"type": "document",
"id": "bank-statement-1",
"attributes": {
"name": "Bank Statement January 2025.pdf",
"file_size": 245678,
"content_type": "application/pdf"
}
},
{
"type": "document",
"id": "verification-letter-1",
"attributes": {
"name": "Account Verification Letter.pdf",
"file_size": 123456,
"content_type": "application/pdf"
}
},
{
"type": "transaction",
"id": "recent-transaction-1",
"attributes": {
"amount": {
"value": 5000,
"currency": "USD"
},
"description": "Monthly supplier payment",
"transaction_date": "2025-01-15T00:00:00.000Z",
"status": "completed"
}
},
{
"type": "payment_means",
"id": "corporate-card-1",
"attributes": {
"type": "card",
"nickname": "Corporate Visa Card",
"scheme": "visa",
"status": "active",
"card_details": {
"last_four": "1234",
"expiry_month": 12,
"expiry_year": 2026,
"cardholder_name": "ACME CORPORATION"
}
}
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'payment_means',
attributes: {
type: 'account_details',
scheme: 'ACH',
status: 'active',
account_details: {
account_number: '1234567890',
routing_number: '021000021',
account_type: 'checking',
currency: 'USD'
},
bank_details: {
bank_name: 'JPMorgan Chase Bank, N.A.',
bank_code: 'CHASUS33',
branch_name: 'New York Main Branch',
branch_code: 'NY001'
},
compliance: {kyc_status: 'verified', aml_status: 'cleared'},
nickname: 'US Operating Account',
description: 'Primary USD account for US operations',
tags: ['usd', 'operating', 'us', 'primary']
},
relationships: {
holder: {data: {type: 'company', id: 'holder-company-1'}},
account_location: {data: {type: 'location', id: 'bank-location-1'}},
holder_location: {data: {type: 'location', id: 'holder-location-1'}},
bank: {data: {type: 'company', id: 'bank-company-1'}},
intermediary_banks: {data: [{type: 'company', id: 'intermediary-bank-1'}]},
ultimate_beneficiary: {data: {type: 'people', id: 'beneficiary-person-1'}},
created_by: {data: {type: 'people', id: 'creator-person-1'}},
documents: {
data: [
{type: 'document', id: 'bank-statement-1'},
{type: 'document', id: 'verification-letter-1'}
]
},
transactions: {data: [{type: 'transaction', id: 'recent-transaction-1'}]},
linked_payment_means: {data: [{type: 'payment_means', id: 'corporate-card-1'}]}
},
included: [
{
type: 'company',
id: 'holder-company-1',
attributes: {
name: 'ACME Corporation',
description: 'Technology solutions provider',
registration: {registered_name: 'ACME Corporation Inc.', trade_name: 'ACME'},
tax_id: {value: '12-3456789', type: 'EIN'}
}
},
{
type: 'location',
id: 'bank-location-1',
attributes: {
street: '270 Park Avenue',
city: 'New York',
state: 'NY',
postal_code: '10017',
country: 'US',
is_primary: true
}
},
{
type: 'location',
id: 'holder-location-1',
attributes: {
street: '123 Business Avenue',
city: 'New York',
state: 'NY',
postal_code: '10001',
country: 'US',
is_primary: true
}
},
{
type: 'company',
id: 'bank-company-1',
attributes: {
name: 'JPMorgan Chase Bank',
description: 'Major US financial institution',
registration: {registered_name: 'JPMorgan Chase Bank, N.A.'},
tax_id: {value: '13-2624428', type: 'EIN'}
}
},
{
type: 'company',
id: 'intermediary-bank-1',
attributes: {
name: 'Wells Fargo Bank',
description: 'Intermediary bank for routing',
registration: {registered_name: 'Wells Fargo Bank, N.A.'}
}
},
{
type: 'people',
id: 'beneficiary-person-1',
attributes: {
first_name: 'Jane',
last_name: 'Doe',
full_name: 'Jane Doe',
date_of_birth: '1980-05-15'
}
},
{
type: 'people',
id: 'creator-person-1',
attributes: {first_name: 'John', last_name: 'Smith', full_name: 'John Smith'}
},
{
type: 'document',
id: 'bank-statement-1',
attributes: {
name: 'Bank Statement January 2025.pdf',
file_size: 245678,
content_type: 'application/pdf'
}
},
{
type: 'document',
id: 'verification-letter-1',
attributes: {
name: 'Account Verification Letter.pdf',
file_size: 123456,
content_type: 'application/pdf'
}
},
{
type: 'transaction',
id: 'recent-transaction-1',
attributes: {
amount: {value: 5000, currency: 'USD'},
description: 'Monthly supplier payment',
transaction_date: '2025-01-15T00:00:00.000Z',
status: 'completed'
}
},
{
type: 'payment_means',
id: 'corporate-card-1',
attributes: {
type: 'card',
nickname: 'Corporate Visa Card',
scheme: 'visa',
status: 'active',
card_details: {
last_four: '1234',
expiry_month: 12,
expiry_year: 2026,
cardholder_name: 'ACME CORPORATION'
}
}
}
]
})
};
fetch('https://api.wellapp.ai/v1/payment-means', 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.wellapp.ai/v1/payment-means",
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([
'type' => 'payment_means',
'attributes' => [
'type' => 'account_details',
'scheme' => 'ACH',
'status' => 'active',
'account_details' => [
'account_number' => '1234567890',
'routing_number' => '021000021',
'account_type' => 'checking',
'currency' => 'USD'
],
'bank_details' => [
'bank_name' => 'JPMorgan Chase Bank, N.A.',
'bank_code' => 'CHASUS33',
'branch_name' => 'New York Main Branch',
'branch_code' => 'NY001'
],
'compliance' => [
'kyc_status' => 'verified',
'aml_status' => 'cleared'
],
'nickname' => 'US Operating Account',
'description' => 'Primary USD account for US operations',
'tags' => [
'usd',
'operating',
'us',
'primary'
]
],
'relationships' => [
'holder' => [
'data' => [
'type' => 'company',
'id' => 'holder-company-1'
]
],
'account_location' => [
'data' => [
'type' => 'location',
'id' => 'bank-location-1'
]
],
'holder_location' => [
'data' => [
'type' => 'location',
'id' => 'holder-location-1'
]
],
'bank' => [
'data' => [
'type' => 'company',
'id' => 'bank-company-1'
]
],
'intermediary_banks' => [
'data' => [
[
'type' => 'company',
'id' => 'intermediary-bank-1'
]
]
],
'ultimate_beneficiary' => [
'data' => [
'type' => 'people',
'id' => 'beneficiary-person-1'
]
],
'created_by' => [
'data' => [
'type' => 'people',
'id' => 'creator-person-1'
]
],
'documents' => [
'data' => [
[
'type' => 'document',
'id' => 'bank-statement-1'
],
[
'type' => 'document',
'id' => 'verification-letter-1'
]
]
],
'transactions' => [
'data' => [
[
'type' => 'transaction',
'id' => 'recent-transaction-1'
]
]
],
'linked_payment_means' => [
'data' => [
[
'type' => 'payment_means',
'id' => 'corporate-card-1'
]
]
]
],
'included' => [
[
'type' => 'company',
'id' => 'holder-company-1',
'attributes' => [
'name' => 'ACME Corporation',
'description' => 'Technology solutions provider',
'registration' => [
'registered_name' => 'ACME Corporation Inc.',
'trade_name' => 'ACME'
],
'tax_id' => [
'value' => '12-3456789',
'type' => 'EIN'
]
]
],
[
'type' => 'location',
'id' => 'bank-location-1',
'attributes' => [
'street' => '270 Park Avenue',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10017',
'country' => 'US',
'is_primary' => true
]
],
[
'type' => 'location',
'id' => 'holder-location-1',
'attributes' => [
'street' => '123 Business Avenue',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country' => 'US',
'is_primary' => true
]
],
[
'type' => 'company',
'id' => 'bank-company-1',
'attributes' => [
'name' => 'JPMorgan Chase Bank',
'description' => 'Major US financial institution',
'registration' => [
'registered_name' => 'JPMorgan Chase Bank, N.A.'
],
'tax_id' => [
'value' => '13-2624428',
'type' => 'EIN'
]
]
],
[
'type' => 'company',
'id' => 'intermediary-bank-1',
'attributes' => [
'name' => 'Wells Fargo Bank',
'description' => 'Intermediary bank for routing',
'registration' => [
'registered_name' => 'Wells Fargo Bank, N.A.'
]
]
],
[
'type' => 'people',
'id' => 'beneficiary-person-1',
'attributes' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'full_name' => 'Jane Doe',
'date_of_birth' => '1980-05-15'
]
],
[
'type' => 'people',
'id' => 'creator-person-1',
'attributes' => [
'first_name' => 'John',
'last_name' => 'Smith',
'full_name' => 'John Smith'
]
],
[
'type' => 'document',
'id' => 'bank-statement-1',
'attributes' => [
'name' => 'Bank Statement January 2025.pdf',
'file_size' => 245678,
'content_type' => 'application/pdf'
]
],
[
'type' => 'document',
'id' => 'verification-letter-1',
'attributes' => [
'name' => 'Account Verification Letter.pdf',
'file_size' => 123456,
'content_type' => 'application/pdf'
]
],
[
'type' => 'transaction',
'id' => 'recent-transaction-1',
'attributes' => [
'amount' => [
'value' => 5000,
'currency' => 'USD'
],
'description' => 'Monthly supplier payment',
'transaction_date' => '2025-01-15T00:00:00.000Z',
'status' => 'completed'
]
],
[
'type' => 'payment_means',
'id' => 'corporate-card-1',
'attributes' => [
'type' => 'card',
'nickname' => 'Corporate Visa Card',
'scheme' => 'visa',
'status' => 'active',
'card_details' => [
'last_four' => '1234',
'expiry_month' => 12,
'expiry_year' => 2026,
'cardholder_name' => 'ACME CORPORATION'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/payment-means"
payload := strings.NewReader("{\n \"type\": \"payment_means\",\n \"attributes\": {\n \"type\": \"account_details\",\n \"scheme\": \"ACH\",\n \"status\": \"active\",\n \"account_details\": {\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\",\n \"currency\": \"USD\"\n },\n \"bank_details\": {\n \"bank_name\": \"JPMorgan Chase Bank, N.A.\",\n \"bank_code\": \"CHASUS33\",\n \"branch_name\": \"New York Main Branch\",\n \"branch_code\": \"NY001\"\n },\n \"compliance\": {\n \"kyc_status\": \"verified\",\n \"aml_status\": \"cleared\"\n },\n \"nickname\": \"US Operating Account\",\n \"description\": \"Primary USD account for US operations\",\n \"tags\": [\n \"usd\",\n \"operating\",\n \"us\",\n \"primary\"\n ]\n },\n \"relationships\": {\n \"holder\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"holder-company-1\"\n }\n },\n \"account_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"bank-location-1\"\n }\n },\n \"holder_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"holder-location-1\"\n }\n },\n \"bank\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"bank-company-1\"\n }\n },\n \"intermediary_banks\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\"\n }\n ]\n },\n \"ultimate_beneficiary\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\"\n }\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"creator-person-1\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\"\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\"\n }\n ]\n },\n \"transactions\": {\n \"data\": [\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\"\n }\n ]\n },\n \"linked_payment_means\": {\n \"data\": [\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"company\",\n \"id\": \"holder-company-1\",\n \"attributes\": {\n \"name\": \"ACME Corporation\",\n \"description\": \"Technology solutions provider\",\n \"registration\": {\n \"registered_name\": \"ACME Corporation Inc.\",\n \"trade_name\": \"ACME\"\n },\n \"tax_id\": {\n \"value\": \"12-3456789\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"bank-location-1\",\n \"attributes\": {\n \"street\": \"270 Park Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10017\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"holder-location-1\",\n \"attributes\": {\n \"street\": \"123 Business Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"bank-company-1\",\n \"attributes\": {\n \"name\": \"JPMorgan Chase Bank\",\n \"description\": \"Major US financial institution\",\n \"registration\": {\n \"registered_name\": \"JPMorgan Chase Bank, N.A.\"\n },\n \"tax_id\": {\n \"value\": \"13-2624428\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\",\n \"attributes\": {\n \"name\": \"Wells Fargo Bank\",\n \"description\": \"Intermediary bank for routing\",\n \"registration\": {\n \"registered_name\": \"Wells Fargo Bank, N.A.\"\n }\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\",\n \"attributes\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"full_name\": \"Jane Doe\",\n \"date_of_birth\": \"1980-05-15\"\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"creator-person-1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\",\n \"attributes\": {\n \"name\": \"Bank Statement January 2025.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\",\n \"attributes\": {\n \"name\": \"Account Verification Letter.pdf\",\n \"file_size\": 123456,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\",\n \"attributes\": {\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"USD\"\n },\n \"description\": \"Monthly supplier payment\",\n \"transaction_date\": \"2025-01-15T00:00:00.000Z\",\n \"status\": \"completed\"\n }\n },\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\",\n \"attributes\": {\n \"type\": \"card\",\n \"nickname\": \"Corporate Visa Card\",\n \"scheme\": \"visa\",\n \"status\": \"active\",\n \"card_details\": {\n \"last_four\": \"1234\",\n \"expiry_month\": 12,\n \"expiry_year\": 2026,\n \"cardholder_name\": \"ACME CORPORATION\"\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/payment-means")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"payment_means\",\n \"attributes\": {\n \"type\": \"account_details\",\n \"scheme\": \"ACH\",\n \"status\": \"active\",\n \"account_details\": {\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\",\n \"currency\": \"USD\"\n },\n \"bank_details\": {\n \"bank_name\": \"JPMorgan Chase Bank, N.A.\",\n \"bank_code\": \"CHASUS33\",\n \"branch_name\": \"New York Main Branch\",\n \"branch_code\": \"NY001\"\n },\n \"compliance\": {\n \"kyc_status\": \"verified\",\n \"aml_status\": \"cleared\"\n },\n \"nickname\": \"US Operating Account\",\n \"description\": \"Primary USD account for US operations\",\n \"tags\": [\n \"usd\",\n \"operating\",\n \"us\",\n \"primary\"\n ]\n },\n \"relationships\": {\n \"holder\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"holder-company-1\"\n }\n },\n \"account_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"bank-location-1\"\n }\n },\n \"holder_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"holder-location-1\"\n }\n },\n \"bank\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"bank-company-1\"\n }\n },\n \"intermediary_banks\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\"\n }\n ]\n },\n \"ultimate_beneficiary\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\"\n }\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"creator-person-1\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\"\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\"\n }\n ]\n },\n \"transactions\": {\n \"data\": [\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\"\n }\n ]\n },\n \"linked_payment_means\": {\n \"data\": [\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"company\",\n \"id\": \"holder-company-1\",\n \"attributes\": {\n \"name\": \"ACME Corporation\",\n \"description\": \"Technology solutions provider\",\n \"registration\": {\n \"registered_name\": \"ACME Corporation Inc.\",\n \"trade_name\": \"ACME\"\n },\n \"tax_id\": {\n \"value\": \"12-3456789\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"bank-location-1\",\n \"attributes\": {\n \"street\": \"270 Park Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10017\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"holder-location-1\",\n \"attributes\": {\n \"street\": \"123 Business Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"bank-company-1\",\n \"attributes\": {\n \"name\": \"JPMorgan Chase Bank\",\n \"description\": \"Major US financial institution\",\n \"registration\": {\n \"registered_name\": \"JPMorgan Chase Bank, N.A.\"\n },\n \"tax_id\": {\n \"value\": \"13-2624428\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\",\n \"attributes\": {\n \"name\": \"Wells Fargo Bank\",\n \"description\": \"Intermediary bank for routing\",\n \"registration\": {\n \"registered_name\": \"Wells Fargo Bank, N.A.\"\n }\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\",\n \"attributes\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"full_name\": \"Jane Doe\",\n \"date_of_birth\": \"1980-05-15\"\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"creator-person-1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\",\n \"attributes\": {\n \"name\": \"Bank Statement January 2025.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\",\n \"attributes\": {\n \"name\": \"Account Verification Letter.pdf\",\n \"file_size\": 123456,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\",\n \"attributes\": {\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"USD\"\n },\n \"description\": \"Monthly supplier payment\",\n \"transaction_date\": \"2025-01-15T00:00:00.000Z\",\n \"status\": \"completed\"\n }\n },\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\",\n \"attributes\": {\n \"type\": \"card\",\n \"nickname\": \"Corporate Visa Card\",\n \"scheme\": \"visa\",\n \"status\": \"active\",\n \"card_details\": {\n \"last_four\": \"1234\",\n \"expiry_month\": 12,\n \"expiry_year\": 2026,\n \"cardholder_name\": \"ACME CORPORATION\"\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/payment-means")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"payment_means\",\n \"attributes\": {\n \"type\": \"account_details\",\n \"scheme\": \"ACH\",\n \"status\": \"active\",\n \"account_details\": {\n \"account_number\": \"1234567890\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\",\n \"currency\": \"USD\"\n },\n \"bank_details\": {\n \"bank_name\": \"JPMorgan Chase Bank, N.A.\",\n \"bank_code\": \"CHASUS33\",\n \"branch_name\": \"New York Main Branch\",\n \"branch_code\": \"NY001\"\n },\n \"compliance\": {\n \"kyc_status\": \"verified\",\n \"aml_status\": \"cleared\"\n },\n \"nickname\": \"US Operating Account\",\n \"description\": \"Primary USD account for US operations\",\n \"tags\": [\n \"usd\",\n \"operating\",\n \"us\",\n \"primary\"\n ]\n },\n \"relationships\": {\n \"holder\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"holder-company-1\"\n }\n },\n \"account_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"bank-location-1\"\n }\n },\n \"holder_location\": {\n \"data\": {\n \"type\": \"location\",\n \"id\": \"holder-location-1\"\n }\n },\n \"bank\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"bank-company-1\"\n }\n },\n \"intermediary_banks\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\"\n }\n ]\n },\n \"ultimate_beneficiary\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\"\n }\n },\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"creator-person-1\"\n }\n },\n \"documents\": {\n \"data\": [\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\"\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\"\n }\n ]\n },\n \"transactions\": {\n \"data\": [\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\"\n }\n ]\n },\n \"linked_payment_means\": {\n \"data\": [\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"company\",\n \"id\": \"holder-company-1\",\n \"attributes\": {\n \"name\": \"ACME Corporation\",\n \"description\": \"Technology solutions provider\",\n \"registration\": {\n \"registered_name\": \"ACME Corporation Inc.\",\n \"trade_name\": \"ACME\"\n },\n \"tax_id\": {\n \"value\": \"12-3456789\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"bank-location-1\",\n \"attributes\": {\n \"street\": \"270 Park Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10017\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"holder-location-1\",\n \"attributes\": {\n \"street\": \"123 Business Avenue\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country\": \"US\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"bank-company-1\",\n \"attributes\": {\n \"name\": \"JPMorgan Chase Bank\",\n \"description\": \"Major US financial institution\",\n \"registration\": {\n \"registered_name\": \"JPMorgan Chase Bank, N.A.\"\n },\n \"tax_id\": {\n \"value\": \"13-2624428\",\n \"type\": \"EIN\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"intermediary-bank-1\",\n \"attributes\": {\n \"name\": \"Wells Fargo Bank\",\n \"description\": \"Intermediary bank for routing\",\n \"registration\": {\n \"registered_name\": \"Wells Fargo Bank, N.A.\"\n }\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"beneficiary-person-1\",\n \"attributes\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"full_name\": \"Jane Doe\",\n \"date_of_birth\": \"1980-05-15\"\n }\n },\n {\n \"type\": \"people\",\n \"id\": \"creator-person-1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"bank-statement-1\",\n \"attributes\": {\n \"name\": \"Bank Statement January 2025.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"verification-letter-1\",\n \"attributes\": {\n \"name\": \"Account Verification Letter.pdf\",\n \"file_size\": 123456,\n \"content_type\": \"application/pdf\"\n }\n },\n {\n \"type\": \"transaction\",\n \"id\": \"recent-transaction-1\",\n \"attributes\": {\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"USD\"\n },\n \"description\": \"Monthly supplier payment\",\n \"transaction_date\": \"2025-01-15T00:00:00.000Z\",\n \"status\": \"completed\"\n }\n },\n {\n \"type\": \"payment_means\",\n \"id\": \"corporate-card-1\",\n \"attributes\": {\n \"type\": \"card\",\n \"nickname\": \"Corporate Visa Card\",\n \"scheme\": \"visa\",\n \"status\": \"active\",\n \"card_details\": {\n \"last_four\": \"1234\",\n \"expiry_month\": 12,\n \"expiry_year\": 2026,\n \"cardholder_name\": \"ACME CORPORATION\"\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "payment_means",
"id": "pm-550e8400-e29b-41d4-a716-446655440099",
"attributes": {
"type": "account_details",
"scheme": "ACH",
"status": "active",
"account_details": {
"account_number": "1234567890",
"routing_number": "021000021",
"account_type": "checking",
"currency": "USD"
},
"bank_details": {
"bank_name": "JPMorgan Chase Bank, N.A.",
"bank_code": "CHASUS33",
"branch_name": "New York Main Branch",
"branch_code": "NY001"
},
"compliance": {
"kyc_status": "verified",
"aml_status": "cleared",
"sanctions_check": "passed",
"last_compliance_check": "2025-01-15T10:00:00.000Z"
},
"metadata": {
"source": "api",
"external_id": null,
"last_used_at": null,
"usage_count": 0
},
"nickname": "US Operating Account",
"description": "Primary USD account for US operations",
"tags": [
"usd",
"operating",
"us",
"primary"
],
"is_primary": true,
"is_verified": true,
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
},
"relationships": {
"holder": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
},
"account_location": {
"data": {
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440101"
}
},
"holder_location": {
"data": {
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440102"
}
},
"bank": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440103"
}
},
"intermediary_banks": {
"data": [
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440104"
}
]
},
"ultimate_beneficiary": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440201"
}
},
"created_by": {
"data": {
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440202"
}
},
"documents": {
"data": [
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440301"
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440302"
}
]
},
"transactions": {
"data": [
{
"type": "transaction",
"id": "550e8400-e29b-41d4-a716-446655440401"
}
]
},
"linked_payment_means": {
"data": [
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440501"
}
]
}
},
"included": [
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"name": "ACME Corporation",
"description": "Technology solutions provider",
"registration": {
"registered_name": "ACME Corporation Inc.",
"trade_name": "ACME"
},
"tax_id": {
"value": "12-3456789",
"type": "EIN"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440101",
"attributes": {
"street": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US",
"is_primary": true,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440102",
"attributes": {
"street": "123 Business Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US",
"is_primary": true,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440103",
"attributes": {
"name": "JPMorgan Chase Bank",
"description": "Major US financial institution",
"registration": {
"registered_name": "JPMorgan Chase Bank, N.A."
},
"tax_id": {
"value": "13-2624428",
"type": "EIN"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440104",
"attributes": {
"name": "Wells Fargo Bank",
"description": "Intermediary bank for routing",
"registration": {
"registered_name": "Wells Fargo Bank, N.A."
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440201",
"attributes": {
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"date_of_birth": "1980-05-15",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "people",
"id": "550e8400-e29b-41d4-a716-446655440202",
"attributes": {
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440301",
"attributes": {
"name": "Bank Statement January 2025.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-01-15T09:00:00.000Z",
"updated_at": "2025-01-15T09:00:00.000Z"
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440302",
"attributes": {
"name": "Account Verification Letter.pdf",
"file_size": 123456,
"content_type": "application/pdf",
"created_at": "2025-01-15T09:30:00.000Z",
"updated_at": "2025-01-15T09:30:00.000Z"
}
},
{
"type": "transaction",
"id": "550e8400-e29b-41d4-a716-446655440401",
"attributes": {
"amount": {
"value": 5000,
"currency": "USD"
},
"description": "Monthly supplier payment",
"transaction_date": "2025-01-15T00:00:00.000Z",
"status": "completed",
"created_at": "2025-01-15T08:00:00.000Z",
"updated_at": "2025-01-15T08:30:00.000Z"
}
},
{
"type": "payment_means",
"id": "550e8400-e29b-41d4-a716-446655440501",
"attributes": {
"type": "card",
"scheme": "visa",
"status": "active",
"card_details": {
"last_four": "1234",
"expiry_month": 12,
"expiry_year": 2026,
"cardholder_name": "ACME CORPORATION",
"nickname": "Corporate Visa Card",
"is_primary": false,
"created_at": "2024-06-01T00:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
}
}
]
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"id": "unauthorized",
"status": "401",
"code": "UNAUTHORIZED",
"title": "Unauthorized",
"detail": "Valid authentication credentials are required"
}
]
}{
"errors": [
{
"id": "holder_not_found",
"status": "404",
"code": "HOLDER_NOT_FOUND",
"title": "Holder Not Found",
"detail": "The specified holder company or person does not exist",
"source": {
"pointer": "/data/relationships/holder/data/id"
}
}
]
}⌘I