#ali-raza_code

1 messages ¡ Page 1 of 1 (latest)

turbid ravineBOT
#

👋 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/1242815771974045706

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

vapid plover
#

What's the bug exactly?

left cobalt
#

This is the same problem I am facing.
https://stackoverflow.com/questions/67742130/allow-stripe-webhook-to-access-aws-ec2-instance

vapid plover
#

Can you share an evt_xxx ID that you're having issues with?

left cobalt
#

Actual Problem

  • On local STRIPE CLI I can listen webhook events
  • On my EC2 instance where my backend is deployed I can't see any logs, as stripe is not actually hitting the api.
#

API Endoint is https://api.taskbook.zenkoders.com/stripe/webhook

vapid plover
#

I need an evt_xxx ID that is not being received at your endpoint

left cobalt
#

how do I get that? I can't see any thing in the stripe webhook

vapid plover
left cobalt
#

Can I record a video and then send you, explaining the bug

vapid plover
#

Sure, but really I need an example evt_xxx that you're expecting to receive, but aren't

left cobalt
#

Let me send you a video, then you can tell me

vapid plover
#

Tell you what?

vapid plover
vapid plover
left cobalt
#

sure

#

we_1PJDAxLiuV5nRQaKmso8V5Oq

vapid plover
#

OK, so this isn't a Connect webhook

#

So it won't process/send events from any conncted accounts, but only those that occur on acct_1Orm2TLiuV5nRQaK

left cobalt
#

When creating a webhook endpoint, what should I select?
Events on connected account or events on your account ?

vapid plover
#

Your intention is for this webhook to receive events from connected accounts, yes?

left cobalt
#

Let me explain the scenario of my app.

  • Poster : Who creates the post

  • Tasker: Who works on the post

  • Poster creates a task for $100, tasker applies for the task.

  • Once the task is completed, poster pays to the tasker.

  • Poster pays $100 + 20% ( Taskbook platform fee ) to the platform owner and then platform uses stripe connect to distribute the money to the tasker.

For Stripe webhook

I am using 2 events:

  1. accounts.updated ( When a tasker is onboarded using stripe connect express type )
    2 payment_intent_succedded ( When poster release the payment ).
#

Now you tell me how should I move forward, I have worked with basic stripe subscribtion and one time payment.
Stripe connect is new to me

#

please help me on this

vapid plover
#

I already did – configure the webhook to listen for events from your conncted accounts

left cobalt
#

Let me delete the previous webhook and create a new one, with selecting Events on connected account

#

Let me get back to you once done

#

I saw on thing. In my code I am parsing headers from stripe-signature, while in the webhook it says use stripe-account

  @Post('/webhook')
  async handleWebhook(
    @Request() request: RawBodyRequest<Request>,
    @Headers('stripe-signature') signature: string,
    @Res() response: Response,
  ) {
    try {
      await this.stripeService.handleWebhookEvent(request.rawBody, signature);

      response.status(200).send('Webhook handled successfully');
    } catch (err) {
      response.status(400).send(`Webhook Error: ${err.message}`);
    }
  }
vapid plover
left cobalt