#rao-burhan_webhooks

1 messages ¡ Page 1 of 1 (latest)

midnight solsticeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1351149311378853998

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

spice hearth
#

Which 'create session' webhook?

fallen moss
#

I have created the webhook in stripe to mark the payment as success ful so before the payment a session is created i am not getting the create session event , Only getting this

#

Before i implemented the direct transfer
{
payment_method_types: ['card'],
customer_email: user.email,
line_items: [
{
price_data: {
currency: customerCurrancy.code,
product_data: {
name: 'visa',
},
unit_amount_decimal: ${convertedAmount},
},
quantity: 1,
},
],
metadata: {
userId: context.UserId.toString(),
secondryOrderId,
visaConfigurationId,
processingPriorityId,
nationalityCountryId,
orderId,
amount,
tenantId,
residentialCountryId,
destinationCountryId,
},
payment_intent_data: {
metadata: {
userId: context.UserId.toString(),
visaConfigurationId,
processingPriorityId,
nationalityCountryId,
orderId,
amount,
tenantId,
},
application_fee_amount: platformFee,
},
client_reference_id: ${context.UserId.toString()},
mode: 'payment',
allow_promotion_codes: !!apiKey?.credentials?.stripe_promo_code,
success_url: successUrl,
cancel_url: cancelUrl,
},
{ stripeAccount: accountId },
);
added account id in the stripeAccount
It was working fine

spice hearth
#

There's isn't an event fired when you create a Checkout Session. Only when it completes, checkout.session.completed

#

That webhook is probably a platform webhook, so you only get the event for the application fee being transferred to you

fallen moss
#

Checkout session was completed but I see no event in the logs

#

Can you please provide the docs to implement this
In any case I suspect this is because you've not created a Connect webhook to receive events from your connected accounts

#

I have connected account webhook disabled

spice hearth
#

Try and enable it? What's the cs_xxx ID anyway?

fallen moss
#

I have two implementations one is with the connected accounts and one is without i want both of them to work seamlessly , both are working great in the case of destination charge , but for the direct charge you are saying i need to enable the connected account webhook

spice hearth
#

Yes

#

Because the objects are created on the conncted account not your platform account, so to receieve the events you need to listen for events on the conncted accounts via a Connect webhook. The URL I shared explains it

fallen moss
#

Okay let me retry

#

So should i listen to the connected account webhook now ?

#

What should we listen here ?

spice hearth
#

Yes if you're creating direct charges like the example you shared

#

Well checkout.session.completed I guess

fallen moss
#

is this it right ?

#

creating the webhook with checkout.session.completed?

spice hearth
fallen moss
#

I want checkout session completed and payment.success