#fredkzk-tax-price

1 messages · Page 1 of 1 (latest)

glacial solar
shell spruce
#

FYI the price is pre-defined, fetched from our database.

#

My product is a service (consulting) and always the same service. Only price may differ. Do I need to define a product with the createProduct API before the createPrice API call?

glacial solar
#

just pulling this up, sorry about the delay

shell spruce
#

no pb

glacial solar
#

you always need to provide product info for prices, and if it differs from your account default you should consider the product tax code

#

but i think that's all thats needed on the price side

#

there's also the tax registrations and customer location dependency, but that's not going to block price creation

shell spruce
#

So steps are:
1 create product
2 create price
3 checkout

glacial solar
#

assuming you have already set up your account for taxes that should do it

#

remember to enable automatic tax on the checkout session

shell spruce
#

platform acct and connected accounts yes all set for tax

shell spruce
shell spruce
#

Hi again, doing some last testing...
I get an:
error: "Error: No such price: 'price'"
My setup:
1 createProduct (where i set the tax code and type of product - Service)
2 createPrice where I used the productID, and set the currency and unit amount (fetched from our DB) and tax behavior as exclusive.
3 Checkout where my line items = createPrice.object
Any clue where (which API call) the error msg comes from?

glacial solar
#

it looks like you're missing something in your request, a bad placeholder for a price id

shell spruce
#

made some progress in meantime, now error is:
error: "Error: No such price: 'price_1JXWyGBfY9idGe2uIwJSHf2e'"

glacial solar
#

OK most likely this is related to your connect requests

shell spruce
#

req_szfgpxn30a6moq

glacial solar
#

thanks

shell spruce
#

Yet the price Object is created seconds before I call the checkout API...

#

Do i need to add the connected account in the header of the createProduct and/or the createPrice API maybe?

glacial solar
#

The price you used belongs to your platform account, but you're doing a direct charge approach with the connected account

#

with this apporach the price needs to exist on the connected account

shell spruce
#

Hmm so yeah I attached the connect acct to the header of the createPrice API then

glacial solar
#

yep exactly

shell spruce
#

but no need for the createProduct though

glacial solar
#

well everything needs to be in one place

#

so if you use a product (vs say product data) then that needs to be there too

shell spruce
#

gotcha

#

Works perfectly well! Thx so much!

glacial solar
#

awesome! glad to hear it 🙂