title: How to add custom user id in subscriptions paypal api
body: <p>I need integrate paypal subscriptions to my project.
  I use new paypal subscriptions api <a href="https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions" rel="noreferrer">https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions</a> and need to know how i can identify payer and my own db user.</p>
  
  <p>Here is scenario in my mind:</p>
  
  <ol>
  <li>I create my own db user with signup form.</li>
  <li>I set my own user id to paypal api call</li>
  <li>After user confirm subscription paypal return me subscriptions id, then i    call paypal api to get details of returned subscription and see my own db    user id</li>
  </ol>
  
  <p>But looks like paypal cant provide it.</p>
  
  <p>here is my smart checkout button code
         </p>
  
  <pre><code>    paypal.Buttons({
          style: {
              layout: 'horizontal',
              size: 'small',
              color:  'blue',
              label:  'pay',
              height: 55,
              tagline: 'false'
          },
          createSubscription: function(data, actions) {
              return actions.subscription.create({
                  'plan_id': 'P-5GS67390M7258253CLUHXAHQ',
                  'metadata' : {
                      'user_id' : 'myuserid'
                  }
              });
  
          },
          onApprove: function(data, actions) {
              console.log(data);
              alert('You have successfully created subscription ' + data.subscriptionID);
  
          }
  
      }).render('#paypal-button-container');
  &lt;/script&gt;
  </code></pre>
  
  <p>I found only one way how i can do it</p>
  
  <ol>
  <li>User insert all data to signup form and then click on paypal button</li>
  <li><p>After success paypal payment on </p>
  
  <pre><code>    onApprove: function(data, actions) {
          $('#myform').append('&lt;input name="subscriptions_id" value="data.subscriptionID"')
          $('#myform').submit()
          alert('You have successfully created subscription ' + data.subscriptionID);
  
      }
  </code></pre></li>
  </ol>
  
  <p>What is the best way to add subscriptions id for mysql db user?</p>