#nit_sin

1 messages · Page 1 of 1 (latest)

neat copperBOT
dry nimbus
#

hello! what logs are you referring to?

queen verge
#

logs in my server, like here Got payload: " + payload

#

does it mean that this route is not getting hit

#

Its working if I use stripe trigger checkout.session.completed

#

but it doesn't work if i do actual payment

#

using test card details

dry nimbus
#

what are the commands you run for Stripe CLI?

#

and can you share the event id for the checkout.session.completed event that you were able to receive, and the payment object id which you tried using test card details?

queen verge
#

stripe listen --forward-to localhost:3001/webhook

dry nimbus
#

alright, can you share the event id and payment object id too?

queen verge
#

{
id: 'evt_3MjcScSCdcKGorjT1kWnLUtS',
object: 'event',
api_version: '2020-08-27',
created: 1678341380,
data: {
object: {
id: 'pi_3MjcScSCdcKGorjT1Vb2U4K9',
object: 'payment_intent',
amount: 3000,
amount_capturable: 0,
amount_details: [Object],
amount_received: 0,
application: null,
application_fee_amount: null,
automatic_payment_methods: null,
canceled_at: null,
cancellation_reason: null,
capture_method: 'automatic',
charges: [Object],
client_secret: 'pi_3MjcScSCdcKGorjT1Vb2U4K9_secret_jtIIdDnft9n82pQqKeIZySVug',
confirmation_method: 'automatic',
created: 1678341378,
currency: 'usd',
customer: 'cus_NUbgyAgCwBOtwB',
description: null,
invoice: null,
last_payment_error: null,
latest_charge: null,
livemode: false,
metadata: {},
next_action: [Object],
on_behalf_of: null,
payment_method: 'pm_1MjcSdSCdcKGorjTMo3YQOHf',
payment_method_options: [Object],
payment_method_types: [Array],
processing: null,
receipt_email: null,
review: null,
setup_future_usage: null,
shipping: [Object],
source: null,
statement_descriptor: null,
statement_descriptor_suffix: null,
status: 'requires_action',
transfer_data: null,
transfer_group: null
}
},
livemode: false,
pending_webhooks: 2,
request: {
id: 'req_pyR176UZWoAcBb',
idempotency_key: '24e877dc-c166-4b90-a549-6096402fbbe5'
},
type: 'payment_intent.requires_action'
}

dry nimbus
#

how about the checkout.session.completed event id?

queen verge
#

Is this not the event id evt_3MjcScSCdcKGorjT1kWnLUtS?

dry nimbus
#

that's a payment_intent.requires_action event

queen verge
#

Okay so where do i get this event id

dry nimbus
#

if you triggered the event via the stripe cli, it should show the event id in your terminal

queen verge
#

evt_3MjcScSCdcKGorjT1kWnLUtS this is the event id right?

#

na i think this is the same

#

2023-03-09 11:26:17 --> product.created [evt_1MjcSbSCdcKGorjTjLsdmCuS] 2023-03-09 11:29:09 <-- [200] POST http://localhost:3001/webhook [evt_1MjcSbSCdcKGorjTjLsdmCuS] 2023-03-09 11:29:09 --> price.created [evt_1MjcScSCdcKGorjTbEzq93Fc] 2023-03-09 11:29:09 --> payment_intent.created [evt_3MjcScSCdcKGorjT1zeSsZTU] 2023-03-09 11:29:09 --> customer.created [evt_1MjcSfSCdcKGorjT156jhaPg] 2023-03-09 11:29:09 --> payment_intent.requires_action [evt_3MjcScSCdcKGorjT1kWnLUtS] 2023-03-09 11:29:09 <-- [200] POST http://localhost:3001/webhook [evt_1MjcScSCdcKGorjTbEzq93Fc] 2023-03-09 11:29:09 <-- [200] POST http://localhost:3001/webhook [evt_1MjcSfSCdcKGorjT156jhaPg] 2023-03-09 11:29:09 <-- [200] POST http://localhost:3001/webhook [evt_3MjcScSCdcKGorjT1zeSsZTU] 2023-03-09 11:29:09 <-- [200] POST http://localhost:3001/webhook [evt_3MjcScSCdcKGorjT1kWnLUtS]

#

this is the logs

#

in the terminal

dry nimbus
#

so previously, you mentioned that Its working if I use stripe trigger checkout.session.completed but it doesn't work if i do actual payment using test card details

#

what's the actual payment using test card details that isn't working then?

queen verge
#

I am using payment link to create a payment ... it opens a checkout kind of page where i fill all the details

#

I also put the endpoint in my dashboard using ngrok

#

cause it needs public accessible url to add endpoint

#

Yeah that one is not working

#

This might help you understand

dry nimbus
#

you've setup your webhook incorrectly

#

your webhook type should be for Account

#

you should listen for events on your Account :

#

you can't update the already created webhook