#starky_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1236027010195787776
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- starky_connect-objects-subscriptions, 28 minutes ago, 21 messages
- starky_api, 2 hours ago, 27 messages
- starky_api, 4 hours ago, 10 messages
So the tax rate you passed in to the above request, txr_1PCMIBIzpFSlCKHNC7uLjgi4, was created on acct_1OttMdIzpFSlCKHN. However, you are making the create subscription request via the stripe account header on acct_1P1lTAII0FUqpRgj
However, the platform account whose keys you used to make the create subscription request is
acct_1JvGUwEZ1Ju8Avfg
So looks like you have 3 accounts at play here and you are mixing where you create each object
? Not really. I used the keys to of acct_1P1lTAII0FUqpRgj to create the tax_rate, and when I passed the requestOptions I passed the acct_1P1lTAII0FUqpRgj as well. The API is then creating the tax_rate object on the wrong accounts, I trippled checked this.
Most likely you have a bug?
I used the keys to of acct_1P1lTAII0FUqpRgj to create the tax_rate
I'm looking at the objects in our system now. You did not. You used acct_1OttMdIzpFSlCKHN's keys
This tax rate txr_1PCQeWIzpFSlCKHN1oN26mYv was created by the API , and I see it under acct_1P1lTAII0FUqpRgj
That's not the tax rate you passed
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You passed txr_1PCMIBIzpFSlCKHNC7uLjgi4
Don't share secret keys in here
This is a public server
Wait a bit. I will do a req then with txr_1PCQeWIzpFSlCKHN1oN26mYv
txr_1PCQeWIzpFSlCKHN1oN26mYv exists on acct_1OttMdIzpFSlCKHN too...
check req_b3Yd0DKphtHHrK
Same problem
But I created that account via api with the keys of acct_1P1lTAII0FUqpRgj
how come are they in acct_1OttMdIzpFSlCKHN? Then there is a bug
You did not. The key ending in 0CPL0G is on acct_1OttMdIzpFSlCKHN
So why do I see that key in the dashboard of acct_1P1lTAII0FUqpRgj?
Likely you're actually logged into acct_1OttMdIzpFSlCKHN too if you're seeing the key ending in 0CPL0G
the key of the main account finishes in NWce, I admit I have both accounts open in different brownsers on the computer, but they have different keys.
Yeah the key ending in NWce is for acct_1JvGUwEZ1Ju8Avfg
You're just mixing up the accounts
Something to note though is if you're passing the stripe account header to create a subscription, you need to also pass the header when creating the tax rate as well or else you'll get a similar error
which stripe header? Your colleague said the request was okay.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You passed a stripe header when making this request...
If you're going to do that, all objects you reference must exist on the account you passed in the stripe header
Including the tax rate
you mean the requestOptions object that is done when doing subscriptionService.Create() ? because in that case, yes, it contains that connected account.
That's the stripe account header: https://docs.stripe.com/connect/authentication
Passing that issues the request ON the connect account
So all objects you reference in the request must live on the connect account
So if you're going to create a subscription ON a connect account, the tax rate must also live on the connect account
Okay sorry but seems that you are not cooperating. Could you transition the txr_1PCQeWIzpFSlCKHN1oN26mYv into acct_1P1lTAII0FUqpRgj and we solve the issue here?
Nope that's not how this works
You need to create a tax rate yourself on the proper account
I have 0 power to manipulate objects in our system
I did, there is a bug, and you keep telling me things that I know I am doing right according to the documentation and you keep telling me the object is in the wrong account.
You're mixing up the keys
There is no bug
You can contact support if you want: https://support.stripe.com/contact
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
But I'm looking at the objects and you're just mixing up keys
so can you tell me the ending of the key for acct_1P1lTAII0FUqpRgj?
you mention that 0CPL0G does not belong to acct_1P1lTAII0FUqpRgj but I clearly see it in acct_1P1lTAII0FUqpRgj dashboard, so please tell me the ending of the key that you have for acct_1P1lTAII0FUqpRgj so that I can look for it in the dashboard.
That's a custom account
You should use the platform's keys and pass the stripe account header
ie acct_1JvGUwEZ1Ju8Avfg's keys
so in this:
curl https://api.stripe.com/v1/tax_rates
-u "sk_test_...PL0G:"
-d display_name="VAT"
-d inclusive=true
-d percentage="0"
-d country=DE
-d description="VAT"
Where do I pass the header of the connect account?
okay, that was my next question. How do I add the header of the connected account?
btw I just tried it and I got this:
"message": "The provided key 'sk_test_***********************************************************************************************NWce' does not have access to account '{{acct_1P1lTAII0FUqpRgj}}โ\ -d display_name=VAT_fโ' (or that account does not exist). Application access may have been revoked.",
"type": "invalid_request_error",
"code": "account_invalid",
"doc_url": "https://stripe.com/docs/error-codes/account-invalid"
}
}
Are you passing it as sktest or sk_test
sk_test, the formater pastes it as sktest
Ok can you share the request id for the above then?
it is not showing on the logs, but I think I have a line malformated in the curl. Just a second
sorry for being a pain in the ass but I don't see the requests entering
I am doing this:
app.MapPost("/", () =>
{
var key = "sk_test_*****NWce";
var requestOptions = new Stripe.RequestOptions
{
StripeAccount = "acct_1P1lTAII0FUqpRgj"
};
var TaxRateOptions = new Stripe.TaxRateCreateOptions
{
DisplayName = "VAT_f",
Inclusive = true,
Percentage = 0,
Country = "DE",
Description = "VAR"
};
var service = new Stripe.TaxRateService();
service.Create(TaxRateOptions, requestOptions);
Results.Ok(new { message = "OK" });
});
But do not see the request or the new tax_rates
txr_1PCS6UII0FUqpRgjHbLAKsXb
req_dmEOhBYMirIe8s
Ah you did successfully create that tax rate on the connect account
You wouldn't see it in your platform's dash. It exists on the connect account
Okay, yes, Now I am getting product wrong, but I think it is the same issue, so I will just follow the same process.
exactly
Thank you for the patient and have a great evening!
No problem
I did want to ask, though, why are you using direct charges with custom connect accounts?
Generally destination charges are recommended (ie subscriptions and all objects exist on the platform account then funds are transferred after payment is complete)
I actually am a bit confused with direct charges and destination charges.
We usually had only direct charges because we were selling directly but now with our branch in Germany, I thought would be same process for the subscriptions. I tried a few weeks ago with the destination charges and somehow the fee from stripe was higher and did not make sense, that is why I sticked with the direct charges.
I see. Yeah I'm not an expert in pricing. We just deal with the api in here, so fees are a bit unfamiliar to me
I understand, I have a programming + financing background, so all numbers are of importance to me.
Anyway seems the problem from the backend is solved now. Thanks for the help!
Have a great rest of the day.