#Koba Z Gablaia-apple-pay
1 messages · Page 1 of 1 (latest)
For your first question - yes, that's one way to change the height of the PaymentReqeustButton. I believe the other way to change the size is to modify the size of the container the element is mounted to
For your tax question can you clarify what behavior you're expecting? Stripe doesn't automatically calculate tax for Apple Pay - you would have to do that yourself and add it to the total
Just add tax to the total? For example in my case for NY.
For example, we make a quick payment, and we do not know in advance the client from which state, but in the process we find out that he is from NY and how can we add the payment amount?
Example
You can request that apple pay collects shipping information and listen for the shippingaddresschange event. Once you have the location information you n eed you can update the total with the correct tax amount (see https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-collecting-shipping-info)
Look at our button, please, we have made a delivery, can we add "Tax" there as in the screenshot? If possible, an example of how we can implement.
That is, in the case of a quick payment, we do not know the client's zip, how can we add tax to him for certain zips?
We store zips on our site to which you need to add tax, but with a quick payment, we don’t know what zip the client has in advance until he starts paying.
The flow is that you present the sheet, and then you get a callback from us when the address changes (what karbi explained above) and then you calculate tax and you update the sheet with your new calculation/tax if needed
Does that mean we can do it? If we do not know in advance the zip of the client and he makes an express payment without registration.
I'm just preparing information for the programmer.
I don't understand what those words mean. What's an express payment? What registration?
See an example of our button https://a-t-shirt.com/product/basic-v-nick-t-shirt-im-hung (To display it, you must select T-Shirt color, Print color, Size )
The client can make a purchase without registration and will already indicate the delivery address and type of delivery with the total cost. Now we need to add tax for NY, can we implement it the same way?
If the client is registered, we will already be able to add tax without problems to the total cost. But the question is when the user is not registered, as I indicated to you in the example.
and will already indicate the delivery address and type of delivery with the total cost
what does that sentence mean? I'm sorry I really don't follow what you are discussing
If you use the PaymentRequestButton to collect shipping details then you won't know until after the modal/sheet appears
Do I understand correctly that before the appearance of the modal window, we do not need to know the client's zip? After which we can find out and if the code corresponds to NY we add to the total cost, right? It is not necessary for the client to transfer data about his zip to our site in advance?
yes
you can ask in advance if you want to pre-calculate tax, but if you want you can let Apple or Google tell you during the collecting of payment details in that sheet. Both options are possible
Thank you, now I understand, our site is obtained by the api method at the time of payment, can request a zip and already formulate the final value? Can you give an example of how we can request a zip client using the apple pay pricing modal?
our site is obtained by the api method at the time of payment
I'm sorry but that sentence doesn't really make sense to me as is. So I don't really understand what you are asking
At this point I would really encourage you to talk to your developer first and have them come directly to this Discord server if they need help.
Okay, but still tell me how can we make a separate section - "tax" as in the screenshot?
We have explained this before though so I'm not sure what you are asking/misunderstanding
trying to find you a more explicit doc but not sure we have one
How about a code example? Can you provide?
I don't have one right now no, I'm trying to see if there's one
label: 'TAX',
amount: 99,
pending: false,
},
{
label: 'subtotal',
amount: 1000,
pending: false,
}],```
if you do this you should see the tax row filled out with $0.99 for example
basically you control which line items/section appear but there isn't a clear breakdown beyond that
thanks a lot