#Ryan-Tech
1 messages · Page 1 of 1 (latest)
Sorry so after a payments gone through your hosted checkout.
it redirects back to a success page with the session id.
Is there a way i can retrieve what coupon code was used at checkout?
Got it! This should be possible, give me a few minutes to look into this.
Found it!
You need to retrieve the Checkout Session with expand: ["total_details.breakdown"]
And you'll see the promo code used.
Thanks i took a look
i retrieved a total_detail object as follows
{
"amount_discount": 19980,
"amount_shipping": 0,
"amount_tax": 0
}
oh wait im using api version 2020
changed to current and same object
Did you add this, as I mentioned above: expand: ["total_details.breakdown"]
This object won't be displayed by default, it needs to be expanded, as mentioned in the doc
sorry just saw that bit two second sill try again
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
Perfect all sorted
would you mind closing the thread then?