#daniyal_11692

1 messages · Page 1 of 1 (latest)

spice copperBOT
#

Hello daniyal_11692, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
daniyal_11692, 2 days ago, 13 messages
daniyal_11692, 3 days ago, 2 messages
daniyal_11692, 4 days ago, 93 messages
daniyal_11692, 5 days ago, 5 messages

edgy igloo
#

It looks like a mismatched parameter

vernal jackal
#

req_b8DyMHjq9oNJps

edgy igloo
#

Okie. I see you specified on_behalf_of on creating SetupIntent. Why did you do that and is there a Doc you are following?

vernal jackal
#

i'm creting the setupintent for the connected account

edgy igloo
#

How do you initialize the Payment Elements?

vernal jackal
#

is this on the frontend>

edgy igloo
#

Yes

vernal jackal
#

this is the doc i followed with setup intent

#

i'm migrating from card elemnt to payment element

edgy igloo
#

Yes, but because you used on_behalf_of in backend, you also need to use on_behalf_of on frontend for the consistency, or the API will complain as the error message

vernal jackal
#

can you share some code example? finding a bit difficult fto understand from the docs

edgy igloo
#

Yeah, so around this part

const stripe =
    Stripe('pk_test_xxx');
const options = {
  mode: 'setup',
  currency: 'usd',
  onBehalfOf: 'acct_xxx' // your connected account id here
};
const elements = stripe.elements(options);
#

Can you try this code?

vernal jackal
#

now this is the error: 'You passed an empty string for 'deferred_intent[on_behalf_of]'. We assume empty values are an attempt to unset a parameter; however 'deferred_intent[on_behalf_of]' cannot be unset. You should remove 'deferred_intent[on_behalf_of]' from your request or supply a non-empty value.'

edgy igloo
#

Did you specify the correct connected account id?

spice copperBOT
vernal jackal
#

can i limit my paymentelement to only show card as mapyment method?

vernal jackal
#

where would we add this param?

#

var paymentElement = elements.create('payment', {
payment_methods: ['card'],
});

#

is this correct?

weak cape
#

Ah if you are using the deffered method, then yes you can specify it when creating the Element

vernal jackal
#

what if i want to support any other . can i just add them speareted by comma?