question

brokenoval avatar image
brokenoval asked brokenoval commented

Can't get Tender details from Orders API

I'm trying to get tender details out of the orders API, I am calling the orders API like this:

https://api.eu.clover.com/v3/merchant...token={token}&expand=payments&returnnull_fields=true

This gives me all the correct details, however under the "payments" array in the "tenders" item I'm getting NULL values for all the sub items - specifically I'm looking to read the Tender "label" and "labelKey". Here's what it looks like:

 "payments": {
        "elements": [
          {
            "id": "P71TXWP5A8FKA",
            "order": {
              "id": "R6P9Y3D9VR6JA"
            },
            "device": {
              "id": "7f225dc2-3831-4ff6-a0dc-6a242c68bbb8"
            },
            "tender": {
              "href": "https://www.eu.clover.com/v3/merchants/<mid>/tenders/6ZK99CKWPQCZ8",
              "id": "6ZK99CKWPQCZ8",
              "editable": null,
              "labelKey": null,
              "label": null,
              "opensCashDrawer": null,
              "supportsTipping": null,
              "enabled": null,
              "visible": null,
              "instructions": null
            },
            "amount": 700,
            "tipAmount": null,
            "taxAmount": 265,
            "cashbackAmount": null,
            "cashTendered": 700,
            "externalPaymentId": null,
            "employee": {
              "id": "S86GQBWF646DY"
            },
            "createdTime": 1482150663000,
            "clientCreatedTime": 1482150662000,
            "modifiedTime": 1482150662000,
            "offline": null,
            "result": "SUCCESS",
            "cardTransaction": null,
            "serviceCharge": null,
            "note": null,
            "voidReason": null,
            "dccInfo": null
          }

clicking the href will show me the correct tender details in a browser, however I'd like to read these details from within the orders API to avoid another API call.

Am I doing something wrong?

Thanks!

Orders
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Mark Mullan avatar image
Mark Mullan Deactivated answered brokenoval commented

This expansion will show the label and labelKey associated with the tender:

https://sandbox.dev.clover.com/v3/merchants/{MID}/orders?expand=payments.tender&return_null_fields=true
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brokenoval avatar image brokenoval commented ·

Thanks Mark - that did the trick

1 Like 1 ·

Welcome to the
Clover Developer Community