Post-Purchase Extension: referenceId Cannot Identify Initial Order

In the post-purchase extension, we receive a referenceId in the inputData.initialPurchase object. However, this referenceId is completely different from the actual Order ID and has no direct relationship with it. Therefore, there’s currently no way to retrieve the Order ID within the post-purchase extension point.

Is the referenceId the checkout token by any chance? :thinking:

Not sure if its an option but if you use the thank you page instead, there is the order id present there :slight_smile:

I think no as referanceId is a totally different entity. also we don’t have an access of thankyou page from checkout extension.

You can extend the thank you page with a checkout extension which might also achieve what you’re looking for with post purchase.

There’s more info here About Thank you and Order status page customization

I got the patch — referenceId is actually the checkout token. Now I can proceed to attach it via webhook and GraphQL.

Great! I thought it might be that’s why I asked :blush:
I would recommend GraphQL as REST is being deprecated so will better set you up for future