const response = await fetch('https://api.karmapay.xyz/v0/external-accounts', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
externalUserId: "user_123",
accountName: "My Checking Account",
currency: "usd",
accountOwnerName: "John Doe",
accountOwnerType: "individual",
firstName: "John",
lastName: "Doe",
account: {
accountNumber: "123456789",
routingNumber: "021000021",
checkingOrSavings: "checking"
},
address: {
streetLine1: "123 Main St",
city: "New York",
state: "NY",
postalCode: "10001",
country: "USA"
}
}),
});