#umar_69-connect
1 messages ยท Page 1 of 1 (latest)
๐
i was thinking of using : https://stripe.com/docs/api/accounts/list?lang=php but this only grabs a list of accounts . When i just need a specific accountID that I recently created from the program
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How did you just create it? Were you creating it through the API?
that is correct, i created using the account api. Please see link below ... https://stripe.com/docs/api/accounts?lang=php
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If you just created it through the API you should have that account ID right there - and then you can use the API to retrieve that specific account. Is that the piece you're having trouble with?
yes that is exactly the trouble I'm having . i successfully make an account and i can see it on dashboard , but in term of getting that specific account id . I'm just having problems with that. I would like to make the program to create an custom connected account and then print the account id to save into the DB
If you have the account ID you should be able to retrieve it: We show an example here - https://stripe.com/docs/api/accounts/retrieve?lang=php
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That successfully works on my program but i would like the accountID to be dynamic
that why i need to grab the accountID , when i create a custom account - so i can store it in the DB and then i can retrieve using the code in the link below : https://stripe.com/docs/api/accounts/retrieve?lang=php
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What exactly do you mean by dynamic? Your code can retrieve whatever account it wants to by changing the account ID
dynamic in the sense , that the accountID changes each time the request is put through . the issue, i am having is : i am unable to grab the accountID using code . i can easily place a static variable that will show 1 accountID and retrieve information about that but i would like it to be dynamic so that it changes on the request. so i don't need to place it manually
Let's back up - what specifically are you trying to do? It sounds like you have all the pieces you need (you create the account through the API, you have the account ID from the creation request and can use it to retrieve the account), so I'm not following what piece you're missing
i just need to store the accountID into DB. i can do that by copy the accountID on the dashboard and updating a column. BUT i would like automate that task by fetching the accountID once a account is generated using the API
Why do you need to re-fetch the account after it's been created? If you're creating the account through the API you should be getting that account ID back in the API response from creation,
how do you get the account ID from the api response ? , i have tried several methods but i just cant seem to get it
i was able to get customerID,requestID but not accountID
Can you share the request ID?
You should be able to do it just like this:
$acct = $stripe->accounts->create([
'type' => 'custom',
'country' => 'US',
'email' => 'jenny.rosen@example.com',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
]);
echo $acct->id;