#MDTOHM

1 messages · Page 1 of 1 (latest)

tacit sparrowBOT
runic lagoon
#

hello! which Element component are you using specifically? Are you using the Payment Element?

quiet badge
#

Checking

#

So we change the method_options - 'us_bank_account' => ['verification_method' => 'microdeposits'],

runic lagoon
#

try it and see if it works

#

are you using the Payment Element?

quiet badge
#

yes we are

#

const stripe = Stripe('{{config('services.stripe.public')}}');
const options = {
clientSecret: '{{$intent->client_secret}}',
// Fully customizable with appearance API.
appearance: {/.../},
};
// Set up Stripe.js and Elements to use in checkout form, passing the client secret obtained in step 3
const elements = stripe.elements(options);
// Create and mount the Payment Element
const paymentElement = elements.create('payment');
paymentElement.mount('#payment-element');
const form = document.getElementById('payment-form');
form.addEventListener('submit', async (event) => {
event.preventDefault();
const {error} = await stripe.confirmSetup({
//Elements instance that was used to create the Payment Element
elements,
confirmParams: {
return_url: '{{route('stripe.callback')}}'
}

runic lagoon
#

ah alright, let me know if that doesn't work for you

quiet badge
#

I dont think this works

#

as its a different endpoint

barren swallow
#

Hi @quiet badge I'm taking over

quiet badge
#

Ok. We're using this call

const stripe = Stripe('{{config('services.stripe.public')}}');
const options = {
    clientSecret: '{{$intent->client_secret}}',
    // Fully customizable with appearance API.
    appearance: {/*...*/},
};

// Set up Stripe.js and Elements to use in checkout form, passing the client secret obtained in step 3
const elements = stripe.elements(options);

// Create and mount the Payment Element
const paymentElement = elements.create('payment');
paymentElement.mount('#payment-element');
#

But we'd like to be able to filter by ONLY microdeposits

'payment_method_options' => [
  'us_bank_account' => ['verification_method' => 'microdeposits'],
],
#

but this is for "paymentIntents"

#

Is there a way to do thisd with ELEMENTS ?

barren swallow
#

No. The verification_method option is for PaymentIntent, not PaymentElements So you need to set verification_method when creating a PaymentIntent, so that PaymentElement will render accordingly.

quiet badge
#

Sorry ... so we'd be doing a paymentIntent (but in this instance I'm not trying to complete a PaymentElement...just trying to capture a PaymentIntent

barren swallow
#

I don't understand your last sentence. How do you intent to capture a payment without PaymentElement?

quiet badge
#

Sorry we're not ... the Capturing of a Payment is done in a different workflow

#

This workflow is just to capture the "Payment Intent"

#

Unless I'm using that wording incorrectly...we're just capturing their Credit Card and/or Bank Account

#

TO be used at a future time

barren swallow
#

I see, I think you mean you want to save the payment_method for future payments, so that your customer doesn't need to enter the payment details again, am I right?

quiet badge
#

Yes, but to be clear...they woiuldn't be PAYING at this point either

#

They would ONLY be storing the Payment_Method for future usage

barren swallow
#

Sure, there's a way to collect a payment_method without charging the customers.

quiet badge
#

Ok. I'll run some test and send a note if I have any more questions