Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to find a order based on the Authorization Key

How to find a order based on the Authorization Key

Calzzetta
Visitor
2 0 0

I have a list of authorization keys from my payment gateway and want to match Shopify's orders. Using the admin's search bar I can find the order, but I was not able to find an endpoint from the API to do the same. Is there a way to find a shopify's order or transaction based on the authorization key from the payment gateway?

Replies 3 (3)

HunkyBill
Shopify Partner
4853 60 571

An order has transactions. So using the order ID, you ask for the transactions for the order. Each transaction has details including the authorization code used. You just need to use that pattern of first getting the order ID you're interested in checking, then looking through the transactions for a match from your gateway. So your active filter on orders would help you here, by avoiding checks on closed orders. You might to only check open orders or unfulfilled orders, to limit the order space you check.

 

Kinda like looking for needles in a haystack right?

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Calzzetta
Visitor
2 0 0

Hi Hunly,

 

Thank you for your explanation, but I have a list of Authorization Keys from the Payment Gateway and not a list of Orders or Transaction IDs.

The point is that I can check Shopify -> Payment Gateway but not Payment Gateway -> Shopify.

 

Regards,

Douglas

 

HunkyBill
Shopify Partner
4853 60 571

I guess you're onto it now. Having payment authorizations in your hand will be next to useless for you, since they are buried in transactions which are owned by orders. So at some point, you'll have to man up, and get yourself orders and transactions if you want to match to payment authorizations. 

 

You got it.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com