#Bando-metadata

1 messages · Page 1 of 1 (latest)

inner nexus
#

Hi! The metadata you are passing is an array, but it should be an object.

#

So you need to do something like this:

metadata: {
  'purpose': 'raffle', 
  'type': 'raffle'
}
ebon kiln
#

what's the best way to use the payment_method passed to customer for subscription?

inner nexus
ebon kiln
inner nexus
#

What exactly are you trying to do? What is your end goal here?

ebon kiln
#

The issue is it may find 100 winners to create a subscription for at once

#

and i dont want it to cause any issues similarly to how it did when this was in PHP, however I understand PHP isnt a good language for tasks such as this (mass looping) so it may not even occur

#

The issues faced in PHP version was that it would hang etc due to long waits/timeouts

inner nexus
#

When creating the customer you can directly set invoice_settings.default_payment_method.

ebon kiln
#

Weird as the card was saved as off_session

#

It's the test card, wasnt prompt to do 3dsecure on the stripe checkout for it

#

Is it normal for the test card to do something like this? It's using stripe checkout ($stripe->checkout->sessions->create)

#
$stripe->checkout->sessions->create(['success_url' => $successurl,'cancel_url' => $cancelurl,'payment_method_types' => ['card'],'mode' => 'setup','metadata' => ['purpose'=> 'setup', 'type'=> $setuppurpose]]);```

This is the code for the session creation
unkempt rain
#

Can you share the PaymentIntent ID?

ebon kiln
unkempt rain
#

Ok thanks. Looking

unkempt rain
#

Ah ok so I believe this is happening because you created the payment method with a GB address, so we ask for authentication. Let me confirm that with a colleague though

#

You are just using the 4242 test card, correct?

ebon kiln
#

All of it is test data yes

#

yes

ebon kiln
#

Ah ok I see that on the testing page

#

I just tested it with card 4000058260000005 (UK debit) and it has the same issue

#

pi_3KwRWJKhA5rJWycn1x84Rti9 (paymentintent)
req_fnOjpPWOYWdFUH

unkempt rain
#

So looks like it's because you have the “Request 3DS when supported” radar rule enabled

#

That will always require 3ds when it's supported

ebon kiln
unkempt rain
#

No that's a separate setting for that actually

#

The setupintent is a bit redundant in your flow though. Setupintents only give 3ds exemptions for off session payments, but creating a subscription is inherently an on-session action

ebon kiln
#

Is there no way to do it?

unkempt rain
#

What is your goal exactly?

dusky mantle
#

Are you still here?