#rakari_api
1 messages Ā· Page 1 of 1 (latest)
š Welcome to your new thread!
ā²ļø We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
ā±ļø We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
š This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1249985112691441696
š Have more to share? Add details, code, screenshots, videos, etc. below.
Yeah can you check that you have enabled Stripe Tax?
@tawny bay we think yes we did by following the link the error response gave us. Here's a screenshot. We think that is the right page. Please let us know if we need to activate it elsewhere. We're working in testmode
Hi, qq did you register the places you would collect Tax?
@tawny bay where would we do this? We just added the Business information origin address
Is that here: https://dashboard.stripe.com/tax/registrations ?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yeah do you see the "Add registration" blue-purple button?
yes, we just added one address in NY, but if we do the request afterwards, it's returning the same error message
This is the request
curl --location 'https://api.stripe.com/v1/tax/calculations'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: ā¢ā¢ā¢ā¢ā¢ā¢'
--header 'Cookie: __stripe_orig_props=%7B%22referrer%22%3A%22%22%2C%22landing%22%3A%22https%3A%2F%2Fdashboard.stripe.com%2Facct_1PQ4xbAoSN5FqK2L%2Ftest%2Flogs%2Freq_ja04M6XNTPf1jz%3Ft%3D1718035660%22%7D; cid=109c3ac3-5be3-425d-8512-7eb6c0131d3e; machine_identifier=fKsBuH31HWkgsomgxnfPdVqjz%2Bvl2H8OtgIY8gZCYXQtRGn3lMu%2B93sWjPb1yDs9T5w%3D; private_machine_identifier=DOMWImUEwdEz4rUgq8Ccps6sV1OgZObdFBfeesIDUPJzFTNXBwyLB73SsK8xH6D4b4Y%3D; stripe.csrf=5a40y5B-zK4H42ZXf8tI8Icyyq3WpqtLfgjzjZEZfqUre_fdsl0VoVseKcszCRTSAhS39e5IXvl_nP96zhCcgzw-AYTZVJx5wkESwwVbN70md6wm4yVimYqUUtjxuVQSCMmbCCzlJg%3D%3D'
--data-urlencode 'currency=USD'
--data-urlencode 'line_items%5B0%5D%5Bamount%5D=10'
--data-urlencode 'line_items%5B0%5D%5Bquantity%5D=1'
--data-urlencode 'line_items%5B0%5D%5Breference%5D=test product 1'
--data-urlencode 'line_items%5B0%5D%5Btax_behavior%5D=inclusive'
--data-urlencode 'line_items%5B0%5D%5Btax_code%5D=txcd_99999999'
{
"error": {
"code": "stripe_tax_inactive",
"doc_url": "https://stripe.com/docs/error-codes/stripe-tax-inactive",
"message": "Stripe Tax has not been activated on your account. Please visit https://dashboard.stripe.com/test/settings/tax/activate to get started.",
"request_log_url": "https://dashboard.stripe.com/acct_1PQ4xbAoSN5FqK2L/test/logs/req_9PmkGHcfePCaor?t=1718090845",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
@tawny bay acct_1PQ4G2FQ8VtqazKz
req_9PmkGHcfePCaor is made on a Standard Account acct_1PQ4xbAoSN5FqK2L, belongs to a Platform account acct_1PQ3niFCMR2CSvcs
I think you changed the settings on a different Stripe Account
You would want to enable on acct_1PQ4xbAoSN5FqK2L
@tawny bay wait, we don't get it. We don't use the account number anywhere. We do have one stripe account acct_1PQ3niFCMR2CSvcs where we've generated the API keys and enabled stripe tax for
I see, where did you get acct_1PQ4G2FQ8VtqazKz?
Trying to make sure we are on the same page
We don't remember anymore. If we check in our profile we only see: acct_1PQ3niFCMR2CSvcs
@tawny bay we've just double checked the API keys for account acct_1PQ3niFCMR2CSvcs and we're using the proper secret for Oauth
Okie so it looks like you have set the Stripe Tax settings for the Platform. However this request (req_9PmkGHcfePCaor) is made on a Standard Account acct_1PQ4xbAoSN5FqK2L
So you would want to enable Stripe Tax on that Connected Account instead
The screenshots we've shared with you are from the account: acct_1PQ3niFCMR2CSvcs
and the registration we also did on : acct_1PQ3niFCMR2CSvcs
@tawny bay I'm not fully getting what you mean by Platform Account. Where can we see in the Dashboard which if we do have a platform account or not?
Sure, so Platform is acct_1PQ3niFCMR2CSvcs, and there is a Standard Connected Account to it: acct_1PQ4xbAoSN5FqK2L
When you made the request req_9PmkGHcfePCaor, you used the Platform key, but with a Stripe Account header to acct_1PQ4xbAoSN5FqK2L
Can you double check your code which sent out that request?
@tawny bay we've just checked in postman and we don't send it anywhere
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
I am a bit confused. Are you using Stripe Connect? Are you the owner of acct_1PQ4xbAoSN5FqK2L or acct_1PQ3niFCMR2CSvcs?
Also, I suggest you to use a larger amount, e.g. amount=10000 - 100 USD, for testing. 10 cents is too little for most payment method types.
@plush kiln thank you. We're checking this but we've created yesterday a stripe developer account with the account number: acct_1PQ3niFCMR2CSvcs and used the API keys to call the Tax calculator endpoint
I see that you used an OAuth access token to make this request, that's why it was made on another account where Tax is not enabled. How are you sending the request exactly? Is this it āļø? Why are you adding stripe_orig_props?
What's the prefix of --header 'Authorization: ā¢ā¢ā¢ā¢ā¢ā¢' \? sk_test_?
@plush kiln yes: sk_test_51PQ4
So we basically used the API key and secret from acct_1PQ3niFCMR2CSvcs to initiate the Oauth flow and got the sk_test_token back which we're using in the postman to do the Tax Calculator call. Stripe tax has been enabled on: acct_1PQ3niFCMR2CSvcs account
Let me get one of my teammates here who can probably answer more precisely
This sounds too complicated. When you create a Stripe account, you go to the Developers page on the Dashboard and get the secret keys from there. No need to use OAuth.
Hi @plush kiln we are implementing a new integration and would like to use oAuth flow
it is why we are using token we receive on the end of oAuth
Why do you need to use OAuth flow?
to integrate with stripe and make API calls
it is one of the ways to communicate with the API
Where did you learn about this flow?
As I suggested earlier:
When you create a Stripe account, you go to the Developers page on the Dashboard and get the secret keys from there. No need to use OAuth.
That's an advanced flow to connect multiple Stripe accounts together using Stripe Connect.
If you just want to make API calls with your own Stripe accounts, see the flow I suggested above āļø
the interesting thing is that we can create products using same authentication
thanks, we will check this possibility, but also we are intersting in oAuth flow
maybe we messed things up during the set up, I will try to reconfigure all things again on our side
OAuth flow is something completely different. Unless you need to use Stripe Connect (not in all cases even), you don't use OAuth.
Your accounts API keys are here, and there's no other place to get them: https://dashboard.stripe.com/apikeys
š taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
thank you, with test key it is working, but I also would like to check and fix on our side oAuth flow
what is the issue with the OAuth flow?
@fiery temple here is the use case: We wanted to implement a Stripe Tax integration for a eCommerce system like Shopify. Merchants should connect their Stripe account via OAuth, so that we can call in their name the Stripe Tax Calculator endpoint and display taxes on their stores
This is why we thgouht we need a main account which is "the Stripe Tax App" and holds the Oauth Secret. The merchant can install the "Stripe Tax Add for ecommerce platform like Shopify" and connect with their Stripe account, so that the app can do API on their behalf to the Tax Calculator endpoint
does that make sense?
So we don't want to have a 1:1 integration, but a 1:n integration
yes
That's basically the flow @last token implemented
have you went through this https://docs.stripe.com/stripe-apps/api-authentication/oauth
yes, that's what @last token was referring to in #1249985112691441696 message
ok so now the question becomes how to do API calls on behalf of your connected account right?
@fiery temple we assume, yes. Here is the call we did before including the response. We were following the link in the response and registered destinations and activated stripe tax but still receiving the same exception
curl --location 'https://api.stripe.com/v1/tax/calculations'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: ā¢ā¢ā¢ā¢ā¢ā¢'
--header 'Cookie: __stripe_orig_props=%7B%22referrer%22%3A%22%22%2C%22landing%22%3A%22https%3A%2F%2Fdashboard.stripe.com%2Facct_1PQ4xbAoSN5FqK2L%2Ftest%2Flogs%2Freq_ja04M6XNTPf1jz%3Ft%3D1718035660%22%7D; cid=109c3ac3-5be3-425d-8512-7eb6c0131d3e; machine_identifier=fKsBuH31HWkgsomgxnfPdVqjz%2Bvl2H8OtgIY8gZCYXQtRGn3lMu%2B93sWjPb1yDs9T5w%3D; private_machine_identifier=DOMWImUEwdEz4rUgq8Ccps6sV1OgZObdFBfeesIDUPJzFTNXBwyLB73SsK8xH6D4b4Y%3D; stripe.csrf=5a40y5B-zK4H42ZXf8tI8Icyyq3WpqtLfgjzjZEZfqUre_fdsl0VoVseKcszCRTSAhS39e5IXvl_nP96zhCcgzw-AYTZVJx5wkESwwVbN70md6wm4yVimYqUUtjxuVQSCMmbCCzlJg%3D%3D'
--data-urlencode 'currency=USD'
--data-urlencode 'line_items%5B0%5D%5Bamount%5D=10'
--data-urlencode 'line_items%5B0%5D%5Bquantity%5D=1'
--data-urlencode 'line_items%5B0%5D%5Breference%5D=test product 1'
--data-urlencode 'line_items%5B0%5D%5Btax_behavior%5D=inclusive'
--data-urlencode 'line_items%5B0%5D%5Btax_code%5D=txcd_99999999'
{
"error": {
"code": "stripe_tax_inactive",
"doc_url": "https://stripe.com/docs/error-codes/stripe-tax-inactive",
"message": "Stripe Tax has not been activated on your account. Please visit https://dashboard.stripe.com/test/settings/tax/activate to get started.",
"request_log_url": "https://dashboard.stripe.com/acct_1PQ4xbAoSN5FqK2L/test/logs/req_9PmkGHcfePCaor?t=1718090845",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
taking a look
the Authorization keys prefix is: sk_test_51PQ4
@last token please support @fiery temple to get the information needed
the auth is correct
that's not the issue
the issue is that the Stripe Tax isn't activated on the account
yes
and we do not understand why it is not activated
you need to enable it on the connected account