# Refund Issue: Return payment as store credit, shows original tender, not giftcard

**URL:** <https://developer.squareup.com/forums/t/refund-issue-return-payment-as-store-credit-shows-original-tender-not-giftcard/5962>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [May 16, 2022, 8:40pm UTC](https://developer.squareup.com/forums/t/refund-issue-return-payment-as-store-credit-shows-original-tender-not-giftcard/5962 "2022-05-16T20:40:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMacAgTrax](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@JMacAgTrax](https://developer.squareup.com/forums/u/JMacAgTrax)\
**Post date:** [May 16, 2022, 8:40pm UTC](https://developer.squareup.com/forums/t/refund-issue-return-payment-as-store-credit-shows-original-tender-not-giftcard/5962/1 "2022-05-16T20:40:08Z")

</div>

In our integration with the Square API, we go out and get the latest orders using [connect.squareup.com/v2/orders/search](http://connect.squareup.com/v2/orders/search). We then pass that information to a third party for record keeping. But we have an issue in regards to doing a refund to store credit instead of the initial tender type.

If you issue a refund and set it to return as a giftcard instead of the original tender, in the order json I’m not seeing any indication that it returned as a giftcard. It simply shows as being a refund for the original tender type. We need to be able to distinguish the difference before passing it to the third party. Any ideas would be much appreciated.

Below is a test example of the initial order JSON tenders and the following refund using giftcard as the tender type. Notice that the tender\_id matches the initial tender.

Initial Order Tenders:

```auto
"tenders": [
                {
                    **"id": "vhjZJIMlu5pCxIM8z6ogUhJguaB",**
                    "location_id": "LB.....",
                    "transaction_id": "tx9VLgaXa...",
                    "created_at": "2022-05-16T19:43:57Z",
                    "amount_money": {
                        "amount": 2208,
                        "currency": "USD"
                    },
                    "processing_fee_money": {
                        "amount": 0,
                        "currency": "USD"
                    },
                    "type": "CASH",
                    "cash_details": {
                        "buyer_tendered_money": {
                            "amount": 2208,
                            "currency": "USD"
                        },
                        "change_back_money": {
                            "amount": 0,
                            "currency": "USD"
                        }
                    }
                }
            ]

```

Refund:

```auto
"refunds": [
                {
                    "id": "khabZAllR....",
                    "location_id": "LBWBN....",
                    "transaction_id": "tx9VLgaXaiH...",
                    **"tender_id": "vhjZJIMlu5pCxIM8z6ogUhJguaB",**
                    "created_at": "2022-05-16T19:44:59Z",
                    "reason": "Returned Goods",
                    "amount_money": {
                        "amount": 2208,
                        "currency": "USD"
                    },
                    "status": "APPROVED"
                }
            ]

```

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [May 16, 2022, 10:12pm UTC](https://developer.squareup.com/forums/t/refund-issue-return-payment-as-store-credit-shows-original-tender-not-giftcard/5962/2 "2022-05-16T22:12:31Z")

</div>

👋 At this time the team is aware that this isn’t a good experience and are working to make this better. There are a series of work arounds but none of them are ideal work arounds. For example:

> If you are using `SearchOrders`, and you parse an order with a `refund` on it….if that `refund_id` is not returned by ListRefunds or GetRefund, then you know its a refund to a Gift Card. You can use `ListGiftCardActivities` and look up the refund there…the `tender_id` on the refunded order will match the `payment_id` of the UNLINKED\_ACTIVITY\_REFUND from Gift Card API. 🙂
