How can I use the js client side api to satisfy the stripe custom connect requirement of "individual.verification.additional_document"?
The js client is handling the file upload and account token creation. The token ID is passed to the server where the server-side stripe api is used to update the account. This works perfectly to verify the custom connect requirement: "individual.verification.document", but not "individual.verification.additional_document"
This is in stripe test mode and the file being uploaded is this: https://stripe.com/img/docs/connect/success.png
Result: token creation fails with error
const stripeData = {
individual: {
verification: {
additional_document: {front: frontResult.id},
},
},
const {token, error} = await stripe.createToken("account", stripeData);
// ...
sendToBackend(token)
};
Error
IntegrationError: Invalid value for token creation parameter: individual.verification.document should be a string or individual.verification.document should be an object. You specified individual.verification.document as undefined.
Result: token creation succeeeds, backend api call succeeds, but account requirement "individual.verification.additional_document" is not marked as verified by stripe
const stripeData = {
individual: {
verification: {
document: {front: frontResult.id},
},
},
const {token, error} = await stripe.createToken("account", stripeData);
// ...
sendToBackend(token)
};
const account = await client.accounts.update(accountId, {account_token: tokenId});