How to register image verification in Stripe Connect | Identity verification for child accounts | Node.js



We started to create a skill-sharing service in 2020, but it has been completely abandoned.



But we have recently started developing it again.


It seems that my passion for the private trading market has not yet been quenched.


Well, that's not really the point...


A lot of code stopped working, and the Stripe area stopped working.


What I want to do is to use a C2C service to transfer sales to users to their accounts.


We need to verify the identity of the user.


We need the address, real name, driver's license and other images.


So, in this article, we will show you how to verify the image of the driver's license etc.


Creating an image




const file = await stripe. files. create({
  purpose: 'dispute_evidence',
  file: {
    data: fp,
    name: 'file.jpg',
    type: 'application/octet-stream',


First, we need to send the image file to the server, so we create the image as above.


We send the image file to the api, and then use the returned id to hit another api to request identity authentication.


When you hit the api as above, the id will be returned in the response, so use this.


  "id": "file_19yVPO2eZvKYlo2CIrGjfyCO",
  "object": "file",

We will use the id, so please save it in a variable somewhere.


Register identity verification





This is the main topic of this article, so here is the actual code I wrote.


async function UpdateAccounts(
) {
  try {
    const account = await stripe.accounts.update(
        individual: {
          verification:{document:{front: HEAD_ID_STRIPE_IMG, back: BACK_ID_STRIPE_IMG } 
  } catch (err) { 


Call the above function.


Pass the id of the image file you have just created and the account id of the Stripe Connect user as arguments.


The Stripe Connect user account will not be discussed in this article.


So, since this is an individual transaction, we'll pass the id of the image as a string, as described in individual.


By the way, you can also put your address and name inside this object.


You can find out more about what goes into these parameters in the official documentation.


If you hit api in this state, there are only optional parameters in the api definition, so if the object is correct as is, the api should pass.


Checking with Stripe

Now, let's check it in the Stripe dashboard.


If the dentity document and Identity document back are Provided, as shown in the image below.


I think the correct image id is being sent to the Stripe api.


Then you can wait for a while to see if your personal information is correctly authenticated or not.





LinkedIn にシェア



  • この記事を書いた人
  • 最新記事

藤沢瞭介(Ryosuke Hujisawa)



Copyright© , 2021 All Rights Reserved Powered by AFFINGER5.