#rahulc-paymentlink

1 messages · Page 1 of 1 (latest)

bitter vessel
#

hi there, i think you're missing some details?

plucky oriole
#

yes

#

I am getting this response

#

{"id":"evt_3KpoRZIuwC7dQEVy0OHHD40B","object":"event","api_version":"2020-03-02","created":1650264738,"data":{"object":{"id":"ch_3KpoRZIuwC7dQEVy0mqO2wPP","object":"charge","amount":2800,"amount_captured":2800,"amount_refunded":0,"application":null,"application_fee":null,"application_fee_amount":null,"balance_transaction":"txn_3KpoRZIuwC7dQEVy0xuH3LZ8","billing_details":{"address":{"city":null,"country":"IN","line1":null,"line2":null,"postal_code":null,"state":null},"email":"rahulc@synaapseco.com","name":"rahul chauhan","phone":null},"calculated_statement_descriptor":"MARITIME TRIBES","captured":true,"created":1650264737,"currency":"usd","customer":null,"description":null,"destination":null,"dispute":null,"disputed":false,"failure_balance_transaction":null,"failure_code":null,"failure_message":null,"fraud_details":{},"invoice":null,"livemode":false,"metadata":{},"on_behalf_of":null,"order":null,"outcome":{"network_status":"approved_by_network","reason":null,"risk_level":"normal","risk_score":40,"seller_message":"Payment complete.","type":"authorized"},"paid":true,"payment_intent":"pi_3KpoRZIuwC7dQEVy0SGmisNT","payment_method":"pm_1KpoRYIuwC7dQEVyP1F6XDWF","payment_method_details":{"card":{"brand":"visa","checks":{"address_line1_check":null,"address_postal_code_check":null,"cvc_check":"pass"},"country":"US","exp_month":6,"exp_year":2023,"fingerprint":"rKAg99czWmVpFwqM","funding":"credit","installments":null,"last4":"1111","mandate":null,"network":"visa","three_d_secure":null,"wallet":null},"type":"card"},"refunded":false,"refunds":{"object":"list","data":[],"has_more":false,"total_count":0,"url":"/v1/charges/ch_3KpoRZIuwC7dQEVy0mqO2wPP/refunds"},"review":null,"shipping":null,"source":null,"source_transfer":null,"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"succeeded",}},"livemode":false,"pending_webhooks":1,"request":{"id":"req_7TVuD42M71PNLI","idempotency_key":"325fcd7e-dccd-48b1-8554-4ca9273ae2e1"},"type":"charge.succeeded"}

bitter vessel
#

are you using webhooks to receive these events currently?

plucky oriole
#

yes

#

i am using webhooks

bitter vessel
#

alright, so what details do you want to get? and what's the issue you're facing trying to retrieve those details?

plucky oriole
#

Actually i need to retrieve Payment link using these response,
Bcz I have passed meta data while creating payment link

bitter vessel
#

what you would want to listen for is the checkout.session.completed event

plucky oriole
#

but i am not getting checkout session id

#

in response

bitter vessel
#

from what i understand, you want the payment link id? e.g. plink_123

plucky oriole
#

yes

bitter vessel
#

it's also listed in the checkout.session.completed event, have you taken a look at that example event that i provided?

plucky oriole
#

I need to retrieve payment link , Bcz I have some inform in the metadata

#

How can i access latest checkout session id

bitter vessel
#

i'm sorry but i'm really confused here - in order to fulfil an order, you would typically listen for the checkout.session.completed event. That particular event contains the payment link id, as well as the metadata which you've added when creating the payment link

#

is there a reason why the checkout.session.completed event wouldn't work for you?

plucky oriole
#

ok

#

i am using checkout session

#

how can i get latest session id

bitter vessel
#

what do you mean by latest session id? and what would you need the latest session id for?

plucky oriole
#

Actullay we have complete paymentusing payment link, then it is gererating a checkout session id ,

#

it there any way to get last checkout session it

#

so that can found payment link with that

bitter vessel