#martinfo_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/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.
- martinfo_connect-sandboxes, 15 hours ago, 72 messages
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
when I do a payment to a Connect account I don't receive any webhook call.
You should set a connect webhook endpoint
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
What type of connected account are you using ?
standard
Try login your stripe cli using your Connected Standard Account
And then run the same command (stripe listen...)
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
Ok I see, checking...
What is your stripe cli version, I just tested and I got the connect event
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
And what are the logs of your container ?
I need to use the webhook key of my master account right ?
Yes
`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)
`
And how are you creating the Webhook event ?
Do you have an event Id that you were exepcting to get the event ?
evt_1Rq9ONPvNb7urWXtTinwqq7R
What is the Account Id you are using with your docker image ?
Should I use the sercret and public key of the master account ?
I use the Connect account
You need to use the platform account
Earlier you said, that you can't do that ๐
?
You should use the platform account, so that you get the events from the connected account
Np!
I'll get back to after my test