title: terms of service stripe connect
body: <p>I've created a function to create a stripe custom company account for my users, and everything is working great, but when I try and update the terms of service data in node.js, it comes up with no errors, but when I go to the Stripe dashboard it says the account still requires a terms of service acceptance. What should I do?</p>
  <p>Here is the function that creates the account:</p>
  <pre class="lang-js prettyprint-override"><code>export const createStripeMerchant = async(connectId: any, line1: any, line2: any, city: any, country: any, postCode: any,
    day: any, month: any, year: any, uid: any, email: any, firstName: any, lastName: any, phoneNumber: any) =&gt; {
  
    const account = await stripe.accounts.createPerson(
      connectId, {
        address: {
          line1: line1,
          line2: line2,
          city: city,
          country: country,
          postal_code: postCode,
        },
        dob: {
          day: day,
          month: month,
          year: year,
        },
        first_name: firstName,
        last_name: lastName,
        email: email,
        relationship: {
          executive: true,
          director: true,
          representative: true,
          title: 'Director',
        },
        phone: phoneNumber,
        metadata: {
          firebaseUID: uid
        },
      });
  
    await updateMerchantId(uid, {
      personAccountId: account.id
    });
  
    return account;
  }
  </code></pre>
  <p>Here is the function that adds on the terms of service acceptance:</p>
  <pre><code>export const updateStripeConnect = async(connectId: any, uid: any, date: any, ip: any, userName: any) =&gt; {
  
    const account = await stripe.accounts.update(
      connectId, {
        tos_acceptance: {
          date: date,
          ip: ip,
          service_agreement: 'full',
          user_agent: userName,
        },
      }
    );
    return account;
  }
  </code></pre>
  <p>I'm calling it like this:</p>
  <pre><code>createStripePerson({
    connectId: connectId,
    line1: address1.val(),
    line2: address2.val(),
    city: cityTown.val(),
    country: 'GB',
    postCode: postCode.val(),
    day: $(&quot;#dateOB&quot;).val().substring(8, 10),
    month: $(&quot;#dateOB&quot;).val().substring(5, 7),
    year: $(&quot;#dateOB&quot;).val().substring(0, 4),
    uid: uid,
    email: email.val(),
    firstName: firstName.val(),
    lastName: lastName.val(),
    phoneNumber: phoneInput.getNumber(),
  }).then((result) =&gt; {
    /** @type {any} */
    const data = result.data;
    const textData = data.text;
    console.log(&quot;Result data: &quot; + data);
    console.log(&quot;Text data: &quot; + textData);
  
  
    updateStripeConnect({
      connectId: connectId,
      uid: uid,
      date: unixTimestamp,
      ip: ip,
      userName: firstName.val() + &quot; &quot; + lastName.val(),
    }).then((result) =&gt; {
      /** @type {any} */
      const data = result.data;
      const textData = data.text;
      console.log(&quot;Result data: &quot; + data);
      console.log(&quot;Text data: &quot; + textData);
    }).catch((error) =&gt; {
      console.log(&quot;Error message: &quot; + error.message);
      console.log(&quot;Error details: &quot; + error.details);
    });
  
  
  }).catch((error) =&gt; {
    console.log(&quot;Error message: &quot; + error.message);
    console.log(&quot;Error details: &quot; + error.details);
  });
  </code></pre>
  
  <p>So, as I said, it all goes through, but the terms of service does not get fulfilled / is still required in Stripe's dashboard:</p>
  <p><a href="https://i.stack.imgur.com/PNd1V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PNd1V.png" alt="Stripe Dashboard Image" /></a></p>