title: Stripe API - stipe.setupIntents doesn't exist
body: <p>I am trying to delete <strong>setup intent</strong> via</p>
  
  <pre><code>stripe.setupIntents.delete
  </code></pre>
  
  <p>but that method doesn't exist. Any idea what am I doing wrong (I am looking at the official documents, <strong>stripe.setupIntents</strong> is what I need here). </p>
  
  <p>I have the following code:</p>
  
  <pre><code>&lt;script src="https://js.stripe.com/v3/"&gt;&lt;/script&gt;
  
      &lt;script&gt;
  
          const stripe = Stripe('{{ env('STRIPE_KEY') }}');
  
          const elements    = stripe.elements();
          const cardElement = elements.create('card', {
              hidePostalCode: true,
          });
  
          cardElement.mount('#card-element');
  
          const cardHolderName = document.getElementById('card-holder-name');
          const cardButton     = document.getElementById('card-button');
          const clientSecret   = cardButton.dataset.secret;
  
          cardButton.addEventListener('click', async (e) =&gt; {
  
              e.preventDefault()
  
              if (cardHolderName.value.length &lt; 3) {
                  $(cardHolderName).addClass('is-invalid')
                      .parent()
                      .append('&lt;span class="text-danger"&gt;Please Insert Card Holder Name.&lt;/span&gt;');
                  return;
              } else {
                  $(cardHolderName).removeClass('is-invalid');
                  $(cardHolderName).next('.text-danger').remove();
              }
  
              let id  = $(cardButton).data('id')
              let url = $(cardButton).data('url')
  
              const { setupIntent, error } = await stripe.confirmCardSetup(
                  clientSecret, {
                      payment_method: {
                          card: cardElement,
                          billing_details: {
                              name: cardHolderName.value
                          }
                      }
                  }
              )
  
              if (error) {
  
                  let errorElement = document.getElementById('card-errors');
                  errorElement.textContent = error.message;
  
              } else {
  
                  let billingForm = $('#billing-form')
  
                  $.ajax({
                      url: url,
                      method: 'POST',
                      cache: false,
                      data: {
                          cardholder: billingForm.find('#cardholder').val(),
                          locum_organization: billingForm.find('#locum_organization').val(),
                          billing_addresses: billingForm.find('#billing_addresses').val(),
                          intent: setupIntent,
                          id: id
                      },
                      success: function(response) {
  
                      },
                      fail: function(xhr, textStatus, errorThrown){
                          console.log(errorThrown);
                      },
                      error(response){
  
                          stripe.setupIntents.cancel(
                              setupIntent.id,
                              function(err, setupIntent) {
                                  // asynchronously called
                              })
                      }
                  });
  
              }
          });
      &lt;/script&gt;
  </code></pre>