#Stephen He-setupintent

1 messages ยท Page 1 of 1 (latest)

astral tartan
#

Do you have the id of a SetupIntent that you saw this behavior with?

#

Copying your other messages here

I just create setupIntent first, and then use following to confirm setupintent
var options = new SetupIntentConfirmOptions
{
PaymentMethod = paymentMethodId,
};

            var service = new SetupIntentService();
            var result = await service.ConfirmAsync(setupId, options, _myStripeOptions);

            return result;

It is successful

hollow dome
#

yes, seti_1Jf3PfEHlrcq0Td77DjfU9Um

#

@astral tartan

jaunty cradle
#

@hollow dome yep we see you here ๐Ÿ™‚

#

thanks!

hollow dome
#

thank you

astral tartan
#

What are you checking where the payment method is empty?

hollow dome
#

so after calling confirm setup intent by passing existing payment method id into it

#

I wanna see card object of payment method from the result of confirmed setup intent

#

I wanna fetch funding and country from card object

astral tartan
#

By default, only the ID of the PaymentMethod is returned, but if you expand the payment_method property, the full object comes back

#

Otherwise you will have to do a separate lookup to get the full object

hollow dome
#

just add options.AddExpand("PaymentMethod")?

astral tartan
#

I believe so yes

#

If that does not work, it may be expecting the lower case version payment_method

#

Try it out and let me know what you see

hollow dome
#

this is the code I used

#

var options = new SetupIntentConfirmOptions
{
PaymentMethod = paymentMethodId,
};

            var service = new SetupIntentService();
            var result = await service.ConfirmAsync(setupId, options, _myStripeOptions);
#

let me test now.

#

got error

#

{"This property cannot be expanded (PaymentMethod)."}

astral tartan
#

try payment_method

#

I see in the .NET version of our docs it still uses the other style of name for these properties

hollow dome
#

options.AddExpand("payment_method")?

astral tartan
#

Correct

hollow dome
#

It's perfect

#

could you show me where is the documentation for this?

astral tartan
#
hollow dome