Discount code response Api

Topic summary

Topic: How to programmatically determine the status of a discount (coupon) code during checkout, and whether an API or webhook can return that information.

Key update: Recommendation to use Shopify’s orders/create webhook (Admin REST API). When an order is created, the webhook payload includes discount details under the discount_applications field (screenshot provided). Documentation link was shared.

Clarifications: A webhook is a server-to-server notification sent when an event occurs. The discount_applications field lists discounts applied to the order.

Open issue: The webhook fires after checkout (once the order is created). The requester wants a mechanism that triggers only when a specific coupon code (e.g., “XXXXXXX”) is applied, not for all orders. No solution was provided on filtering or limiting triggers to a specific code within the webhook setup.

Status: Unresolved; further guidance needed on code-specific triggering or filtering.

Summarized with AI on December 24. AI used: gpt-5.

How do I get the status of the discount code when the user checkouts using that coupon code?

In this case, is there any API for getting this coupon code response or web hook?

Hi @Arun-A ,

You can using the “order/create” webhook, you can automatically get notified whenever an order is created and check the status of any discount codes used in that order.

You can refer it here: https://shopify.dev/docs/api/admin-rest/2024-01/resources/webhook

All discount information will be in field ‘discount_applications’.

It will trigger when all checkouts are done; I want to specify only trigger when the ‘XXXXXXX’ coupon code applies. How to do that