I’m looking for a way to retrieve, in the post-purchase extension, the discount codes that the customer entered. According to the docs, I have access to the ‘initialPurchase’ but it does not seem to contain the discount codes that were used. Do you know a way to retrieve them?
But I don’t understand how I can retrieve the order or checkout from the post-purchase extension, as I don’t have access to the order id or checkout token in the Checkout::PostPurchase::Render and Checkout::PostPurchase::ShouldRender extension points.
I have access to the purchase reference id in inputData.initialPurchase but it seems useless to retrieve the corresponding order or checkout, isn’t it?
(I specify that I do not store the orders on my side)
I still can’t find a way to access the order id (or checkout token) in the post purchase extension, in order to get the discount codes. Does anyone have a solution?