#FacuTerrens

1 messages ยท Page 1 of 1 (latest)

frank cobaltBOT
broken plank
#

Hello ๐Ÿ‘‹
Copying this here for full context

I want to know if there is a way to recover the id of this recently created product

white pawn
#

Hi!

broken plank
white pawn
#

ohhh okey!

#

i will check

broken plank
#

NP! ๐Ÿ™‚ Good Luck

white pawn
#

$stripe = new \Stripe\StripeClient(
'sk_test_4eC39HqLyjWDarjtT1zdp7dc'
);
$stripe->products->all(['limit' => 3]);

#

I run this, but how do I see the ids?

broken plank
#

echo $stripe->products->all(['limit' => 3]);

white pawn
#

Thanks

#

and what is the difference between Price and Product?

broken plank
#

Products describe the specific goods or services you offer to your customers.
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms.

white pawn
#

oh okey!

#

and if, for example, I want to save the value that $stripe->products->all(['limit' => 1]);
in an array, or a variable, to later put it in a DB using MySQL, what should I do?

hearty terrace
#

If you increase the limit to be higher than 1, the call itself will return a list of products

#

Well, technically that call would already return a list, it would just be a list of 1

#

Are you having issues accessing that list that is returned?

white pawn
#

What I can't do is grab the value of the id, since it shows me many values, and I just want to grab the id