#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/1441353083979563050
๐ 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, 16 hours ago, 34 messages
- hassan-shahzad_code, 17 hours ago, 19 messages
๐ Happy to help
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
I think you are requesting the wrong parameter:
https://docs.stripe.com/terminal/features/saving-payment-details/save-after-payment?terminal-sdk-platform=server-driven#access-generated-card
req_sgJ878ugSruiCB
Thanks for sharing, checking...
Here you are creating a PaymentIntent with 0 amount
Why? Are you trying to just collect the PaymentMethod without charging the customer ?
no actually the amount is not 0. i created aoymentIntent on th bakcend and then use it on forntend for doing payment
No that's what your backend did sent. It sent 0$ as amount you need to fix that
I'm referring to this request Id
ok, thank you
no wait, the request never reach there, it is not showing in log
the id was of yesterday not today
Can you try again now and share back the generated request ?
i try but still nothing in log but the paymentIntentId:"pi_3SVqghJinHQ71v5x1Aaw8S6p"
Can you share the code you are using for expanding
For that PaymentIntent I'm seeing a generated_card under the charge's payment_method_details pm_1SVqhNJinHQ71v5xvOLP7w7y
Ah I think the issue here is that you are trying to expand 4 levels
Can you try make the request on the Charge object and not the PaymentIntent?
here is my code what should i change here
Can you share just where are you doing the expand for faster response ?
Ok no worries,
var paymentIntent = await piService.GetAsync(StripeCompleteSubscription.PaymentIntentId, new PaymentIntentGetOptions
{
Expand = new List<string>
{
"latest_charge.payment_method_details.card_present.generated_card"
}
}, requestOptions: requestOptions);
You need to update this
by Doing it for the charge and not the PaymentIntent
and change your expand to just payment_method_details.card_present.generated_card
like this var charge = await chargeService.GetAsync(
paymentIntent.LatestChargeId,
new ChargeGetOptions
{
Expand = new List<string>
{
"payment_method_details.card_present"
}
},
requestOptions
);
var generatedCard = charge?.PaymentMethodDetails?.CardPresent?.GeneratedCard;
if (generatedCard == null)
{
return Ok(new ApiResultMessage
{
Area = cControllerArea,
IsOk = false,
ErrorDescription = "Impossibile recuperare GeneratedCard dal Charge."
});
}
Yes something like that (you can add .generated_card at the end too)