#johnatran

1 messages ยท Page 1 of 1 (latest)

hazy otterBOT
deft folio
#

hey there, can you share an example of how you're using this?

#

If available for your account, you'd configure bank payments in your dashboard to be enabled for Checkout

hoary orchid
#
function sendToStripe() {
        console.log(storefrontQuantity)
         var stripe = Stripe('secretkey')
    stripe.redirectToCheckout({
      lineItems: [{price: 'price_id', quantity: storefrontQuantity}],
      mode: 'payment',
      successUrl: 'https://www.evbib.com/home-new',
      cancelUrl: 'https://www.evbib.com/order-storefront',
    })
    .then(function (result) {
      if (result.error) {
             console.log("Error sending form data to Stripe")
      }
    });
  }
deft folio
#

Ok so this is client-side checkout creation, which has been deprecated for some time

#

But if you enable the bank account payments in your dashboard, are you still not seeing it there?

hoary orchid
#

Thanks @deft folio I enabled "ACH Direct Debit" in the settings. When I preview my checkout, I see the bank information. However, when I test it on the live site, I do not see bank input possible.

deft folio
#

Right, so, only card payments are support when using this client-only pattern, not the other local payment methods

hoary orchid
#

This is what my live payment looks like. I will screenshot preview in the next post.

#

I see.

deft folio
hoary orchid
#

Can payment links have a dynamic quantity?

#

I'm configuring one now and it looks like I have to preset it.

#

I don't have a server than can securely create sessions before redirecting as I am using a website builder in webflow.

deft folio
#

Customers can adjust quantity yes! if you enable it when setting up the link

#

You can create them in the dashboard via UI, too

hoary orchid
#

Looks like I can setup redirects and use similar parameters to what I did in the past.

deft folio
hoary orchid
#

@deft folio is it okay to programmatically create a payment link each time a customer pays? Or would I get throttled.

#

I want the checkout to pre-populate with a quantity that the user inputed on a form prior to checkout

deft folio
#

You can, its just a little inefficient.

#

If there a wide range of quantities/products for what you sell?

hoary orchid
#

1-5 each time a form is completed.

deft folio
#

You could, eg, make a link for each default amount 1,2,3,4,5 and just swap between those

hoary orchid
#

I guess I can make 5 "if statements"

deft folio
#

instead of fully dynamic

hoary orchid
#

yeah

deft folio
#

I'd suggest that then -- you'd need a server to create the links anyways, in which case you could do so with Checkout sessions ๐Ÿ™‚

hoary orchid
#

What's the default after_completion url of the forms created on my dashboard?

#

Can I specify that on the UI somehow?

#

I didn't quite see that parameter when created the payment link via UI

deft folio
hoary orchid
#

Oh got it. Thanks @deft folio !

deft folio
#

NP!