#hassan-shahzad_code

1 messages ¡ Page 1 of 1 (latest)

placid adderBOT
#

👋 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/1441375921717252097

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

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.

civic mason
#

hi there!

#

can you clarify what you are trying to do, and what the issue is?

twilit harbor
civic mason
#

do you have a failed request ID (req_xxx) that you can share? or share the specific code you are using that is returning the error?

twilit harbor
#

no, but i have this "paymentIntentId":"pi_3SVrmVJinHQ71v5x1AbF2gf5"

civic mason
#

I don't see any failed request on that PaymentIntent

#

and I don't need to see your full code. I just need the few lines that returned an error.

twilit harbor
#

// 2️⃣ Fetch the Charge separately and expand generated_card
var chargeService = new ChargeService();
var charge = await chargeService.GetAsync(
paymentIntent.LatestChargeId,
new ChargeGetOptions
{
Expand = new List<string> { "payment_method_details.card_present.generated_card" }
},
requestOptions
);

    var generatedCard = charge?.PaymentMethodDetails?.CardPresent?.GeneratedCard;
#

these lines returned an error

civic mason
#

I do see a generated_card for that PaymentIntent. looking into this...

twilit harbor
#

where can i see it?

placid adderBOT
civic mason
twilit harbor
#

problem is that this paymentintent is not shown in log in stripe dashboard

#

so, i am not able to find the exact position of generated_card

ember field
#

What's the ID of the payment intent you're searching for in the Dashboard?

#

Can you add more logging to see what the Charge ID is, for example?

twilit harbor
#

pi_3SVs04JinHQ71v5x1996JLgN

ember field
twilit harbor
#

yes, i see successful payment. but the issue is that after confirming payment when i would like to Save payment details after payment for sunscription then the error occurs {area: StripeTerminal, isOk: false, errorDescription: This property cannot be expanded (payment_method_details.card_present.generated_card)., okResult: null}

#

it is showing these things here https://dashboard.stripe.com/acct_1EW3fkJinHQ71v5x/test/payments/pi_3SVs04JinHQ71v5x1996JLgN in recent activity Payment Successful
Nov 21, 2025, 11:56 AM
This payment has been successfully configured pm_1SVs0iJinHQ71v5xlARelxL3 for future off-session payments.
Nov 21, 2025, 11:56 AM
Payment Started
Nov 21, 2025, 11:55 AM

ember field
#

OK, great. Do you see the Payment Method ID at the bottom of the screen? Can you click it and open Workbench?

#

There you should see that the Payment Intent has a list of Charges, which include the payment_method_details.card_present.generated_card

twilit harbor
#

yes, i see it

ember field
#

Alright, so we know that the correct details are there. How are you trying to access this in your code, and what information do you need exactly?

#

Earlier you showed some code that was loading Charges, but you should be able to expand this information directly when fetching the Payment Intent

twilit harbor
#

i was trying to get generated card: // 2️⃣ Fetch the Charge separately and expand generated_card
var chargeService = new ChargeService();
var charge = await chargeService.GetAsync(
paymentIntent.LatestChargeId,
new ChargeGetOptions
{
Expand = new List<string> { "payment_method_details.card_present.generated_card" }
},
requestOptions
);

    var generatedCard = charge?.PaymentMethodDetails?.CardPresent?.GeneratedCard;
ember field
#

Are you able to access the Charges list directly on the Payment Intent that you retrieve before this step?

twilit harbor
#

should i access the Charges list directly on the Payment Intent?

ember field
#

Can you access paymentIntent.Charges?

twilit harbor
#

ok, i will try it. thank you for your help and time

ember field
#

No worries!