#Zohar

1 messages · Page 1 of 1 (latest)

covert windBOT
merry obsidian
#

👋 let's chat here!

#

Just adding what you sent in the main thread:

            payload=raw_data, sig_header=signature, secret=self.__webhook_secret
        )
not getting any account info```
coral orchid
#

thanks

#

payment_event = event.data.object
payment_event_type = event.type
connected_account_id = event.account
payment_intent_id = payment_event.id

#

so event.account does not exists for some reason

#

but the other peices are there

#

here is everything i got back from the CLI

merry obsidian
#

just to cover all our bases:

  • Is your server running?
  • is the CLI routing events to your webhook endpoint with stripe listen --forward-to [server endpoint] ?
coral orchid
#

yes

#

i know it's working becuase the break point light up in studio after i send the event

#

and i can trace through what came in

merry obsidian
#

Is your endpoint returning a 200 response to stripe as part of your event handler code?

coral orchid
#

yes

#

return func.HttpResponse(body=json.dumps({ "success": True }),
status_code=200)

#

but in this case sinceit's not working it's not retunring that

#

except stripe.error.SignatureVerificationError as e:
return func.HttpResponse(
"Signature verification error",
status_code=400
)

#

it's returning this

#

because no account is being passed

#

this all works in my production enviroment

#

it's somthing that i don't have properly configured in test that causing the issue

#

what need to be setup to stripe retunr the account info in test?

rare kelp
#

Hi there, stepping in as roadrunner is away. Catching up here

coral orchid
#

thanks

rare kelp
#

Can you share the event is where it's working as expected in Live mode? Is the issue, on your first screenshot you're not seeing an account id?

coral orchid
#

yes

#

no account id is the issue

#

i can't share from live mode don't have access to production

#

it's looking for the stripe ID

#

how do i get the CLI to pass a stripe id?

#

can i set one up?

rare kelp
#

You're trying to trigger a payment_intent.succeeded for a connected account it sounds like, is that correct?

coral orchid
#

yes

#

it would pass account info from one of the filed in blanked out in red

rare kelp
#

I see, let test this on my end

coral orchid
#

if event["type"] == "account.application.deauthorized":
application = event["data"]["object"]
connected_account_id = event["account"]
handle_deauthorization(connected_account_id, application)

#

connected_account_id is what i need from the example you sent

#

just saw this

#

For Connect webhooks, use --forward-connect-to with stripe listen and --stripe-account with stripe trigger.

#

I'm using a Connect webhook

#

i think i need to add the stripe-account i'll try it

#

it worked!

#

i had to add --stripe_account to get the account to populate

#

may i ask a differnt question?

#

I would like to trigger a payment_intent.succeeded that passes and invoice that is attached to a subscription how would i do that

rare kelp
#

Great to hear it worked, taking a look at the second question.

coral orchid
#

thanks

rare kelp
coral orchid
#

yes i'll need to creaate the api call but how can i make sure that what's returned in the API code is a subsription linked to the invoide that i passs?

rare kelp
coral orchid
#

how do i pay the invoice in my test module?

rare kelp