#mukta-k_api
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/1413272795651248188
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ Looking into this for you ๐
Do you have a request ID you could share that demonstrates what you are seeing?
Also are you sure you're passing in all the required parameters listed here?
https://docs.corp.stripe.com/api/payment_intents/create?api-version=2025-07-30.preview&rds=1#create_payment_intent-amount_details-line_items
var guid = Guid.NewGuid();
var options = new PaymentIntentCreateOptions
{
Amount = (long?)(request.Amount * 100),
Currency = "usd",
ReceiptEmail = request.Email,
PaymentMethodTypes = new List<string> {
"card",
"us_bank_account"
},
PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions
{
UsBankAccount = new PaymentIntentPaymentMethodOptionsUsBankAccountOptions
{
VerificationMethod = "instant",
},
},
Description = description[..^3],
Expand = new List<string> { "amount_details.line_items" }, };
options.AddExtraParam("payment_details[order_reference]", guid.ToString() );
options.AddExtraParam("amount_details[line_items][0][product_code]", request.AgencyId);
options.AddExtraParam("amount_details[line_items][0][product_name]", "Media Advertising");
options.AddExtraParam("amount_details[line_items][0][quantity]", 1);
options.AddExtraParam("amount_details[line_items][0][tax][total_tax_amount]", 0);
options.AddExtraParam("amount_details[line_items][0][unit_cost]", (long?)(request.Amount * 100));
options.AddExtraParam("amount_details[line_items][0][unit_of_measure]", "CPM");
var intent = await new PaymentIntentService().CreateAsync(options, cancellationToken: cancellationToken);
Do you have an example request_id or a payment_intent id I can look at?
pi_3S3fWsLxnAupl00q0GzzNKLR
we did verify with our Stripe counter part and he doesn't see lineItems for this intentID
I'm seeing this in the response to the creation request
line_items: {
object: "list",
data: [
{
id: "uli_SzeqpRdpG5wcfB",
object: "payment_intent_amount_details_line_item",
discount_amount: null,
payment_method_options: null,
product_code: "705924",
product_name: "Media Advertising",
quantity: 1,
tax: {
total_tax_amount: 0,
},
unit_cost: 100,
unit_of_measure: "CPM",
},
],
has_more: false,
url: "/v1/payment_intents/pi_3S3fWsLxnAupl00q0GzzNKLR/amount_details_line_items",
},
tip: {},
},```
where do you see this on Stripe dashboard
why don't I see it in paymentIntent response
var intent = await new PaymentIntentService().GetAsync(paymentIntentId, cancellationToken: cancellationToken);
in this I get it null
{
"id": "pi_3S3fWsLxnAupl00q0GzzNKLR",
"object": "payment_intent",
"amount": 100,
"amount_capturable": 0,
"amount_details": {
"discount_amount": 0,
"line_items": null,
"shipping": null,
"tax": null,
"tip": {
"amount": 0
}
},
"amount_received": 100,
I suspect those fields are being unset at some point post creation. Looking into when this is happening
but in L3 doc it is passed during creation https://docs.stripe.com/payments/payment-line-items#sample-request-(level-2-data)
I missed that you were confirming automatically.
yes we use paymentElement to confirm
Looking into it a little deeper
thanks
๐ Taking over this thread, catching up now
In your GET request, you didn't expand amount_details.line_items. This is not included by default. Could you try expanding amount_details.line_items?
I did
I didn't see that in:
var intent = await new PaymentIntentService().GetAsync(paymentIntentId, cancellationToken: cancellationToken);
Where did you expand it?
Expand = new List<string> { "amount_details.line_items" }, like this you can see in my above request
this is get for paymentintent after creation and confirmation
var guid = Guid.NewGuid();
var options = new PaymentIntentCreateOptions
{
Amount = (long?)(request.Amount * 100),
Currency = "usd",
ReceiptEmail = request.Email,
PaymentMethodTypes = new List<string> {
"card",
"us_bank_account"
},
PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions
{
UsBankAccount = new PaymentIntentPaymentMethodOptionsUsBankAccountOptions
{
VerificationMethod = "instant",
},
},
Description = description[..^3],
Expand = new List<string> { "amount_details.line_items" }, };
options.AddExtraParam("payment_details[order_reference]", guid.ToString() );
options.AddExtraParam("amount_details[line_items][0][product_code]", request.AgencyId);
options.AddExtraParam("amount_details[line_items][0][product_name]", "Media Advertising");
options.AddExtraParam("amount_details[line_items][0][quantity]", 1);
options.AddExtraParam("amount_details[line_items][0][tax][total_tax_amount]", 0);
options.AddExtraParam("amount_details[line_items][0][unit_cost]", (long?)(request.Amount * 100));
options.AddExtraParam("amount_details[line_items][0][unit_of_measure]", "CPM");
var intent = await new PaymentIntentService().CreateAsync(options, cancellationToken: cancellationToken);
this was my code I posted earlier in same thread
Expand is per request level. In your GetAsync, you should expand the same
Expansion is only done in your CreateAsync, but not on GetAsync
I am not clear
can you modify my code lines and show me here
In support doc url I saw to add expand line in CreateAsync()
Expansion is only expand on the object on that specific request sent to Stripe. Not on all the requests / objects created with Stripe. Since the expansion is only done at CreateAsync, amount_details.line_items was only available at the creation request: https://dashboard.stripe.com/logs/req_mhSMhajMLCPzfX
amount_details.line_items will not be available in GetAsync by default if you don't set the expansion on the Get request itself. Example will be:
var options = new PaymentIntentGetOptions();
options.AddExpand("amount_details.line_items");
var service = new PaymentIntentService();
var intent = service.Get('pi_123', options);
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 I see it now cool thanks but not sure why StripeDashboard doesn't show it
in paymentIntent object
This is expected since amount_details.line_items is not included in the Payment Intent object by default, unless your request explicitly expand it
I did while creating
What can I do to add those on stripe dashboard paymentIntent object ?
where should I expand only GetAsync()
where should I expand only GetAsync()
It should be the same:
service.GetAsync('pi_123', options);
You can check the spec of GetAsync with a given service: https://github.com/stripe/stripe-dotnet/blob/master/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs#L257-L260
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for stripe.com. - stripe/stripe-dotnet
What can I do to add those on stripe dashboard paymentIntent object ?
This is not possible
Dashboard will only include the default PaymentIntent object