#inexorable
1 messages ยท Page 1 of 1 (latest)
Hello! Can you give me an example Checkout Session ID so I can take a look at what you're seeing?
Do you mean the paymentIntentId it resolves to? ........
pi_3N0j2rK2FI13bfKB1ovte8vI
I appreciate your time
That works! Let me take a look...
I can see the actual request received by Stripe is reporting as having no metadata.... hmmmm...
There's no metadata on this Payment Intent or the associated Checkout Session. What metadata do you expect to be here?
So this is either a .net bug or user error
I added a few metatdata params that appear to not have been sent... 2 secs I'll chuck up a code snippet and hopefully the daftness will be clear
var options = new SessionCreateOptions {
LineItems = sessionLineItemOptions,
Metadata = metadata,
Mode = "payment",
SuccessUrl = AppBaseUrl(HttpContext) + "/vans/success",
CancelUrl = AppBaseUrl(HttpContext) + "/vans/cancel",
};
The lineItems is obviously working... so it's just if I messed up the metata data ... one sec ....
Yeah, your request to create the Checkout Session did not include metadata: https://dashboard.stripe.com/test/logs/req_vwzrqCyux2dg4B
var metadata = new Dictionary<string, string> {
{ "name", T.FullName },
{ "company", T.Company ?? "Not specified" },
{ "position", T.Position ?? "Not specified" },
{ "telephne", T.Telephone },
{ "email", T.Email },
{ "van", T.Van },
{ "date", T.HireDate?.ToLongDateString() ?? "-" },
{ "drivers", T.Drivers.ToString() },
{ "hours", T.Hours.ToString() },
{ "amount", amount.ToString() },
{ "product", productName },
{ "description", productDescription },
{ "message", T.Message ?? "-" }
};
Maybe log the value of metadata to make sure it contains what you expect?
So I have initialised it, and attached it.... but only the line items seem to have gone through
Ok.. can I confirm... do you expect this to work? As in, does the CheckoutSession support Metadata?
Yeah, Checkout Sessions support metadata: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata
hmmm.... further down we have the payment_intent_data.metadata
I'm wondering if that one works but the CheckoutSession one doesn't - at least not from the .net kit
The .NET library should support metadata on the Checkout Session itself just fine. What version of the library are you using?
2 secs - just trying out another tx with the metadata in the payment_intent thingy... I'll give the pi code in a mo
pi_3N0j2rK2FI13bfKB1ovte8vI
Missing from there too... looking more and more lik me... checking myself and metadata again
.net 41.10.0 (latest non-beta I believe)
Can you try this just to see if it works as expected or not?
Metadata = new Dictionary<string, string>
{
{ "foo", "bar" },
{ "baz", "boo" },
},
Rubeus... I think I've found the problem. Brace yourself.
There's an outside chance I'm looking in the wrong Stripe account dashboard. This will be an epic user error if so..... 2 secs... (it has been a looooong night and day)
pi_3N1YouBAgICEUrDv0n8QNt3Q
Yeah, that one has metadata!
Happy to help. ๐