#starky_api

1 messages ยท Page 1 of 1 (latest)

velvet perchBOT
#

๐Ÿ‘‹ 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.

sand novaBOT
#

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.

jade dew
#

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

near mantle
#

? 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?

jade dew
#

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

near mantle
#

This tax rate txr_1PCQeWIzpFSlCKHN1oN26mYv was created by the API , and I see it under acct_1P1lTAII0FUqpRgj

jade dew
#

That's not the tax rate you passed

#

You passed txr_1PCMIBIzpFSlCKHNC7uLjgi4

#

Don't share secret keys in here

#

This is a public server

near mantle
#

Wait a bit. I will do a req then with txr_1PCQeWIzpFSlCKHN1oN26mYv

jade dew
#

txr_1PCQeWIzpFSlCKHN1oN26mYv exists on acct_1OttMdIzpFSlCKHN too...

near mantle
#

check req_b3Yd0DKphtHHrK

jade dew
#

Same problem

near mantle
jade dew
#

You did not. The key ending in 0CPL0G is on acct_1OttMdIzpFSlCKHN

near mantle
#

So why do I see that key in the dashboard of acct_1P1lTAII0FUqpRgj?

jade dew
#

Likely you're actually logged into acct_1OttMdIzpFSlCKHN too if you're seeing the key ending in 0CPL0G

near mantle
#

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.

jade dew
#

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

near mantle
#

which stripe header? Your colleague said the request was okay.

jade dew
#

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

near mantle
#

you mean the requestOptions object that is done when doing subscriptionService.Create() ? because in that case, yes, it contains that connected account.

jade dew
#

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

near mantle
#

Okay sorry but seems that you are not cooperating. Could you transition the txr_1PCQeWIzpFSlCKHN1oN26mYv into acct_1P1lTAII0FUqpRgj and we solve the issue here?

jade dew
#

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

near mantle
#

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.

jade dew
#

You're mixing up the keys

#

There is no bug

#

You can contact support if you want: https://support.stripe.com/contact

#

But I'm looking at the objects and you're just mixing up keys

near mantle
#

so can you tell me the ending of the key for acct_1P1lTAII0FUqpRgj?

jade dew
near mantle
#

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.

jade dew
#

That's a custom account

#

You should use the platform's keys and pass the stripe account header

#

ie acct_1JvGUwEZ1Ju8Avfg's keys

near mantle
#

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?

jade dew
#

That's the wrong key

#

The one ending in NWce is for acct_1JvGUwEZ1Ju8Avfg

near mantle
#

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"
}
}

Learn more about error codes and how to resolve them.

jade dew
#

Are you passing it as sktest or sk_test

near mantle
#

sk_test, the formater pastes it as sktest

jade dew
#

Ok can you share the request id for the above then?

near mantle
#

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

jade dew
#

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

near mantle
#

Okay, yes, Now I am getting product wrong, but I think it is the same issue, so I will just follow the same process.

jade dew
#

exactly

near mantle
#

Thank you for the patient and have a great evening!

jade dew
#

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)

near mantle
#

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.

jade dew
#

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

near mantle
#

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.