#chiayi

1 messages · Page 1 of 1 (latest)

neat gorgeBOT
zealous jewel
#

Hi! Let me help you with this.

#

Are you using stripe listen command?

fleet cypress
#
    sig_header = request.headers.get("stripe-signature")
    try:
        event = stripe.WebhookSignature.verify_header(
            await request.body(), sig_header, endpoint_secret
        )
    except stripe.error.SignatureVerificationError as e:
        return {"message": f"Webhook signature verification failed. {e}"}
#

nope because i am not trying to build a webhook

zealous jewel
fleet cypress
#

i am trying to verify whether the request my backend server is receiving is coming from my stripe app

#

is there a way to do this?

zealous jewel
#

What's other request could come from Stripe if not webhook notification?

fleet cypress
#

let me reframe what i am trying to do - my stripe app is trying to get a response from one of my backend server api

the api returns a boolean value on whether the user has previously registered an account on our company website

zealous jewel
#

Oh, it is about Stripe Apps. Sorry, I completely misunderstood.

#

Where did you get the Live mode key?

fleet cypress
#

i got it here

zealous jewel
#

In Test mode?

fleet cypress
#

yes, forgot to mention its the same signing secret whether it is in test mode or live mode

fleet cypress
#

i am just thinking whether if i can only test verify_header on test/live mode unless there is a way to get signing secret for testing on local development server

zealous jewel
#

How are you receiving the requests from Stripe on your local?

#

Something must be forwarding them to your local app.