#amfpaulo_api

1 messages ¡ Page 1 of 1 (latest)

lime drumBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1303802126157480119

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

simple karma
#

Hello

#

You have the SetupIntent ID stored? Or you are trying to retrieve it using the Subscription ID?

balmy urchin
#

what I am doing is, Starting a setup intent, to set a default payment method to pay for subscription. I am using terminal M2 by the way.... I have SetUpIntentId, that I tried to expand to get card details

#

var setupIntent = new SetupIntentService().Get(setupIntentId, new SetupIntentGetOptions
{
Expand = new List<string> { "latest_attempt", "payment_method" }
});

#

cardDetails = setupIntent.PaymentMethod.Card?.Brand + " "
+ setupIntent.PaymentMethod.Card?.Last4 + " "
+ setupIntent.PaymentMethod.Card?.ExpMonth + "/" + setupIntent.PaymentMethod.Card?.ExpYear + " " +
setupIntent.PaymentMethod?.BillingDetails.Name;

        paymentMethodId = setupIntent.PaymentMethod?.Id!;
#

objects are null

#

Sumarizing what I want is: After seting up a intent, I need to save on our Database Client card information

simple karma
#

Hmm that does seem like a fine way to do this...

#

What is the SetupIntent ID that you are retrieving in your test above?

balmy urchin
#

this is the ID: seti_1QIExnDn6CAQGXZnp4lV48jv

#

setupIntent.PaymentMethod is null

simple karma
#

Ah doh

#

You said Terminal

#

You want PaymentMethod.CardPresent

balmy urchin
#

I was going to say that, thank you, I just open Card Present and details were there. thank you

simple karma
#

Glad to hear it!

balmy urchin
#

I appreciate your help

simple karma
#

Sure thing

balmy urchin
#

have a great day