#fredkzk-tax-price
1 messages · Page 1 of 1 (latest)
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?
just pulling this up, sorry about the delay
no pb
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
So steps are:
1 create product
2 create price
3 checkout
assuming you have already set up your account for taxes that should do it
remember to enable automatic tax on the checkout session
platform acct and connected accounts yes all set for tax
Yes checkout with auto tax
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?
it looks like you're missing something in your request, a bad placeholder for a price id
can you share the error request id so i can confirm?
https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
made some progress in meantime, now error is:
error: "Error: No such price: 'price_1JXWyGBfY9idGe2uIwJSHf2e'"
OK most likely this is related to your connect requests
req_szfgpxn30a6moq
thanks
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?
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
Hmm so yeah I attached the connect acct to the header of the createPrice API then
yep exactly
but no need for the createProduct though
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
awesome! glad to hear it 🙂