Need V2 mapping for given fields from V1 APIs

Hi guys, I was using V1 square APIs for fetching payments and refunds. Now I shifted to V2 and need to know which fields are mapped for these keys from V1 APIsPayments list api v1

  • net_sales_money (not found relevant key in v2)
  • net_total_money (not found relevant key in v2)

Refunds list API v1

  • refunded_additive_tax_money (not found relevant key in v2)
  • type (type of refund, not found relevant key in v2)

I need to know about these values from V2 APIs which I should use.

:wave: With v2 you will use the Orders API to get net_amounts for an order. Also with the refunds the order will have the return_amounts which include the tax_money. Also in the return_line_items will have the information that replace the v1 with the v2 fields. :slightly_smiling_face:

1 Like

Thanks a lot @Bryan-Square, really a helpful answer. Much appreciated!
Will check with you if any further help needed.

:blush: From line_items of Orders API can I use base_price_money as net_amount for an OrderItem. Or can you suggest some field to get net_amount for an Item under order.

Also not got refund type from any of these.

Hi @Bryan-Square, 2 quick questions.

  • How can I get refund_type from Refunds API?
  • How can I get net_amount for an OrderItem from Payments API

Hi @dev-alihaider, The net_amount for an OrderItem isn’t available in the in the Payments API. As for the refund_type there isn’t an exact type that returns FULL or PARTIAL however in the payment when you call GetPayment with the payment_id will have the refund and the total amount that you can use to see if it’s a full or partial refund. :slightly_smiling_face:

Thanks @Bryan-Square

from anywhere else can I get this? or the base_price_money from line_items can be used as the net_amount

That’s correct. the base_price_money is the net_amount for the line item.

1 Like

Thanks a lot @Bryan-Square, you really a champ of Square team.