title: How to setup payment method on creating checkout session?
body: <p>I'm using <code>stripe</code> as an payment integration in my app. I'm creating <code>session checkout</code> for the customer with using <code>mode=payment</code> because i want to get payment from the order, but how to save payment method of the customer with this checkout session?</p>
  <p>Here is my code:</p>
  <pre><code>await stripe.checkout.sessions.create({
        line_items: [
          {
            price_data: {
              unit_amount: 433,
              currency: &quot;usd&quot;,
              product_data: {
                name: &quot;&quot;
              }
            },
            quantity: 1,
          }
        ],
        cancel_url: &quot;&quot;,
        success_url: &quot;&quot;,
        customer: customerID,
        mode: STRIPE_SESSION_MODE.PAYMENT,
        payment_method_types: [&quot;card&quot;],
      });
  </code></pre>
  <p>thanks to this in response i've got an <code>url</code> to the stripe payment form. Is there an option to save information about payment method of the customer for the future using? I know that I can use <code>mode=setup</code> but i want also to get payment from the <code>price_data</code>.</p>
  <p>Thanks for any help!</p>