#riptired

1 messages · Page 1 of 1 (latest)

tiny pendantBOT
azure venture
summer atlas
#

Hey Jack

#

So I am using stripe elements

#

I need my checkout to be 2 staged (stage 1 is get shipping address from the customer, and then stage 2 is show sales tax + shipping + product price and display the element that collects payment info)

#

When they finally complete checkout on the second stage, I would like the breakdown of sales tax, product price, shipping, etc to be available in the sales receipt so that I can sync it to quick books

azure venture
#

Are you using PaymentIntents API or Invoicing APIs?

summer atlas
#

Payment Intents API

#

The customer is paying immediately on the checkout page so I don't need to send them an invoice (think like ecommerce buying a t-shirt)

azure venture
#

The PaymentIntent doesn't carry information about tax, price or shipping.

summer atlas
#

So in order to have this work do I need to switch to the invoicing api?

#

and does the invoicing api work for my use case?

azure venture
#

Yes you can use Invoicing API, but the easier way is just to use Checkout Session.

summer atlas
#

Is checkout session different from Stripe Checkout?

azure venture
#

Stripe Checkout = Checkout Sessionl

summer atlas
#

so I can't host checkout on my domain and have line items?

azure venture
summer atlas
#

Okay great

#

Additionally, would this work with a 3rd party sales tax api?

#

And in stripe checkout is it fine if sales tax and shipping costs are unavailable until shipping address is provided

#

@azure venture

azure venture
#

Personally I'd recommend you using Stripe Tax https://stripe.com/docs/tax

Calculate and collect sales tax, VAT, and GST automatically on your Stripe transactions—low or no code integrations available.

summer atlas
#

So I would need to collect shipping address and tax info prior to initiating the checkout session

#

how does stripe tax interface with stripe checkout?

azure venture
summer atlas
#

If I want to stick with a third party api for sales tax integration but still have line items on my sales receipt I would be able to do that with stripe checkout correct?

#

and I would need to collect shipping address and tax info from the 3rd party api before initiating a stripe checkout session correct?

azure venture
#

Yes you can do that as well.

summer atlas
#

Yes to both?

azure venture
#

Yes to both

summer atlas
#

Okay, and then for shipping basically I would need to use my own elements for that since checkout is different from using payment intents?

azure venture
#

You can use Checkout Session to collect it as well.

summer atlas
#

Checkout Session is the page view that you see in the docs right?

#

I don't see a shipping field available there

azure venture
summer atlas
#

okay so a checkout session would still enable me to collect shipping address, wait for sales tax to be calculated and then proceed with completing the checkout?

azure venture
summer atlas
#

Okay so if I want to use a 3rd party API to get sales tax I have to collect shipping address before the checkout session?

#

and if I want to collect shipping address within the checkout session I need to use Stripe Tax

#

is that correct?

azure venture
#

You are right. It's just that without Stripe Tax, you need to create the tax rate by yourself.

summer atlas
#

yeah I have an API that calculates the tax price

#

Okay so in sum: if I am using a 3rd party sales tax, I need to get shipping before the session but I can pass these line items in and they will be shown on the sales receipt

#

Regarding line items though, can I set any number of line items for the sales receipt?

azure venture
#

If you are calculating the tax rate by yourself, address is not mandatory.

summer atlas
#

i.e. if I have a transaction fee I can show that as a line item as well?

azure venture
summer atlas
#

and finally can metadata be passed through to a checkout session?

#

so that when a checkout session is completed that I can pass some data with that success event to a webhook

azure venture
summer atlas
#

perfect

#

thanks for the advice @azure venture

summer atlas
#

One more question @azure venture

#

If I need to dynamically fetch shipping price based on the shipping address provided in stripe checkout is that possible?

#

or does stripe checkout need to be initialized with the shipping price

#

(assuming I use stripe tax)

#

@azure venture

azure venture
summer atlas
#

No

#

so if I use stripe checkout (with stripe tax) I can have a user give us their shipping address inside the checkout session right

#

but I need to calculate shipping price based on the shipping address

#

via an API

#

is that possible?

#

or in order to do this I would need to do what we discussed before and host the shipping address fields outside of the checkout session, get the shipping cost and then initialize stripe checkout

azure venture
#

You mean an API to get the shipping address that the user is entering to a checkout session? No I'm afraid there's no such API available.

summer atlas
#

No

#

Let me give you an example

#

User A lands on a product page for "Nike pegasus 32" and wants to buy the item. User A clicks buy now which starts a stripe checkout session

#

you mentioned earlier that I can ask User A for their shipping address within the stripe checkout session

#

if I need to query an external non stripe API to get the shipping cost based on the address, can I do that from the stripe checkout session?

#

that way User A can start the checkout session, enter their shipping address, see the sales tax based on shipping address and shipping cost based on address, and then provide their payment information and complete the checkout

azure venture
#

No, you can't query an ongoing checkout session.

summer atlas
#

I don't need to query the session

#

I need to make a request to my own api to get a shipping quote for the ongoing checkout session

#

Would it be possible to pipe in a shipping price in an ongoing checkout session

azure venture
#

Nope.

summer atlas
#

Is it possible with an "embedded" stripe checkout to expose the shipping address entered by the user in the stripe checkout page to an API

azure venture
#

No, there's no such API or option

summer atlas
#

No I understand there is not an API

#

but if I have an API can I access that API from the embedded checkout

azure venture
#

No, there's no way to tell a Checkout page to call an external API during a checkout flow.

summer atlas
#

Can I pull the shipping address out of the checkout page by something like document.getElementById and then pipe in a shipping price?

azure venture
#

No.

summer atlas
#

Is it possible for you to give me access to stripe embedded checkout?

#

see image above for reference

azure venture
#

What do you mean by access to stripe embedded checkout ?

summer atlas
#

There is a beta feature called stripe embedded checkout

#

I would like access to it

#

🤲

azure venture
#

There's a contact us link in the page, you can click on that to request for beta access.

summer atlas
#

Okay thanks

#

Okay sure

#

But my concern is that this seems like a very common flow

#

shipping costs are not always flat across all addresses

#

so it seems absurd that I have to do this all externally / there is no way to access a shipping cost calculator

#

@halcyon ledge thoughts?

azure venture
#

You are right, that's the limitation of checkout session at this moment. I'd pass along your feedback to the checkout team.

summer atlas
#

so that would enable me to add line items to a checkout object but still use stripe elements?

azure venture
#

You still need a paymentIntent secret to render stripe elements, and Stripe checkout session only generate a paymentIntent after it's completed.

tiny pendantBOT
summer atlas
#

okay so there is no way for me to use the stripe checkout session object with stripe elements

thorny junco
#

Taking over here, and yep that's correct

summer atlas
#

Okay thanks

#

I want to follow up on this

#

I need to retrieve the shipping information from Stripe Checkout to dynamically calculate shipping and tax. How can I do this

#

Is there any way to do this with stripe checkout?

thorny junco
#

You mean retrieving after the Checkout has been paid?

summer atlas
#

No

#

I mean that after a user gives me their shipping address in a checkout session, that I can calculate shipping cost and present it to them

thorny junco
#

That means you would need to catch the information after the Session is already presented to the customer. That's not possible unfortunately

summer atlas
#

Okay so I have to calculate shipping before entering a stripe checkout session

#

Additionally if I wanted to use a tax calculator other than stripe tax, I would also need to calculate that beforehand

#

Finally, last questions: for Stripe customers that need a line item break down in quickbooks of their sales receipts, is stripe checkout the most common solution? And is there a built in way for me to post these sales receipts from stripe to QBO or do I have to use some kind of 3rd party connector

#

@thorny junco

#

appreciate your help here

thorny junco
#

Hmm I don't have that much context of your usecase, but generally yes Checkout has line items break down other than a pure PaymentIntent approach like Elements

summer atlas
#

By other than a pure approach what do you mean by that

#

We are currently using payment intent but were told that line items are not available for that

thorny junco
#

Yep, the exactly same thing. Checkout Session gives you the line_items array

summer atlas
#

Sorry

#

To be clear line items are NOT available for a payment intent / elements approach correct?

thorny junco
#

Yep

summer atlas
#

Okay appreciate it

#

thanks

#

For the line items in the stripe checkout session, are any of the fields optional?

thorny junco
#

others are optional

summer atlas
#

Regarding line items in stripe checkout, if I add my own sales tax and my own shipping cost, where will they show up?

#

will they show up here in the highlighted section as my own line items?

thorny junco
#

That highlight is only for when you use the shipping options as above Doc. If you include yourself it will show above as a normal item

summer atlas
#

okay so there is no way for me to provide my own shipping cost as a line item in the total?

#

and not split out as a "product"

thorny junco
#

no way to provide your own shipping cost as a separated/highlight item yes. But you can name it properly and attract the customer attention

summer atlas
#

So it would have to show up in the product section

#

i.e. the section with the images shown above

thorny junco
#

Yep

summer atlas
#

ok thanks

summer atlas
#

so to be absolutely sure -- I cannot add shipping under or above tax in this session?

#

@thorny junco

thorny junco
#

Yes. It would line up with the "product 1" there

summer atlas
#

Okay so this cannot be done?

#

where shipping is under subtotal?

#

Additionally can I initialize a stripe checkout session with a shipping cost and a shipping address so that when the user lands on the stripe checkout session the page looks like this?

thorny junco
#

Yep

summer atlas
#

Okay so this is possible

#

Where shipping and tax show up underneath sub total, and then shipping address is filled out if the session is initialized with these values

#

@thorny junco

thorny junco
#

Sorry don't really follow if that's a question

summer atlas
#

Okay so this is the question

#

Can I initialize a stripe checkout session with a shipping address, sales tax, and shipping cost?

#

like shown in the photo above (i.e. I start a stripe checkout session and the user sees this session with their own shipping address pre populated)

thorny junco
summer atlas
#

Yes I understand that you can add shipping

#

what I asked is if you can INITIALIZE a checkout session with a shipping address

#

so that the shipping address is prefilled in the checkout session

thorny junco
#

I just tried, and yes it's possible if you create a Customer beforehand, prefill their shipping address information, then supply the Customer Id into Checkout Session