#rao-burhan_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ 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.
- rao-burhan_webhooks, 2 hours ago, 12 messages
- rao-burhan_error, 2 days ago, 20 messages
Which 'create session' webhook?
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
following this documentation
https://docs.stripe.com/connect/direct-charges
There's isn't an event fired when you create a Checkout Session. Only when it completes, checkout.session.completed
In any case I suspect this is because you've not created a Connect webhook to receive events from your connected accounts (you're doing direct charges): https://docs.stripe.com/connect/webhooks
That webhook is probably a platform webhook, so you only get the event for the application fee being transferred to you
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
Try and enable it? What's the cs_xxx ID anyway?
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
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
Okay let me retry
So should i listen to the connected account webhook now ?
What should we listen here ?
Yes if you're creating direct charges like the example you shared
Well checkout.session.completed I guess
You haven't told me what events you want, but that's a starting point yes and when the Checkout Session (like the example one) is paid you'll receive the event to that endpoint
I want checkout session completed and payment.success