Manually redeem a gift card

Hi NikolaStanchev,

From looking into this it seems that the Admin API does not currently support the redemption of gift cards programmatically. The gift card system is tightly integrated with the Shopify checkout and does not expose an API endpoint to apply gift cards outside of it.

However, you can consider a workaround where you create a discount code programmatically that’s equivalent to the gift card amount and apply it to the order. Here’s how you can create a price rule and a discount code using the REST Admin API:

    • Create a price rule: POST /admin/api/2022-01/price_rules.json
    • Create a discount code: POST /admin/api/2022-01/price_rules/#{price_rule_id}/discount_codes.json

Note that this is a workaround and may not provide the exact functionality of a gift card, but it might work for your use-case?

Hope this helps!