Get the shopify_payment_id for a flow

Get the shopify_payment_id for a flow

mister_sliner
Shopify Partner
2 0 0

Hi everyone, I am trying to find out if there is any way to automatically add the "shopify_payment_id" as a tag when it is generated in the order.
Does anyone have an idea or know the tag or another way to get this ID.
Unfortunately it is not in the Order.json either.

 

 

2024-08-12 17_16_34-Liebgedacht · Bestellungen · LGD-1067 · Shopify.jpg

Replies 4 (4)

heddykhalifa
Shopify Partner
51 6 16

Hi there,

I understand you're looking to automatically tag orders with the shopify_payment_id. Unfortunately, since this ID isn't included in the Order.json file, it's not straightforward to pull it in automatically.

However, you can explore a couple of workarounds:

  1. Shopify Flow (if available): If you're on a Shopify Plus plan, you can use Shopify Flow to create an automated workflow that triggers when an order is paid and then tags the order. While Shopify Flow doesn't natively support adding the payment ID as a tag, you could potentially use it in combination with an app or a custom script.

  2. Custom App or Script: Another option is to create a custom Shopify app or script that listens for order creation or payment events via webhooks. Once the payment ID is generated, the script could automatically add it as a tag to the order.

  3. Manual Entry: As a last resort, you could manually add the payment ID as a tag by copying it from the order details and pasting it into the tag section of the order. I know this isn't ideal, but it could work in the short term.

I hope one of these solutions helps! If you’re comfortable with some coding or working with a developer, the custom app/script route might be the most efficient for your needs.

Best of luck!

RPiii
Shopify Staff
22 1 5

Thanks for mentioning Shopify Flow! Unfortunately, some of the details are inaccurate.

 

It's possible to create a workflow in Flow triggered by Order created and then using an Add order tags action to tag the order with the payment ID using liquid (likely {{order.paymentTerms.id}} but I'm not sure).

Also, Flow is available on most plans as it's no longer limited to Shopify Plus.

mister_sliner
Shopify Partner
2 0 0

Thanks for the reply. 
Unfortunately this does not work

Jeff-Armstrong
Shopify Staff
35 3 3

You may need to use the Order paid trigger to ensure the payment details are available on the Order before the workflow triggers.

To learn more visit the Shopify Help Center or the Community Blog.