# Both charges and refunds in v2 orders

**URL:** <https://developer.squareup.com/forums/t/both-charges-and-refunds-in-v2-orders/2584>\
**Category:** Questions\
**Tags:** orders-api, payments-api\
**Created:** [May 21, 2021, 12:04am UTC](https://developer.squareup.com/forums/t/both-charges-and-refunds-in-v2-orders/2584 "2021-05-21T00:04:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@lance](https://developer.squareup.com/forums/u/lance)\
**Post date:** [May 21, 2021, 12:04am UTC](https://developer.squareup.com/forums/t/both-charges-and-refunds-in-v2-orders/2584/1 "2021-05-21T00:04:15Z")

</div>

I’m migrating from `v1/payments` to `v2/orders/search` to obtain a customer’s transactions. In `v1/payments` it is possible to have a payment with money being taken and money being returned. That is, the `total_collected_money.amount` can have a non-zero amount (e.g. 500) and the `refunds[].refunded_money.amount` can have a non-zero amount. All the sandbox data I’ve obtained from `v2/orders/search` seems to indicate this isn’t the case on those transactions. I’m searching only for orders whose state is `COMPLETED`. All the sandbox data has 0 values for `total_money.amount` and non-zero amounts in `return_amounts.total_money.amount`.

Is this always the case? For v2/orders are returns always a separate order object from a payment?

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [May 21, 2021, 4:36pm UTC](https://developer.squareup.com/forums/t/both-charges-and-refunds-in-v2-orders/2584/2 "2021-05-21T16:36:21Z")

</div>

Yes, refunds will always appear as a new/separate `Order` object with the refund information. It will also have a `source_order_id` so you know what the original `order_id` is, if you need to link it or look it up.

---

<div class="post-metadata">

**Author:** ![lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@lance](https://developer.squareup.com/forums/u/lance)\
**Post date:** [May 21, 2021, 4:48pm UTC](https://developer.squareup.com/forums/t/both-charges-and-refunds-in-v2-orders/2584/3 "2021-05-21T16:48:18Z")

</div>

Great! Thanks. I’ve been using that source\_id to make the connection and just wanted to confirm.

---

<div class="post-metadata">

**Author:** ![lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@lance](https://developer.squareup.com/forums/u/lance)\
**Post date:** [June 8, 2021, 3:28pm UTC](https://developer.squareup.com/forums/t/both-charges-and-refunds-in-v2-orders/2584/4 "2021-06-08T15:28:30Z")

</div>

@sjosey Thanks again for your help. I’m hoping you can help me with this order I came across from `v2/orders/search`. I’ve pasted the data below with the only changes being redacting any identifying information. Looking at the data it appears the customer return items and bought items at the same time and that the return value exceeded the purchase value resulting in a refund. In this case there are both non-zero values for `total_money.amount` and `return_amounts.total_money.amount`. It looks like this is something we should anticipate seeing. Is that correct?

```json
{
  "id": "[REDACTED]",
  "location_id": "[REDACTED]",
  "line_items": [
    {
      "uid": "[REDACTED]",
      "catalog_object_id": "[REDACTED]",
      "quantity": "1",
      "name": "[REDACTED]",
      "variation_name": "[REDACTED]",
      "base_price_money": {
        "amount": 50000,
        "currency": "USD"
      },
      "note": "[REDACTED]",
      "gross_sales_money": {
        "amount": 50000,
        "currency": "USD"
      },
      "total_tax_money": {
        "amount": 3875,
        "currency": "USD"
      },
      "total_discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 53875,
        "currency": "USD"
      },
      "variation_total_price_money": {
        "amount": 50000,
        "currency": "USD"
      },
      "applied_taxes": [
        {
          "uid": "[REDACTED]",
          "tax_uid": "[REDACTED]",
          "applied_money": {
            "amount": 3875,
            "currency": "USD"
          }
        }
      ],
      "item_type": "ITEM"
    }
  ],
  "taxes": [
    {
      "uid": "[REDACTED]",
      "catalog_object_id": "[REDACTED]",
      "name": "[REDACTED]",
      "percentage": "7.75",
      "type": "ADDITIVE",
      "applied_money": {
        "amount": 3875,
        "currency": "USD"
      },
      "scope": "LINE_ITEM"
    }
  ],
  "created_at": "2021-05-14T17:11:01.000Z",
  "updated_at": "2021-05-14T17:40:45.000Z",
  "state": "COMPLETED",
  "total_tax_money": {
    "amount": 3875,
    "currency": "USD"
  },
  "total_discount_money": {
    "amount": 0,
    "currency": "USD"
  },
  "total_tip_money": {
    "amount": 0,
    "currency": "USD"
  },
  "total_money": {
    "amount": 53875,
    "currency": "USD"
  },
  "closed_at": "2021-05-14T17:40:45.000Z",
  "total_service_charge_money": {
    "amount": 0,
    "currency": "USD"
  },
  "returns": [
    {
      "source_order_id": "[REDACTED]",
      "return_line_items": [
        {
          "uid": "[REDACTED]",
          "source_line_item_uid": "[REDACTED]",
          "name": "[REDACTED]",
          "quantity": "1",
          "catalog_object_id": "[REDACTED]",
          "variation_name": "[REDACTED]",
          "item_type": "ITEM",
          "return_modifiers": [
            {
              "uid": "[REDACTED]",
              "catalog_object_id": "[REDACTED]",
              "name": "6",
              "base_price_money": {
                "amount": 0,
                "currency": "USD"
              },
              "total_price_money": {
                "amount": 0,
                "currency": "USD"
              }
            }
          ],
          "applied_taxes": [
            {
              "uid": "[REDACTED]",
              "tax_uid": "[REDACTED]",
              "applied_money": {
                "amount": 4262,
                "currency": "USD"
              }
            }
          ],
          "base_price_money": {
            "amount": 55000,
            "currency": "USD"
          },
          "variation_total_price_money": {
            "amount": 55000,
            "currency": "USD"
          },
          "gross_return_money": {
            "amount": 55000,
            "currency": "USD"
          },
          "total_tax_money": {
            "amount": 4262,
            "currency": "USD"
          },
          "total_discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "total_money": {
            "amount": 59262,
            "currency": "USD"
          }
        }
      ],
      "return_taxes": [
        {
          "uid": "[REDACTED]",
          "catalog_object_id": "[REDACTED]",
          "name": "[REDACTED]",
          "type": "ADDITIVE",
          "percentage": "7.75",
          "applied_money": {
            "amount": 4262,
            "currency": "USD"
          },
          "scope": "LINE_ITEM"
        }
      ]
    }
  ],
  "return_amounts": {
    "total_money": {
      "amount": 59262,
      "currency": "USD"
    },
    "tax_money": {
      "amount": 4262,
      "currency": "USD"
    },
    "discount_money": {
      "amount": 0,
      "currency": "USD"
    },
    "tip_money": {
      "amount": 0,
      "currency": "USD"
    },
    "service_charge_money": {
      "amount": 0,
      "currency": "USD"
    }
  },
  "net_amounts": {
    "total_money": {
      "amount": -5387,
      "currency": "USD"
    },
    "tax_money": {
      "amount": -387,
      "currency": "USD"
    },
    "discount_money": {
      "amount": 0,
      "currency": "USD"
    },
    "tip_money": {
      "amount": 0,
      "currency": "USD"
    },
    "service_charge_money": {
      "amount": 0,
      "currency": "USD"
    }
  },
  "refunds": [
    {
      "id": "[REDACTED]",
      "location_id": "[REDACTED]",
      "transaction_id": "[REDACTED]",
      "tender_id": "[REDACTED]",
      "created_at": "2021-05-14T17:11:01Z",
      "reason": "Exchange",
      "amount_money": {
        "amount": 5387,
        "currency": "USD"
      },
      "status": "APPROVED",
      "processing_fee_money": {
        "amount": 137,
        "currency": "USD"
      }
    }
  ],
  "customer_id": "[REDACTED]"
}

```
