#Bar-account-capabilities
1 messages ยท Page 1 of 1 (latest)
Yes, but can I just post it here?
Yeah
acct_1KO0CLPaTpr8efiv
The most recent account.updated event does appear to show that charges and payouts are enabled for that account. Can you show me how you're making the request to retrieve the account?
Yes
var stripeAccount = await _accountService.GetAsync(stripeAccountId);
_accountService is instance of AccountService
The rest of the data is valid - mail, country, type and so on
@pulsar ibex
Hey there ๐
Toby had to step away
I can certainly take a look
Thanks!
can you paste the response object that you get here? Because like toby mentioned I also see its enabled.
thanks give me a few to look into it
Thanks!
Hi there! Stepping in for @wicked salmon as he needed to step away. Give me a moment to get caught up.
Can you test using cURL to retrieve the account in your Terminal and let me know if you see the same thing?
I can't do it, I can only do it with stripe api
Yes and also I can't really do curl
Is there a way we can confirm that you aren't seeing stale data? Can you make a small change to the account like add a piece of metadata, retrieve the account again and provide the data you see on your end?
Can you do the above with acct_1KO0CLPaTpr8efiv?
Add metadata, re-retrieve the account, show me what you get?
What do you mean by add metadata?
Do you have access to your platform Dashboard?
If you view the Connected Account you can edit the metadata right in the Dashboard
And just add something like test: 123
I don't really have access to the dashboard(it's complicated), but why would the data be stale?
Because you could be storing the data and then pulling up old data. You simply provided a screenshot of data in a form. I have no idea how that data was set up.
I'm trying to verify whether there is a bug or not.
I could give you the screenshot of retrieval of other account
I think this will help
var stripeAccount = await _accountService.GetAsync(stripeAccountId);
_accountService is instance of AccountService
@plain dust
Can you paste that account ID
Thanks! Give me another moment to look at this account
Thanks, I really appreciate the help!
Oh.. that account is disabled.
So that seems correct in this case
Like I am seeing charges/payouts disabled for that account as well
Thanks!
Yes
`[ApiController]
[ApiVersion("1.0")]
[Route("v{version:apiVersion}/[controller]")]
public class RetrieveAccountController : ControllerBase
{
#region Private Fields
private readonly AccountService _accountService;
#endregion
#region Ctor
public RetrieveAccountController(
AccountService accountService)
{
_accountService = accountService;
}
#endregion
#region API
[HttpGet("TestRetrieveAccount")]
public async Task<ActionResult<Stripe.Account>> GetAccount(string stripeAccountId)
{
var stripeAccount = await _accountService.GetAsync(stripeAccountId);
if (stripeAccount == null)
{
return StatusCode(StatusCodes.Status500InternalServerError);
}
return Ok(stripeAccount);
}
#endregion
}`
The account service is injected with DI
Dependency Injection
Can you make a standalone app/code that would be a lot more basic to just retrieve the account directly?
Yes the non picture is above
No the apikey is a secret
what does that mean? Isn't it your own account?
Yes
So you have the API key right?
Yes, but I can't really do the curl
why?
I don't how to do it
I configured just the code for retrieval
Anyway, why will it help?
Because it's way easier to run one command in a Terminal than try to debug your code with dependency injection and screenshots of the debugger
you've never used the command line on Windows or done a curl request there?
No
I don't think the issue is with my code
I get the account
Just with wrong values in the payouts_enabled and charges_enabled
I understand but that's the part we need to debug exactly
@plain dust told me that you can see what was retrieved in the account
I work for Stripe, let's focus on just my questions if possible
all good, just a lot of back and forth, so let's focus on one question at a time
1/ Can you explain why you can't do a simple curl call on your Windows machine with your Stripe account's secret API key
I don't know how to do it.
Can you send me the exact command for the cmd
Sure, but have you ever used the command line and done a curl call?
no\
Okay so let's try first. Can you run this in your command prompt on windows with your real API key. Don't show me the results yet, just try it and tell me if you get an error or if you seem to get the Account object back
curl https://api.stripe.com/v1/accounts/acct_1KWiSmPn4opStRsp -u sk_test_123
it's asking for a password after I changed to my key
ah my bad sorry bad copy-paste, you need a : after the key curl https://api.stripe.com/v1/accounts/acct_1KWiSmPn4opStRsp -u sk_test_123:
ok, I get the account with the right data
payout_enabled : true
charges_enabled : true
phew
perfect, so now we know this is 100% a bug in your code!
Now I know what to focus on to help you debug
Weird
2/ Can you re-run your code for that exact account acct_1KWiSmPn4opStRsp to confirm that you still see false in your code?
(just in case it just changed for some reason)
perfect
Now we know it's a bug in your code!
3/ Let's debug your code together!
So before we dive too deep, how easy is it for you to just "run" some dotnet code, independent from your main app?
like if I give you some roughly exact Stripe code, can you easily run it?
I think so
But I don't really understand why would the data return with the right values for some fields and wrong values for other fields
you'll see!
Perfect! can you run this:
// Put your API key here
StripeConfiguration.ApiKey = "sk_test_123";
// Retrieve the account
var service = new AccountService();
var account = service.Get("acct_1KWiSmPn4opStRsp");
// Print what we care about
Console.WriteLine("Account id: " + account.Id);
Console.WriteLine("payouts_enabled: " + account.PayoutsEnabled);
Console.WriteLine("charges_enabled: " + account.ChargesEnabled);
Can you run ^ end to end and show me the exact output?
(sorry its + to concat in .net not ,)
yeah I think it's the comma versus +
but okay you have the right values again, so the API works totally fine
Now it must be a bug in your own code
Can you do the same thing in your own code: print the entire object right at the place you retrieve it, to confirm you are calling that API?
It's a non console app
sure but usually you have a way to print something somewhere
a file, a UI screen, etc.
But I looked at the object in debug
yeah but clearly what you're looking at is not what you think it is
What do you mean by that
well in your debugger you see false, you were convinced our API was wrong, we've proven it's not
Maybe turn var stripeAccount = await _accountService.GetAsync(stripeAccountId); into var stripeAccount = await _accountService.GetAsync(stripeAccountId); var payoutsEnabled = stripeAccount.PayoutsEnabled; and then do a breakpoint on that line of code
I checked it even without the debugger
in asserts
var payouts = account?.Settings?.Payouts;
var debitNegetiveBalances = payouts?.Debit_negative_balances == true;
var Interval = payouts?.Schedule?.Interval == "weekly";
var WeeklyAnchor = payouts?.Schedule?.Weekly_anchor == "tuesday";
I checked other things that are related to the payouts
@wintry pasture
that's not really relevant to what I am asking
Like just to restate this: it is 100% a bug in your code/logic. I've proven to you that the API responds the right information even with your .NET library
I don't know what is causing it yet, I've given you a clear next step though
But I don't really understand what could cause this.
Why would I get the right data, just with invalid charges and payouts?
In which scenarios this is happening?
I get status code 200, so this is really weird @wintry pasture
Without being too pushy: I recommend you try the step I told you to try though
This can only be a bug on your end, I'm helping you debug. I've given you the best next step, can you try that exact step?
I mean it can't be false
I'm sorry, I'm running out of ideas on how to help you here. It's impossible for the exact same code to give false in some case and true in others
are you sure the account id is set properly?
Yes
This is really weird
Theese are the right values other than the payouts and charges
Yeah I'm fairly convinced it's impossible and you must be mixing your variables somewhere. Like try, right below that code, hardcode what we did earlier and display the exact real values
I'm sure this 100% something in my code
Try to add more to your code, hardcode the retrieve with the hardcoded id
store it in another variable
and look at that variable's value
But for helping me debug this, at what scenario does it send these values differently
Already did it
So when you hardcode the exact same lines at the point of your public async Task<ActionResult<Stripe.Account>> GetAccount(string stripeAccountId) it still doesn't do what it should?
Yes
I'm... dubious that's possible. I wonder if it's a mixup with async/await and it not doing what you think
Hi ๐ I'm stepping for @wintry pasture
There's a lot here. Give me a minute to catch up
Hi
So what is going on with the GetAccount
So, it's getting the right values partially
I get the right email and country, etc...
But I get false values in the payouts_enabled and charges_enabled
Even though in any other way we tried I got true in these values
What I mean is, our .NET library is set up to start with something like this:
ar service = new AccountService();
service.Get("acct_1JticYIlCeH6bP8R");
Is your function doing this behind the scenes?
Trying to understand but there's a lot going on here.
I'm not super familiar with .NET either. Do you have any request IDs?
don?
Do you mean account ID?
Can you move me to someone who knows .net?
I'm speaking to you for 3 hours
The Request ID for the API call: 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.
You can also get it in your dashboard: https://dashboard.stripe.com/test/logs or https://dashboard.stripe.com/logs
This is pretty much the last ones
Nobody used this account other than me
@wintry glen
I'm still catching up. What is the account ID that are you making this retrieve call from?
it's any account Id but we can take this one as an example:acct_1KWiSmPn4opStRsp
Please I need you to help me I'm more than 4 hours in this conversation
@wintry glen
I understand, I was reading through the previous messages.
So just to recap, curl and a small application calling get on this account retrieves the right data, but not calls from your applicaiton
I need to understand in which scenario it's sending this changed data
Yes
I disagree with the guy I talked with before, something on your end sent me this wrong data
This is the data I got from you
Can you run this code again and then print the request ID from the last request on the Account object?
Console.WriteLine(stripeAccount.RequestId);```
Maybe something in my code caused this but this is the data I got from you
This is not one of the properties of the object
@wintry glen
Right. And I want to make sure that the request from your app is matching up with what is expected. The question is still what the difference is between the small snippet that is working and your app where it isn't
Expected: payouts_enabled : true
charges_enabled : true
Actual: payouts_enabled : false
charges_enabled : false
Fixed it
That is awesome to hear. What did the difference end up being?
No I fixed the message๐
Expected: payouts_enabled : true
charges_enabled : true
Actual: payouts_enabled : false
charges_enabled : false
I still get these values
Okay that makes more sense. For a second I thought I was remembering the wrong values being false
And you made that request from acct_1KWiSmPn4opStRsp? Or is that you retrieving acct_1KWiSmPn4opStRsp itself?
I'm retrieving this account
What is the ID of the account that is making these calls?
The one that owns your API key?
Oh probably acct_1K9Tr0Bk1m8yYJJk
Yes
I am not seeing a GET request for acct_1KWiSmPn4opStRsp on your account.
Can you try this after getting the account? The ID will help me find it var stripeAccount = await _accountService.GetAsync(stripeAccountId); Console.WriteLine(stripeAccount.RequestId);
As I said the requestID isn't part of the object
Anyway, i've just seen the acct You put above
acct_1K9Tr0Bk1m8yYJJk
I don't know where you got it from
That is the platform ID of the account that acct_1KWiSmPn4opStRsp is connected to
What version of stripe-dotnet are you using?
If you go to your dashboard and filter for get requests, do you see this recent request to get acct_1KWiSmPn4opStRsp that you made? https://dashboard.stripe.com/test/logs
The others that I talked to found these requests
39.93.0
@wintry glen
@wintry glen
That version should definitely have the request ID as part of the object. Are you saying that that does not exist at all on your account objects or that it is empty?
Also I promise this thread is high priority for me, the pinging me does not get me to respond faster. I have to look for this request ID in slower ways as it is not showing up in the typical ones
Sorry
The type of the object is Stripe.Account
As you can see here - the request id isn't one of its properties
Checking in to it on my side. Or hopefully I will find the other request ID before then
Thanks!
I am still looking and having trouble finding this. Will need a few more minutes
All good
And just to recap what has already been tried: you have done the standard get instead of awaiting the async one in the exact same place in your code and that got the outdated data?
Yes
Any Updates?
I've found these requests and they still look fine from our side. Really wracking my brain at what the difference might be between your app and the small piece of code you ran
Yes, this is really weird
Just so I have another clean case on my side, can you run the small snippet of code that works again?
Thank you
Thank you for the help!
The only difference I am seeing on my side is the .NET client version. 39.93.0 vs 39.97.0. As a quick sanity check, can you downgrade your standalone code to 39.93 and see if that is somehow what is making the difference?
The changelog doesn't make it sound like this should change but that is one of the few things I can see that are different between them at the moment.
my version is 39.93
Oh and are the two projects the same .NET version?
Yes
Right, the small sample snippet you are doing is 39.97
So , I don't really get what you mean
My version is 39.93, so I shouldn't do anything, right?
I can see this call in your logs and it mentions that the call came from the 39.93 version of the libraryhttps://dashboard.stripe.com/test/logs/req_Yv1ygYUFLD76bE
It honestly shouldn't as far as I can tell. Capabilities were added in 93 and it doesn't look like there have been changes since.
No you shouldn't. And actually don't do that test. It should not affect it at all from what I can tell.
Ok