const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'John',
lastName: 'Smith',
birthDate: '1990-01-01',
nationalId: '123456789',
countryOfIssue: 'US',
email: 'jsmith@example.com',
address: {
line1: '123 Main St',
line2: 'Unit 4',
city: 'New York',
region: 'NY',
postalCode: '10001',
countryCode: 'US'
},
occupation: '49-3023',
annualSalary: '<40k',
accountPurpose: 'everyday spend',
expectedMonthlyVolume: 'under $1k'
})
};
fetch('https://api.machines.cash/partner/v1/kyc/applications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));