#ahjaydog - Webhook
1 messages ยท Page 1 of 1 (latest)
hi
You can listen for the charge.dispute.created event which will include the Dispute record in the event data.
https://stripe.com/docs/api/events/types#event_types-charge.dispute.created
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The dispute is linked to the Charge and you can follow that back to the checkout session
You follow the trail of linked records. Dispute-> Charge -> Invoice -> Subscription.
ok
Anotheer question
Is this the best way from after a checkout to get the payment type (card, ach)
You could do it that way, although I personally find it easier to listen for the payment_intent.succeeded event and just pull out the Customer and Payment Method IDs from that.
We usually recommend a single Account webhook URL and a function that routes the requests based on the event.type and the data object
The setup I built uses an async queue system so I verify the webhook, add the processing task to my queue, and respond with a SUCCESS message
celery?
Yup
Personally I love it. The first task is a routing that determines what needs to happen and then adds a new task to the queue for the appropriate function to handle the next action.
I just read the celery docs. All I saw for it was the celery beat cron job replacement but your setup makes me think otherwise.
Do you recommeend rabbitmq or redis?
I used Celery in production for a few years and it did take me a little while to get comfortable designing workflows
i am using redis as a cache i don't think it would be a good idea to use redis for both cache and message broker
RabbitMQ supports multiple queues with priority assignments but I've never had to use it.
ok so you use redis for both cache and broker?
if you use heroku, would it allow celery?
Redis for cache & results, RabbitMQ for broker.
As for heroku, I'm not sure. That is going beyond what I can advise
But hopefully you've got a good sense for what Stripe webhooks can be used for.
ok no worries about heroku i was just curious but that is good to know for redis
oh so you use redis for celery results backend?
Yup
Personally I'm a Django dev but we support flask as well as many other programming languages.
I need to step away but my colleague @drowsy verge will be able to answer all your Stripe related questions.
๐ let me know if I can help with anything
Yea not that I know of right now snufkin pretty much answered them lol
actually bismark, i am trying to understand what snufkin said about the URL. So I should have a URL for /webhooks/stripe_payment_webhook/ and it should only apply to 1 event? Right now I have 3 events in that 1 URL. Then I have another URL just for cancels.
I'm a little confused.... are you saying you are concerned if one endpoint is listening to multiple events?
And thus you have multiple endpoints?
yes. Should i keep everything separate like 1 webhook event in 1 URL?
Nope, no reason to do that really.
ok
is there a way to setup wallet payments in checkout?
How would you test them? I don't want to download any of the apps though
Yep Wallets are supported: https://stripe.com/docs/payments/wallets. You can test them if you have a live card in your wallet but use your test API key.
Apple Pay has some specific requirements in terms of domain registration that you will need to get set up.
what do you mean by live card? I never used these wallet apps before. Like a real card but use the stripe API key?
Yeah you need a real credit card in your Google Wallet. Then, as long as the PaymentIntent is created with your test API key, we won't charge that card... we will swap it for a test card.
But you won't see the wallet buttons at all unless you have a live card in your wallet.
wow that is so weird
guess i won't bother then. Would you say that these wallet apps make up a ton of users?
It really isn't hard to integrate them.
I don't know the % of customers that use wallets.
But they certainly reduce friction
If you are using Payment Element all you have to do is register the Apple Pay domain.
yea thatis why i might do it idk
Google Pay is ready out of the box.
but how do i integrate it into checkout? Not elements or whatever
no worries
In that case it is ready completely out of the box.
You don't have to do any domain registration for Stripe Checkout
oh wow perfect. hmm so I have to test it still with the real card though?
and will the webhook events still be the same?
Yep and yep
Just to reiterate, nothing happens to your real card... but the wallet buttons won't appear if you don't have a card in the wallet.
right i understand
so will the payment type change to wallet or will it say google or something?
The card object will indicate that is was a wallet via the tokenization_method: https://stripe.com/docs/api/cards/object#card_object-tokenization_method
So if it is a wallet that will not be null
oh so it is technically a card object though behind the scenes?
i see thanks that gives me something to think about. So to activate the wallets for checkout, I go to the dashboard?
Yeah you control via: https://dashboard.stripe.com/settings/payment_methods
ok so i enabled google pay for example but i do not see it in checkout
i need to display pricing?
We'll only show Google Pay when you present pricing in a supported currency and use a supported payment flow. View our guide for more details.
Are you using Automatic Tax?
Not sure what you mean by "display pricing"
If you have a Checkout Session ID I can look at then that would help as well.
cs_test_a17K2Q80HzVHtjlYlArn8YxlvS33g5Uwep2yd4jRHF7XH4AxqoMjD7Q5mf
display pricing is the note i saw on the dashboard to enable it
no to automatic tax
i didn't even open google pay wallet though
Do you have a card stored in your wallet?
Can you see the button at the top of the page here: https://stripe.com/docs/stripe-js/elements/payment-request-button?
nope
Then it won't show up
That's what I was saying before
You have to have a live card stored in your Google Pay wallet
Yea but on checkout i don't even see the button. I don't even see the wifi symbol on checkout indicating i can pay with google wallet
so my computer would need NFC to be able to see the button? That doesnt make sense.
I expected to see the google pay button then click that on checkout then use the app
i have no reason to use the app yet until i see the google pay button
Either your browser does not support the Payment Request API, or you do not have a saved payment method. To try out the Payment Request Button live demo, switch to one of the supported browsers below, and make sure you have a saved payment method.
I get a warning on that link you sent though
safari browser only?
oh nvm i see for google chrome
hold on
nope tried on chromium browser latest no luck
I don't understand why you expect to see the button if you don't have a card stored?
I've used the Stripe Payment Request Button HTML code from the stripe docs on https://stripe.com/docs/stripe-js/elements/payment-request-button to incorporate the Google Pay button on my UI but the
maybe i need to do what this person says
Got any youtube videos on this?
The button will not show up unless you have a card in your wallet no matter what you do.
card in my wallet means in my android google pay app? How will my desktop computer see it then?
or in my chrome settings like the stackoverflow says?
If you are on Android then yes in your Android google pay app. If you are on web then yes your wallet here: https://pay.google.com/gp/w/u/0/home/paymentmethods
ok that makes more sense thanks
Will 424242... work as a 'real' card even in wechat/apple?
ok just making sure
๐
if a payment works for google, is it safe to say it will work the same for wechat/apple?
I'm not sure what you mean by that exactly.
like if everything i do works for google, if i enable wechat will it work without testing it?
i am assuming really it will
I mean yeah all of the PaymentMethods with Checkout should "just work" assuming you are using currencies that are supported for those PaymentMethods
ok because i don't really want to add a real card to these other apps lol