#Hritik_9

1 messages · Page 1 of 1 (latest)

full turretBOT
slender field
#

Hi, how can I help?

somber forge
#

👋

#

Every Event will be created and sent to your Webhook if it is listening for those Event types

#

You can either update the Event types so you don't listen for the ones you don't care about, or you can ignore the ones you receive that you don't care about and just return a 200 response and not ingest the data.

fleet grove
#

But after success of checkout->session why its calling payment_intent.succeeded webhook

somber forge
#

Becuase the PaymentIntent is succeeding

#

So that webhook also fires.

#

Both things are happening

fleet grove
#

OHH

#

how i can stop being execute payment intent

somber forge
#

I explained above how you handle that

fleet grove
#

I have two different webhooks events
one for payment intent which I am using to make payment from our mobile app
other for the checkout session which I am using to make payment from our website

Scenario 1: when I am making payment from my mobile app the webhook for the payment intent is called and not the one for the checkout session

Scenario 2: when I am making payment form the website both webhooks - payment intent and checkout session are called.

This should not be the case, as the webhook for the checkout session only should be called and not the webhook for the payment intent, why is it?

somber forge
fleet grove
#

how i can pass values of payment.intent.metadata in checkoutsession

somber forge
#

Are you the developer for your integration here?

fleet grove
#

YES

somber forge
#

Okay so then you pass a metadata key/value pair to the payment_intent_data hash

#

I can't write your code for you

fleet grove
#

$checkoutSession = $stripe->checkout->sessions->create([
'success_url' => 'https://staging.prosperty.in/my-wallet', // Define your success route
'cancel_url' => 'https://staging.prosperty.in/my-wallet', // Define your cancel route
'payment_method_types' => ['card'], // Use 'card' for credit/debit card payments
'mode' => 'payment', // Set mode to 'payment'
'customer' => $isAlreadyExist->stripe_customer_id, // The customer's Stripe ID
'payment_intent_data'=>['userId'=>$userData->id,'userEmail'=>$userData->email],
'line_items' => [
[
'price_data' => [
'currency' => 'inr', // Replace with your desired currency
'unit_amount' => $depositAmount, // Amount in the smallest currency unit (e.g., cents)
'product_data' => [
'name' => 'Deposit', // Name for the deposit
],
],
'quantity' => 1, // Quantity is 1 for a single payment
],
],
]);

yes i tried to add payment_intent_data but it throws error

somber forge
#
  'metadata' => [
    'key' => 'value' ]
  ]```
fleet grove
#

Thanks a lot bro!!...It perfectly worked for both.. WEB and Mobile app