#rip-applepay-tax
1 messages · Page 1 of 1 (latest)
@nimble anvil I don't really get it. If you use Apple Pay on your own before Checkout then this is completely unrelated to Checkout right? Are you saying you basically want to build your own payment flow specifically for Apple Pay?
rip-applepay-tax
I don't have apple pay setup currently
I use stripe tax and stripe checkout currently which means the flow is product page > stripe checkout > completed purchase
what I want to do is product page (apple pay here) > complete transaction
but I use stripe tax for taxes which seems to be the limitation here on making this possible(?)
why wouldn't you put ApplePay on Checkout instead?
because I want to make it easier for someone to checkout
so moving the purchase to the product page would increase conversion
its a common e-commerce flow
Would https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=embedded-checkout help? It's a beta we have right now to embed Checkout straight on your website
This is a replacement for using Stripe hosted checkout
let me re-explain the flow
Currently: product page > user clicks add to cart > user lands on stripe hosted checkout > user can enter payment details and complete transaction
New: product page > user has the option to add to cart or buy with apple pay:
- if apple pay, user completes the transaction on this page
- if add to cart, user completes the transaction in the stripe hosted checkout session
Sorry sorry I'm trying to be clear that doing what you want is days if not weeks of work so I was trying to save you all the hassle
I would recommend never doing this "oh let's do a custom flow just for Apple Pay" because this is going to be an extreme pain to build compared to just using Checkout
Constraints: I use stripe tax to calculate taxes and need the tax to be recorded by stripe in the tax dashboard so I can keep track of taxes
Fair enough
I just want to understand if this is even possible with how I am using stripe
Now with all of that said I can tell you what to do at least, was just trying to nudge you away from even attempting
I mean it's possible, but you have to build most of this entirely yourself. It's a completely different path from what you already use
How would stripe apple pay work with stripe tax?
https://stripe.com/docs/tax/calculating You're going to have to do your own calculation yourself with that API. There's nothing "built in" outside of Checkout really
And it's really complex with Apple Pay since you don't get the real/full address until after someone gets the "payment sheet" and validates it so you have to use https://stripe.com/docs/stripe-js/elements/payment-request-button
Okay, so hypothetically if I did calculate the tax myself with the API would that show up in the stripe tax dashboard?
I currently export the stripe tax CSV to keep track of taxes across transactions so I would need this reporting to exist for the apple pay transactions as well
it's complex, there's no real "link" between the tax calculation and the payment, so exports/reporting would work differently, but yes the tax transaction would show
but again I'd never do that if I were you
would work differently as in would still work or they would not work
I know ~nothing about reporting I'm sorry. The info would be there, just it wouldn't be linked the same way to a payment for example
interesting
Okay so I understand that you are strongly recommending against this and I hear that
But to summarize, this is entirely possible to do (implementing apple pay via stripe on the page preceding the stripe checkout page), I can still use stripe tax to calculate tax (but this would happen post apple pay purchase and then I would need to figure out how to match up that tax calculation with a payment?)
Actually could you provide some clarity on how stripe tax would work with stripe apple pay?
there's nothing specific to Apple Pay at all really. You use PaymentRequestButton, get a PaymentMethod or similar and then calculate tax with billing details on it and other info and then charge that card
does the tax calculation happen while the apple pay modal is out
or what are the details with the ordering of events there?
👋 stepping in as koopajah needed to step away
You are asking about using the custom tax calculation flow that we discuss here: https://stripe.com/docs/tax/custom ?
As in using Stripe Tax without Invoices/Subscriptions or Stripe Checkout ?
I am using stripe checkout currently, but I would like to add an apple pay button to my website in a "custom flow" but still use stripe tax
Gotcha so you need to have the address to calculate tax in this flow.
So mostly depends on whether you are relying on collecting that address during the Apple Pay modal
Or beforehand
for new users I would not have their address but for existing users I would
So is there a way to run the tax calculation after the user shares their shipping information in the case that I don't have their address?
Yep for sure, this would just happen after the PaymentMethod collection via Apple Pay though
Err sorry that's incorrect.
Yes you do this during
You would basically hit your server to then calculate tax
We indicate how to do this here: https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#html-js-collecting-shipping-info
Where you would use the shippingaddresschange event
and I can use stripe tax to calculate the tax manually as Koopajah said above and return that tax value to the apple pay modal?
reading that rn
Yep
So I am able to trigger an API request to get a tax cost whenever a customer changes or adds shipping information (in the cases that a customer has shipping but changes it or doesn't have shipping and adds it)
Yep
Okay, and because this is critical for me I want to double down -- since I currently use stripe checkout with stripe tax, all the tax is handled by stripe and presented to me in the stripe tax dashboard
since I will be using stripe tax on my own, will the tax amounts still be reflected in the stripe tax dashboard (I just might need to do some work to corroborate the apple pay payments with the stripe tax amounts?
Yep
We aren't Dashboard experts (we focus on the API) but as far as I know the same stuff is shown in the Dashboard
Okay sounds good, thanks!
Sure thing
One more question here, how is shippingaddresschange triggered from the platformpaybutton
or where's the specific documentation on how to handle a shippingaddresschange
PlatformPayButton? That is a React Native component
Are you using React Native?
I assume you are using web here?
yeah, I am using both web and react native
Okay yeah there are event listeners with React Native like there are on web
The React Native guide is here: https://stripe.com/docs/apple-pay?platform=react-native
Where does it talk about event listeners here? sorry just trying to square that away
So is there any way to request stripe tax then?
or how do I trigger a shippingaddresschange event then in react native
Yeah give me a sec to refresh on how to handle this with React Native
thanks, appreciate it
Okay yeah there is a callback that I forgot about
Oh wait that is for shipping method
That is the one you want