#hassan-shahzad_code
1 messages ¡ Page 1 of 1 (latest)
đ 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.
- hassan-shahzad_code, 2 minutes ago, 31 messages
- hassan-shahzad_code, 17 hours ago, 34 messages
- hassan-shahzad_code, 19 hours ago, 19 messages
hi, I am trying to do this https://docs.stripe.com/terminal/features/saving-payment-details/save-after-payment?terminal-sdk-platform=server-driven#access-generated-card for stripe subscription
i updated my code based on suggestion given here https://discord.com/channels/841573134531821608/1441353083979563050
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?
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.
// 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
I do see a generated_card for that PaymentIntent. looking into this...
where can i see it?
in the API response here for example: https://dashboard.stripe.com/acct_1EW3fkJinHQ71v5x/test/logs/req_NpAggXnJem035N
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
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?
pi_3SVs04JinHQ71v5x1996JLgN
What happens when you visit its URL on the Dashboard? https://dashboard.stripe.com/acct_1EW3fkJinHQ71v5x/test/payments/pi_3SVs04JinHQ71v5x1996JLgN
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
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
yes, i see it
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
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;
Are you able to access the Charges list directly on the Payment Intent that you retrieve before this step?
should i access the Charges list directly on the Payment Intent?
this is the full code:
Can you access paymentIntent.Charges?
ok, i will try it. thank you for your help and time
No worries!