---
updatedAt: 2025-05-20T21:54:13.000Z
agentTools:
  projectIndex: https://shop-and-pay.readme.io/llms.txt
---

# Retrieve Transactions

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.shop-and-pay.com/v1.0"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/Transaction/": {
      "get": {
        "summary": "Retrieve Transactions",
        "description": "",
        "operationId": "retrieve-transactions",
        "parameters": [
          {
            "name": "instance",
            "in": "query",
            "description": "Your Shop & Pay instance name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "filterDatetimeUtcGreaterThan": {
                    "type": "string",
                    "description": "Lower DateTime limit in the format of YYYY-MM-DD MM:HH:SS",
                    "format": "date"
                  },
                  "filterDatetimeUtcLessThan": {
                    "type": "string",
                    "description": "Upper DateTime limit in the format of YYYY-MM-DD HH:MM:SS",
                    "format": "date"
                  },
                  "offset": {
                    "type": "integer",
                    "description": "Row count to be used as offset",
                    "format": "int32"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Max row count",
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{ \n    \"status\":\"success\",\n    \"data\":[ \n        { \n            \"id\":1,\n            \"uuid\":\"f384000b\",\n            \"status\":\"authorized\",\n            \"time\":\"2020-01-20 15:56:02\",\n            \"lang\":\"de\",\n            \"pageUuid\":\"892dcf5c\",\n            \"payment\":{ \n                \"brand\":\"visa\"\n            },\n            \"psp\":\"Shopandpay_Payments\",\n            \"pspId\":26,\n            \"mode\":\"LIVE\",\n            \"referenceId\":\"ORDER#321\",\n            \"invoice\":{ \n                \"currencyAlpha3\":\"CHF\",\n                \"products\":[ \n                    { \n                        \"quantity\":1,\n                        \"name\":\"Hoodie\",\n                        \"amount\":5900\n                    },\n                    { \n                        \"quantity\":2,\n                        \"name\":\"T-Shirt\",\n                        \"amount\":2850\n                    }\n                ],\n                \"discount\":{ \n                    \"code\":\"SUPERSALE\",\n                    \"percentage\":33,\n                    \"amount\":3828\n                },\n                \"shippingAmount\":150000,\n                \"totalAmount\":9272,\n                \"customFields\":{ \n                    \"20\":{ \n                        \"name\":\"Additional Information\",\n                        \"value\":\"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\"\n                    }\n                }\n            },\n            \"contact\":{ \n                \"id\":16,\n                \"uuid\":\"9c9c0282\",\n                \"company\":\"FeelGood\",\n                \"title\":\"mister\",\n                \"firstname\":\"Hans\",\n                \"lastname\":\"Schmid\",\n                \"street\":\"Dorstrasse 11\",\n                \"zip\":\"1234\",\n                \"place\":\"Habern\",\n                \"country\":\"Schweiz\",\n                \"countryISO\":\"CH\",\n                \"date_of_birth\":\"10.03.1989\",\n                \"email\":\"info@example.com\",\n                \"phone\":\"+413312345678\",\n                \"delivery_company\":\"NewFashion\",\n                \"delivery_title\":\"miss\",\n                \"delivery_firstname\":\"Fabienne\",\n                \"delivery_lastname\":\"Muster\",\n                \"delivery_street\":\"Seestrasse 39\",\n                \"delivery_zip\":\"4321\",\n                \"delivery_place\":\"Nechters\",\n                \"delivery_country\":\"Schweiz\",\n                \"delivery_countryISO\":\"CH\"\n            }\n        },\n        { \n            \"id\":223,\n            \"uuid\":\"d2571806\",\n            \"status\":\"confirmed\",\n            \"time\":\"2020-01-20 16:25:58\",\n            \"lang\":\"de\",\n            \"pageUuid\":\"892dcf5c\",\n            \"payment\":{ \n                \"brand\":\"visa\"\n            },\n            \"psp\":\"Shopandpay_Payments\",\n            \"pspId\":26,\n            \"mode\":\"LIVE\",\n            \"referenceId\":\"ORDER#322\",\n            \"invoice\":{ \n                \"currencyAlpha3\":\"CHF\",\n                \"products\":[ \n                    { \n                        \"name\":\"T-Shirt\",\n                        \"quantity\":1,\n                        \"amount\":2850\n                    }\n                ],\n                \"discount\":null,\n                \"shippingAmount\":150000,\n                \"totalAmount\":4350,\n                \"customFields\":null\n            },\n            \"contact\":{ \n                \"id\":16,\n                \"uuid\":\"9c9c0282\",\n                \"company\":\"\",\n                \"title\":\"mister\",\n                \"lastname\":\"Muster\",\n                \"firstname\":\"Hans\",\n                \"street\":\"Dorfstrasse 49\",\n                \"zip\":\"1234\",\n                \"place\":\"Habern\",\n                \"country\":\"Schweiz\",\n                \"countryISO\":\"CH\",\n                \"date_of_birth\":\"10.03.1989\",\n                \"email\":\"info@example.com\",\n                \"phone\":\"\",\n                \"delivery_company\":\"\",\n                \"delivery_title\":\"0\",\n                \"delivery_firstname\":\"\",\n                \"delivery_lastname\":\"\",\n                \"delivery_street\":\"\",\n                \"delivery_zip\":\"\",\n                \"delivery_place\":\"\",\n                \"delivery_country\":\"\",\n                \"delivery_countryISO\":\"\"\n            }\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "uuid": {
                            "type": "string",
                            "example": "f384000b"
                          },
                          "status": {
                            "type": "string",
                            "example": "authorized"
                          },
                          "time": {
                            "type": "string",
                            "example": "2020-01-20 15:56:02"
                          },
                          "lang": {
                            "type": "string",
                            "example": "de"
                          },
                          "pageUuid": {
                            "type": "string",
                            "example": "892dcf5c"
                          },
                          "payment": {
                            "type": "object",
                            "properties": {
                              "brand": {
                                "type": "string",
                                "example": "visa"
                              }
                            }
                          },
                          "psp": {
                            "type": "string",
                            "example": "Shopandpay_Payments"
                          },
                          "pspId": {
                            "type": "integer",
                            "example": 26,
                            "default": 0
                          },
                          "mode": {
                            "type": "string",
                            "example": "LIVE"
                          },
                          "referenceId": {
                            "type": "string",
                            "example": "ORDER#321"
                          },
                          "invoice": {
                            "type": "object",
                            "properties": {
                              "currencyAlpha3": {
                                "type": "string",
                                "example": "CHF"
                              },
                              "products": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "quantity": {
                                      "type": "integer",
                                      "example": 1,
                                      "default": 0
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "Hoodie"
                                    },
                                    "amount": {
                                      "type": "integer",
                                      "example": 5900,
                                      "default": 0
                                    }
                                  }
                                }
                              },
                              "discount": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "example": "SUPERSALE"
                                  },
                                  "percentage": {
                                    "type": "integer",
                                    "example": 33,
                                    "default": 0
                                  },
                                  "amount": {
                                    "type": "integer",
                                    "example": 3828,
                                    "default": 0
                                  }
                                }
                              },
                              "shippingAmount": {
                                "type": "integer",
                                "example": 150000,
                                "default": 0
                              },
                              "totalAmount": {
                                "type": "integer",
                                "example": 9272,
                                "default": 0
                              },
                              "customFields": {
                                "type": "object",
                                "properties": {
                                  "20": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "example": "Additional Information"
                                      },
                                      "value": {
                                        "type": "string",
                                        "example": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "contact": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 16,
                                "default": 0
                              },
                              "uuid": {
                                "type": "string",
                                "example": "9c9c0282"
                              },
                              "company": {
                                "type": "string",
                                "example": "FeelGood"
                              },
                              "title": {
                                "type": "string",
                                "example": "mister"
                              },
                              "firstname": {
                                "type": "string",
                                "example": "Hans"
                              },
                              "lastname": {
                                "type": "string",
                                "example": "Schmid"
                              },
                              "street": {
                                "type": "string",
                                "example": "Dorstrasse 11"
                              },
                              "zip": {
                                "type": "string",
                                "example": "1234"
                              },
                              "place": {
                                "type": "string",
                                "example": "Habern"
                              },
                              "country": {
                                "type": "string",
                                "example": "Schweiz"
                              },
                              "countryISO": {
                                "type": "string",
                                "example": "CH"
                              },
                              "date_of_birth": {
                                "type": "string",
                                "example": "10.03.1989"
                              },
                              "email": {
                                "type": "string",
                                "example": "info@example.com"
                              },
                              "phone": {
                                "type": "string",
                                "example": "+413312345678"
                              },
                              "delivery_company": {
                                "type": "string",
                                "example": "NewFashion"
                              },
                              "delivery_title": {
                                "type": "string",
                                "example": "miss"
                              },
                              "delivery_firstname": {
                                "type": "string",
                                "example": "Fabienne"
                              },
                              "delivery_lastname": {
                                "type": "string",
                                "example": "Muster"
                              },
                              "delivery_street": {
                                "type": "string",
                                "example": "Seestrasse 39"
                              },
                              "delivery_zip": {
                                "type": "string",
                                "example": "4321"
                              },
                              "delivery_place": {
                                "type": "string",
                                "example": "Nechters"
                              },
                              "delivery_country": {
                                "type": "string",
                                "example": "Schweiz"
                              },
                              "delivery_countryISO": {
                                "type": "string",
                                "example": "CH"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "apiSignature=`echo -n \"filterDatetimeUtcGreaterThan=2020-01-20+14%3A55%3A00&filterDatetimeUtcLessThan=2020-01-25+19%3A00%3A50&offset=30&limit=2\" | openssl dgst -sha256 -hmac \"YOUR_SECRET\" -binary | openssl enc -base64`\ncurl --request GET \"https://api.shop-and-pay.com/v1.0/Transaction//?instance=YOUR_INSTANCE_NAME\" \\\n--data-urlencode \"filterDatetimeUtcGreaterThan=2020-01-20 14:55:00\" \\\n--data-urlencode \"filterDatetimeUtcLessThan=2020-01-25 19:00:50\" \\\n--data-urlencode \"offset=30\" \\\n--data-urlencode \"limit=2\" \\\n--data-urlencode \"ApiSignature=$apiSignature\""
            },
            {
              "language": "php",
              "code": "<?php\n\n// $instanceName is a part of the url where you access your shopandpay installation.\n// https://{$instanceName}.shop-and-pay.com\n$instanceName = 'YOUR_INSTANCE_NAME';\n\n// $secret is the shopandpay secret for the communication between the applications\n// if you think someone got your secret, just regenerate it in the shopandpay administration\n$secret = 'YOUR_SECRET';\n\n$shopandpay = new \\Shopandpay\\Shopandpay($instanceName, $secret);\n\n$transaction = new \\Shopandpay\\Models\\Request\\Transaction();\n$transaction->setFilterDatetimeUtcGreaterThan(new \\DateTime('2020-01-20 14:55:00'));\n$transaction->setFilterDatetimeUtcLessThan(new \\DateTime('2020-01-25 19:00:50'));\n$transaction->setOffset(100);\n$transaction->setLimit(30);\n\ntry {\n    $response = $Shopandpay->getAll($transaction);\n    var_dump($response);\n} catch (\\Shopandpay\\ShopandpayException $e) {\n    print $e->getMessage();\n}"
            }
          ],
          "samples-languages": [
            "curl",
            "php"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```