#Milos Milosevic

1 messages · Page 1 of 1 (latest)

stark palmBOT
#

Hello Milos Milosevic, we'll be with you shortly! 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.
Milos Milosevic, 52 minutes ago, 23 messages

ivory tundra
#

I don't really understand the question. What are you trying to do?

lost gulch
#

I want simple thing: to store unique user_id/transaction_id somewhere while creating checkout and fetch it in webhook

#

I tried with metadata field in payment_intent subobject while creating checkout, but it doesn't work this way. So I need other solution or place where I made mistake.

ivory tundra
#

So you're listening for payment_intent.successful and it's not showing the metadata you set when you created the Checkout Session above in your code?

lost gulch
#

Yes. But it is not showing it both in session and payment_intent.successful event. I think the way I did it has some error I don't see

ivory tundra
#

Why would you expect it to be in the Checkout Session object if you set it on the Payment Intent?

lost gulch
#

Ok, my fault. But in webhook I don't have it:

#

{
"id": "evt_3O4v1dDZ6LCnB5y51edHgNLK",
"object": "event",
"api_version": "2022-11-15",
"created": 1698193968,
"data": {
"object": {
"id": "pi_3O4v1dDZ6LCnB5y51JIUwtxp",
"object": "payment_intent",
"amount": 28800,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 28800,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3O4v1dDZ6LCnB5y51JIUwtxp_secret_MocVck1tG12CQ87mW1P49qVre",
"confirmation_method": "automatic",
"created": 1698193965,
"currency": "usd",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "py_3O4v1dDZ6LCnB5y51SKH64Ev",
"livemode": true,
"metadata": {
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1O4v1dDZ6LCnB5y58urephZk",
"payment_method_configuration_details": null,
"payment_method_options": {
"link": {
"persistent_token": null
}
},
"payment_method_types": [
"link"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": true,
"pending_webhooks": 1,
"request": {
"id": "req_HXoDqt5apF9K70",
"idempotency_key": "1cf3eea6-dee2-4f4e-81f4-3435bc4ef0a6"
},
"type": "payment_intent.succeeded"
}

#

the last one I tried...

ivory tundra
#

Do you have a Request ID for the request you made that created the Checkout Session?

Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

lost gulch
#

"id":"cs_test_a1CqFNpszDbC1vQZRarcGxlvgem3oKtcorKWCrLN5xR8DxehBiKJzW7w7y"

ivory tundra
#

That Checkout Session has this PI (which is different from the one you listed above): pi_3O5xevDZ6LCnB5y51xkm4XX3

if you search that PI in the Dashboard, you'll see it does indeed have the metadata you set

lost gulch
#

Content of event payment_intent.succedded where metadata is empty.

{"id":"pi_3O4v1dDZ6LCnB5y51JIUwtxp","object":"payment_intent","amount":28800,"amount_capturable":0,"amount_details":{"tip":{}},"amount_received":28800,"application":null,"application_fee_amount":null,"automatic_payment_methods":null,"canceled_at":null,"cancellation_reason":null,"capture_method":"automatic","client_secret":"pi_3O4v1dDZ6LCnB5y51JIUwtxp_secret_MocVck1tG12CQ87mW1P49qVre","confirmation_method":"automatic","created":1698193965,"currency":"usd","customer":null,"description":null,"invoice":null,"last_payment_error":null,"latest_charge":"py_3O4v1dDZ6LCnB5y51SKH64Ev","livemode":true,"metadata":{},"next_action":null,"on_behalf_of":null,"payment_method":"pm_1O4v1dDZ6LCnB5y58urephZk","payment_method_configuration_details":null,"payment_method_options":{"link":{"persistent_token":null}},"payment_method_types":["link"],"processing":null,"receipt_email":null,"review":null,"setup_future_usage":null,"shipping":null,"source":null,"statement_descriptor":null}

ivory tundra
#

Again, that's the wrong Payment Intent

#

This is the right one --> pi_3O5xevDZ6LCnB5y51xkm4XX3