#Cannot create Dwolla Customer
25 messages · Page 1 of 1 (latest)
Could you log the context you are passing into the create method so we can see what the state is resolving to?
Sorry I didn't get you... Do you want me to show the code of the createLinkToken in user.actions.ts ?
Could you just share the entire file?
So this should be the relevant code:
const dwollaCustomerUrl = await createDwollaCustomer({
...userData,
type: 'personal'
});
Could you add console.log(JSON.stringify(userData)) on the line right above this?
Done
{"firstName":"John","lastName":"Doe","address1":"Very cool address","city":"Kolkata","state":"US","postalCode":"700001","dateOfBirth":"1900-01-01","pan":"WEOOD8294N","email":"[email protected]"}
This is the userData passed
Ah, maybe this is the issue.
US is not a valid US state. It does not appear you can use India states from what I can tell
Okay let me try
Okay so the state error is gone but now I am getting an error on date of birth
Creating a Dwolla Customer Failed: Error: {"code":"ValidationError","message":"Validation error(s) present. See embedded errors list for more details.","_embedded":{"errors":[{"code":"NotAllowed","message":"DateOfBirth value not allowed.","path":"/dateOfBirth","_links":{}},{"code":"InvalidFormat","message":"PostalCode invalid.","path":"/postalCode","_links":{}},{"code":"Required","message":"Ssn required.","path":"/ssn","_links":{}}]}}
1900-01-01 this is how I am entering it
I solved the DOB error ... it's just not accepting 1900-01-01 as a valid date
Yeah it has to be max 125 years old
tried with 2002 it worked
Okay thanks, I'll follow this and fix this.. Let me get back to you
Fixed the ssn issue but now it says
{"firstName":"John","lastName":"Doe","address1":"Very cool address","city":"Los Angeles","state":"CA","postalCode":"50314","dateOfBirth":"2002-01-01","ssn":"1234","email":"[email protected]"}
Error AppwriteException [Error]: Invalid document structure: Missing required attribute "userid"