#martinfo_webhooks

1 messages ยท Page 1 of 1 (latest)

half condorBOT
#

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

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

granite berry
#

I receive nothing

fluid birch
#

Hi

#

Can you share the event Id ?

#

What is the account Id that you are using for your stripe cli ?

granite berry
#

evt_1RqBRYPvrXjcTVpY6BIgZxFt

#

account_id : acct_1RmDXgPvrXjcTVpY

fluid birch
#

right ?

granite berry
#

I'll check

#

(Btw I had previous thread, but it was closed, do you know why ?)

fluid birch
#

Yeah due to inactivity (it was with me)

granite berry
#

I told you I get back to you ^^

fluid birch
#

It will be closed due to inactivity in all cases

granite berry
#

oh ok

fluid birch
#

no worries, you can always open a new thread

granite berry
#

{
"object": {
"id": "cs_test_b1qN8VusLkfTBbbrvcXh7qOZbZRmLA610IlLwQVFggPs0IYqlmvqIgjEe0",

fluid birch
#

and the first message in this thread, have reference to all your old threads

granite berry
#

this is the right id

fluid birch
#

listen --forward-connect-to web:8000/stripe/webhook/ --forward-to web:8000/stripe/webhook/
Why are you specifying the same url here ?

granite berry
#

I have one endpoint that handle all the events

fluid birch
#

Between, you are not making a Connect request req_0MzZRfYL6rYwbF

granite berry
#

what do you mean ?

fluid birch
#

Why are you specifying the Stripe Connect header in this request req_0MzZRfYL6rYwbF ?

#

You are setting the same platform account as the connect account id

granite berry
#

this my code :
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, )

#

stripe_account is the account of the Connect

#

and I use the stripe key of the platform account

fluid birch
#
        stripe_account=settings.STRIPE_ACCOUNTS_IDS[
            str(shipping_address.country_id)
        ],

Here you are passing the account Id acct_1RmDXgPvrXjcTVpY according to the request Id req_0MzZRfYL6rYwbF. That Account Id is your platform account id and not your connected account Id .

#

Can you first fix this ?

granite berry
#

ok

#

I'll try

fluid birch
#

Then we'll move to the webhook cli listener issue

granite berry
#

when I create the session

fluid birch
#

Can you share the Checkout Session Id ?

fluid birch
granite berry
fluid birch
#

So the API is returning 200

granite berry
#

yep

fluid birch
#

what is the Checkout Session id ?

#

or the request Id

granite berry
#

I need to retry and add a log

#

I retry

fluid birch
#

๐Ÿ‘Œ

granite berry
#

cs_test_b1JqIW9wXJVr7BGbIlsQZ0ZH8oOogP6TSe04PxyPb1Atk2sEXienhre6le

fluid birch
#

The Checkout Session opens correctly

fluid birch
granite berry
#

yep

#

But, it doesn't opens correctly for me :/

#

I have the screen I show you

fluid birch
#

You have an issue in your redirection then

#

Can you try copy past the link returned by the Checkout Session: url

granite berry
#

session.url ?

fluid birch
#

yeah

granite berry
#

ok

fluid birch
#

and open it in your browser directly

granite berry
#

yes it worked when I opened it in my browser

#

do you know why it's not working normally ?

fluid birch
#

and see what makes the final redirect url changed from the original one returned by Stripe API

granite berry
#

ok

#

ty

#

I will see if the webhook calls work now

half condorBOT
granite berry
#

ok that worked well

#

thanks for all !