#OpenExO
1 messages · Page 1 of 1 (latest)
Hi there
Haven't used those tools but maybe I can help?
What are you seeing/trying?
I don't know where to put the expand call to query the discount/ promo data from a user subscription
I want to get what Discount the customer used
on checkout
And you are using Stripe Checkout here?
yeah
Hello! I'm taking over and catching up...
i tried lots of things in the body part of the request
I'm also not familiar with this tool, but is there an option to specify the body as form or URL encoded?
If not, maybe try expand[0]=subscription.discount.coupon and see if that works?
No, it's not a header, you need to add the expand property in the body of the request.
Or, actually, you can do it in the query string there.
What does it look like if you expand that part of the UI?
Like if you click on add item there?
Ah, okay, you can do it in there. For the key add expand[0] and for the value add subscription.discount.coupon and then remove what's in the body and try again.
idk if it did anything, it'd fall under one of those expansions right?
Can you give me the request ID for your request? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Oh, hang on, the discount on the Subscription isn't expandable, and the coupon on the Discount also isn't expandable. They're already full objects. All you should need to expand is the subscription on the Checkout Session.
The request you provided is to create a Customer, but that's okay, I think I can find the request from here...
Are you doing this in test mode or live mode?
Should be live
and I'm request a specific customer I know used a discount
I see, it was filtering out 'get'
although....
all these are Hubspot requests..........
Hm, I'm not seeing the request here. Is it on a different account perhaps?
are you able to see my API keys I genn'd?
I'm using the 'Make.coms' one specifically, says I've used it 118 times so far - so it's doing something
req_aLgKy5QyMXTwNP
ok, found a request ID from it
Looking...
Ah, okay, so there are two issues here. First you're trying to fetch a Customer, but I thought you wanted to fetch a Checkout Session? Second, you only need to expand subscription, not subscription.discount.coupon.
Yeah I switched to requesting a customer that I knew used one, to see if ti worked
my goal is to request all customers who used a discount...
but... didnt know what I was doing wrong
so should it be: /v1/customers + the expand Subscriptions? or would that only give me the last 10 customers, and they might not of even subbed
or
Could I request a promo/ coupon and expand the customer list?
Are you trying to get the Coupon used during a specific Checkout Session or the Coupon associated with a Customer?
Coupon associated with the customers
like ultimate goal, These users: XXXXX used this coupon: FREE20
Okay, so you don't need to expand anything then. Retrieve the Customer using their ID and look inside their discount property.
but how do I see everyone who used a specific coupon?
without looking them up individually?
This is what I was doing originally with a user who has used a discount/ promo code but it doesnt show it
You can list Customers and look at the discount on each one: https://stripe.com/docs/api/customers/list
So I think there may be a misunderstanding. Just because a particular Customer uses a promo code at one point it doesn't mean that Customer will be assigned the associated discount/coupon at the Customer level. That discount may have only applied to that one transaction.
ah I see
is there a way to request the user redemptions who used the code? the coupon product?
I believe you can see that in the Dashboard, but I'm not sure if it's available via the API...
ah ok - that's really want I needed to deliver to Hubspot.. hmm
There's a times_redeemed property on Promotion Codes: https://stripe.com/docs/api/promotion_codes/create
But if you want to know who specifically redeemed them and when you would need to list Checkout Sessions and look for ones with a discount.
We have auto-pagination built into our libraries: https://stripe.com/docs/api/pagination/auto
But if you're not using one of our libraries you need to pagination manually: https://stripe.com/docs/api/pagination
Parameters I'd put in the same place as expand?
Yes, more or less. Do you know anyone who has a lot of experience with HTTP and setting query parameters and whatnot who can assist you?
not atm
Doing this manually would be tricky. Can you use one of our libraries instead?
I see, I was hoping to do it all in the Make.com platform for the sales/marketing team to direct it to whereever and use in different places
It seems like it would be possible to do it there, as you can make API requests, but it would be a lot more difficult than using one of our libraries and writing a bit of code to do it.
But you can use the API reference and translate the curl commands into the raw HTTP requests in Make.com's system.
Mmm ok
It seems like Make.com has a Stripe integration with some additional features. Have you looked at this? https://www.make.com/en/help/app/stripe
Yeah seems most of them are just prewritten API calls
Maybe I could use Watch event
and just go from here on and look for discount code use
ok maybe not...
That might work if all you care about is future activity.
Yeah, atm anything that could work haha and then just manually do the exisitng
If you're using Stripe Checkout try listening for checkout.session.completed Events and see if that gives you the info you need.
for the specific customer? or which would be the specific API call?>
No, in the Watch Events thing.
The idea would be that you set up Make.com to listen for checkout.session.completed Events, and then every time someone completes a Checkout Session you'll get the Checkout Session in the watch thing and can handle it from there.
You can't expand the Event, but maybe you can trigger a GET request that fetches the Checkout Session with the subscription expanded?
it doesnt allow me to edit the watch event item
it only allows me to look at a specific webhook
What options do you have? Like, what's the point of setting up a watch if you can't do anything when one of those events happens?
then their help item is: https://www.make.com/en/help/app/stripe
which only shows how to create an API key...
:l
So in Make.com what does a Trigger do?
They trigger some other step or process, right?
Okay, so can you set up a trigger for checkout.session.completed Events and then trigger whatever workflow you want when someone checks out?
let me see if I can
I cant make a trigger based on Stripe stuff :l - So I'll just have to figure out getting checkout session list and parsing it or something for discount use
I wish I had a better answer for you @shrewd citrus, but we don't have a lot of context on 3rd party connectors/plugins. Let us know if you have any other Stripe-related questions though