Should I use a Shopify Webhook or a Flow Trigger?

Topic summary

A developer is building a B2B app to capture the last 4 digits of a payment method when draft orders are created and attach this information to orders via notes or tags.

Two Implementation Approaches Under Consideration:

  • Shopify Flow triggers (using the draft order created trigger)
  • Shopify Webhooks (using the draft order created webhook)

Key Technical Insight:
The Shopify API team confirmed that creating a custom app with a partner account and proper permissions would enable access to the vaultedCreditCard.lastDigits field through the Admin GraphQL API.

Current Status:
The developer initially attempted using a Flow-based solution to retrieve the last 4 CC digits and apply them as order notes, but this approach did not work. They’re now seeking clarification on which method (Flow triggers vs. Webhooks) would be more suitable for this use case.

Summarized with AI on November 14. AI used: claude-sonnet-4-5-20250929.

Hi there,

I am looking to develop an app for a b2b store that gets the last 4 digits of payment method selected when a draft order is created and then attaches it via a note or tag to the order using the API.

I’ve been looking at our Flow app and noticed you can create apps that use a flow trigger to run the app action. I see the draft order created as a potential trigger. Then I saw that you can use Shopify Webhooks where I could run the app on the draft order created webhook.

I am just a little confused and wondering if anyone can explain to me what the difference between these approaches is? Which route is better? I originally tried to create a flow based on the draft order created trigger that got the last 4 cc digits and applied a note to the order but it did not work.

I contacted support about this and received the following:

The API team provided the following insight about this: If you create a custom app with a partner account and grant the correct permissions then this app would be able to access the vaultCreditCard.LastDigits.