Refunds with missing tender_id

Hello,
We are making accounting integrations. We have found multiple customers in the last month that have missing tender_id. There is one example refund:

{
  "id": "VZuFO5n4aJVB2Eeu2sJp1tcIBy97pXc5O4eZINh6nyE",
  "location_id": "L5A9S0EGQVKRX",
  "transaction_id": "rEXun3SkeJFNJ4a8z3gcX43fpwUZY",
  "created_at": "2024-12-16T02:46:37Z",
  "reason": "Returned goods",
  "amount_money": {
    "amount": 1000,
    "currency": "AUD"
  },
  "status": "APPROVED"
}

According to the documentation of the Orders → Refunds, the tender_id is a mandatory parameter. Your assistance on explaining why such orders appear would be appreciated.

Thank you.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Retrieve Refunds
Refund Payments
Refunds and Exchanges

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

This looks like something from the Transactions API for tender_ids. Are you not using the Refunds API? :slightly_smiling_face:

Hey, thanks for the response. Actually, we are using the Search Orders API. A related order is rEXun3SkeJFNJ4a8z3gcX43fpwUZY, but there is also no source_order_id that we could use to identify a related Refund Payments.
It seems that these orders don’t have payments or source orders. Even the returned line item is a “Custom Amount”.

Okay, this is an unlinked refund which is why you don’t see the original source_order_id. :slightly_smiling_face:

Thanks @Bryan-Square . That was amazing, really appreciated.