A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
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 https://community.shopify.com/c/api-announcements/gift-card-requirement-on-gift-card-transactions/m-...
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"
}
}
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.
Best,
To learn more visit the Shopify Help Center or the Community Blog.