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.
Topic summary
Goal: Automatically add the shopify_payment_id (payment identifier) as an order tag when it’s generated. OP notes it’s not present in Order.json. A screenshot is included but not essential to the solution.
Proposed approaches:
- Shopify Flow: Use a workflow to add a tag once payment data is available. One suggestion tried Order created + Add order tags with a Liquid variable (e.g., {{ order.paymentTerms.id }}), but OP reports it doesn’t work and the exact Liquid field for shopify_payment_id is unclear.
- Trigger timing: A follow-up advises using the Order paid trigger so payment details exist before tagging.
- Custom solution: Build a custom app/script using webhooks (order/payment events) to capture the payment ID and add it as a tag. Manual tagging is a fallback.
Clarifications:
- Flow availability: Corrected—Flow is available on most plans, not only Shopify Plus.
Status: Unresolved. Key open questions: whether shopify_payment_id is exposed to Flow/Liquid at all and, if so, which exact field to reference. Next steps: test Order paid trigger or implement a webhook-based custom app.
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:
-
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.
-
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.
-
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!
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.
Thanks for the reply.
Unfortunately this does not work
You may need to use the Order paid trigger to ensure the payment details are available on the Order before the workflow triggers.
