#umar_69-connect

1 messages ยท Page 1 of 1 (latest)

gentle willow
#

HEllo! Starting up a thread for you

vivid musk
gentle willow
#

How did you just create it? Were you creating it through the API?

vivid musk
gentle willow
#

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?

vivid musk
#

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

gentle willow
vivid musk
#

That successfully works on my program but i would like the accountID to be dynamic

gentle willow
#

What exactly do you mean by dynamic? Your code can retrieve whatever account it wants to by changing the account ID

vivid musk
#

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

gentle willow
#

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

vivid musk
#

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

gentle willow
#

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,

vivid musk
#

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

gentle willow
#

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;
vivid musk
#

ohhh @gentle willow

#

you are a genius

#

you are genius

#

i just didn't apply a variable to the request

#

$acct = $stripe->accounts->create([ -- this line code

#

is amazing

#

it has help alot

#

i love you karbi , ive been error for like 10 days

#

ahh man

#

thank you