#darkon7446

1 messages · Page 1 of 1 (latest)

azure ravineBOT
daring oar
#

Hi there!

#

Not sure if that's possible. Having a quick look.

subtle fox
#

whit this api $stripe->coupons->all(['limit' => 3]); there is a field reedem_by

#

but it's null

daring oar
#

But there's no way to list all Discount objects.

subtle fox
#

so there is not solution?

daring oar
#

Give me a few minutes to look into this.

subtle fox
#

ok thanks

plucky bridge
#

I don't know how many Customers you have, so it might not be feasible if there's too many

subtle fox
#

ok, in this moment they are not so much so i can use this. Hope in the future they will create an api that has a promocode as input and return all customers. Thank you.

#

there is a problem, i listed all customers that have a promo active, but discount field is empty :/

plucky bridge
#

What do you mean by "customers that have a promo active" exactly? Is it on the Customer object or on Subscription?

subtle fox
#

sorry, i listed all my customers and the ones with a promo actived has discount field empty

#

they have a subscription

plucky bridge
#

Could you please share one example ID? I think the Coupon might be applied to the Subscription object and not to the Customer.

subtle fox
#

here an example of subscription:

#

ah no wait

#

i found it, sorry

plucky bridge
#

In short, if the discount/coupon is applied when you create a Subscription, you will find it on the Subscription object and not on the Customer object.

subtle fox
#

yes clear now

#

i need to make another customer call to get name of customer but ok

plucky bridge
#

You could expand the customer field on the Subscriptions. But that would result in more latency as you would need to get the Customers even for the Subscriptions that don't have the required Coupon. So yeah, your latest solution is the best in this case.

azure ravineBOT