Gift Card not deducted when creating order

Shopify Partner
5 0 4

Hey there, I am trying to create an order through the Rest API where I am adding a Gift Card transaction; I am able to create the order with the proper transaction but the relevant gift card is not deducted for the charged amount.

I found this thread which mentions the same issue but a solution was not provided

As mentioned in this thread, I tried refunding another order created the same way and it does show up in the gift card timeline, but not the orders made using the gift card.

Any input on this issue will be highly appreciated.

Edit: the following is the transaction block of the request

  "kind": "sale",
  "status": "success",
  "gateway": "gift_card",
  "amount": "15.00",
  "gift_card_id": <gift-card-id>,
  "gift_card_last_characters": "1g94",
  "receipt": {
    "gift_card_id": <gift-card-id>,
    "gift_card_last_characters": "1g94"
Reply 1 (1)

Shopify Staff (Retired)
193 36 53

Hello @MrBasicX ,


Thanks for checking in.


What you are seeing is an expected behaviour. When it comes to API, an important thing to consider is that a transaction record (what you see in the transactions.json) is not in itself a payment processing event. In order for an entry to that record to be meaningful, you have to also perform the necessary payment processing operation to go along with it, otherwise it's just a record of something that never actually occurred. You can think of processing gift cards as extremely similar to processing credit cards, and will require the use of the Checkout API in order to complete.




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