#martinfo_webhooks

1 messages ยท Page 1 of 1 (latest)

devout cometBOT
#

๐Ÿ‘‹ 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/1399679285689712742

๐Ÿ“ 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.

nova radish
#

I use python to create a stripe session :
session = stripe.checkout.Session.create(
mode="payment",
payment_method_types=["card", "paypal"],
line_items=line_items,
metadata={},
stripe_account=settings.STRIPE_ACCOUNTS_IDS[
str(shipping_address.country_id)
],
payment_intent_data={
"transfer_group": order_group.number,
"statement_descriptor_suffix": f"O{order_group.number}",
"shipping": {
"name": shipping_address.name,
"address": {
"line1": shipping_address.line1,
"line2": f"{shipping_address.line2} {shipping_address.line3}",
"city": shipping_address.city,
"country": shipping_address.country_id,
"postal_code": shipping_address.postcode,
"state": shipping_address.state,
},
"phone": shipping_address.phone_number,
},
},
client_reference_id=order_group.id,
submit_type="pay",
customer_email=user_email,
success_url=request.build_absolute_uri(
reverse(
"checkout:thank-you",
kwargs={
"order_group_id": order_group.id,
},
)
),
cancel_url=request.build_absolute_uri(
reverse(
"payment_stripe:cancel", kwargs={"order_group_id": order_group.id}
)
),
discounts=discounts,
)

#

I'm not sure about :
stripe_account=settings.STRIPE_ACCOUNTS_IDS[
str(shipping_address.country_id)
],

#

this take the ID of the Connect account

#

And I use the secret and public key of the connect account

#

I use the stripe-cli to get webhook calls to my local server like this :
listen --forward-connect-to localhost:8000/stripe/webhook/

#

but I don't receive anything

#

I see the payment in the Connect account on stripe website

#

I see also the event checkout.session.complete on the website

wary orbit
#

when I do a payment to a Connect account I don't receive any webhook call.
You should set a connect webhook endpoint

nova radish
#

I can't do that because I want to test locally

#

and I don't want to use an external tool like ngrok to let the access to my local server over internet

wary orbit
#

What type of connected account are you using ?

nova radish
#

standard

wary orbit
#

Try login your stripe cli using your Connected Standard Account

#

And then run the same command (stripe listen...)

nova radish
#

That's not what I want sorry.
I explain the goal:
I want to listen all the Connect accounts

#

because I have several Connect accounts

wary orbit
#

Ok I see, checking...

#

What is your stripe cli version, I just tested and I got the connect event

nova radish
#

v1.28.0

#

You are using Stripe API Version [2020-08-27]

#

stripe/stripe-cli:v1.28.0

#

I use the docker img

#

here is my docker-compose :
services: stripe: image: stripe/stripe-cli:v1.28.0 command: listen --forward-connect-to web:8000/stripe/webhook/ --forward-to web:8000/stripe/webhook/ env_file: - ../../dommarket/secrets.env networks: - web

wary orbit
#

And what are the logs of your container ?

nova radish
#

I need to use the webhook key of my master account right ?

wary orbit
#

Yes

nova radish
#

`Checking for new versions...

Getting ready...

Ready! You are using Stripe API Version [2020-08-27]. Your webhook signing secret is whsec_xxxxx (^C to quit)
`

wary orbit
#

And how are you creating the Webhook event ?

#

Do you have an event Id that you were exepcting to get the event ?

nova radish
#

evt_1Rq9ONPvNb7urWXtTinwqq7R

wary orbit
nova radish
#

Should I use the sercret and public key of the master account ?

nova radish
wary orbit
#

You need to use the platform account

wary orbit
nova radish
#

?

wary orbit
nova radish
#

ok I'll try

#

ty

wary orbit
#

Np!

nova radish
#

I'll get back to after my test