---
updatedAt: 2025-06-04T20:09:53.000Z
agentTools:
  projectIndex: https://vrpay.readme.io/llms.txt
---

# Retrieve a VR pay secure Gateway

> 📘 Integration manual
>
> For more information about the usage of VR pay secure Gateway, please visit [VR pay secure Gateway](https://vrpay.readme.io/docs/vr-pay-secure-gateway) section.

> 👍 Secure payment process using this endpoint
>
> You could use this endpoint, for example, to verify a webhook you have received.\
> You get a webhook for a successful payment and you would like to check whether this gateway payment has actually been paid.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "http://api.vr-pay-secure.de/v1.0"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/Gateway/{id}/": {
      "get": {
        "summary": "Retrieve a VR pay secure Gateway",
        "description": "",
        "operationId": "gateway-1",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of gateway payment to retrieve.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "instance",
            "in": "query",
            "description": "Your VR pay secure instance name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Raw": {
                    "value": "{  \n    \"status\":\"success\",\n    \"data\":[  \n        {  \n            \"id\":1,\n            \"status\":\"waiting\",\n            \"hash\":\"db8c618c87dc91f100292f6ffd9c5044\",\n            \"referenceId\":\"975382\",\n            \"link\":\"https:\\/\\/demo.vr-pay-secure.de\\/?payment=db8c618c87dc91f100292f6ffd9c5044\",\n            \"invoices\":[],\n            \"preAuthorization\":0,\n            \"fields\":{  \n                \"title\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"forename\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"surname\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"company\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"street\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"postcode\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"place\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"country\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"phone\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"email\":{  \n                    \"active\":false,\n                    \"mandatory\":true\n                },\n                \"date_of_birth\":{  \n                    \"active\":false,\n                    \"mandatory\":true,\n                    \"names\":{  \n                        \"de\":\"\",\n                        \"en\":\"\",\n                        \"fr\":\"\",\n                        \"it\":\"\"\n                    }\n                },\n                \"text\":{  \n                    \"active\":false,\n                    \"mandatory\":true,\n                    \"names\":{  \n                        \"de\":\"Benutzerdefiniertes Feld (DE)\",\n                        \"en\":\"Benutzerdefiniertes Feld (EN)\",\n                        \"fr\":\"Benutzerdefiniertes Feld (FR)\",\n                        \"it\":\"Benutzerdefiniertes Feld (IT)\"\n                    }\n                }\n            },\n            \"psp\":[],\n            \"pm\":[],\n            \"amount\":8925,\n            \"vatRate\":7.7,\n            \"currency\":\"CHF\",\n            \"sku\":\"P01122000\",\n            \"createdAt\":1475578052\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
                          },
                          "status": {
                            "type": "string",
                            "example": "waiting"
                          },
                          "hash": {
                            "type": "string",
                            "example": "db8c618c87dc91f100292f6ffd9c5044"
                          },
                          "referenceId": {
                            "type": "string",
                            "example": "975382"
                          },
                          "link": {
                            "type": "string",
                            "example": "https://demo.vr-pay-secure.de/?payment=db8c618c87dc91f100292f6ffd9c5044"
                          },
                          "invoices": {
                            "type": "array"
                          },
                          "preAuthorization": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "fields": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "forename": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "surname": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "company": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "street": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "postcode": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "place": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "country": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "phone": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "email": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "date_of_birth": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  },
                                  "names": {
                                    "type": "object",
                                    "properties": {
                                      "de": {
                                        "type": "string",
                                        "example": ""
                                      },
                                      "en": {
                                        "type": "string",
                                        "example": ""
                                      },
                                      "fr": {
                                        "type": "string",
                                        "example": ""
                                      },
                                      "it": {
                                        "type": "string",
                                        "example": ""
                                      }
                                    }
                                  }
                                }
                              },
                              "text": {
                                "type": "object",
                                "properties": {
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "mandatory": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  },
                                  "names": {
                                    "type": "object",
                                    "properties": {
                                      "de": {
                                        "type": "string",
                                        "example": "Benutzerdefiniertes Feld (DE)"
                                      },
                                      "en": {
                                        "type": "string",
                                        "example": "Benutzerdefiniertes Feld (EN)"
                                      },
                                      "fr": {
                                        "type": "string",
                                        "example": "Benutzerdefiniertes Feld (FR)"
                                      },
                                      "it": {
                                        "type": "string",
                                        "example": "Benutzerdefiniertes Feld (IT)"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "psp": {
                            "type": "array"
                          },
                          "pm": {
                            "type": "array"
                          },
                          "amount": {
                            "type": "integer",
                            "example": 8925,
                            "default": 0
                          },
                          "vatRate": {
                            "type": "number",
                            "example": 7.7,
                            "default": 0
                          },
                          "currency": {
                            "type": "string",
                            "example": "CHF"
                          },
                          "sku": {
                            "type": "string",
                            "example": "P01122000"
                          },
                          "createdAt": {
                            "type": "integer",
                            "example": 1475578052,
                            "default": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "apiSignature=`echo -n \"\" | openssl dgst -sha256 -hmac \"INSTANCE_API_SECRET\" -binary | openssl enc -base64`\ncurl --request GET \"https://api.vr-pay-secure.de/v1.0/Gateway/1/?instance=INSTANCE_NAME\" --data-urlencode \"ApiSignature=$apiSignature\""
            },
            {
              "language": "php",
              "code": "<?php\n\n// $instanceName is a part of the url where you access your VR pay secure installation.\n// https://{$instanceName}.vr-pay-secure.de\n$instanceName = 'YOUR_INSTANCE_NAME';\n\n// $secret is the VR pay secure secret for the communication between the applications\n// if you think someone got your secret, just regenerate it in the VR pay secure administration\n$secret = 'YOUR_SECRET';\n\n$vrpay = new \\VRpay\\VRpay($instanceName, $secret);\n\n$gateway = new \\VRpay\\Models\\Request\\Gateway();\n$gateway->setId(1);\n\ntry {\n    $response = $vrpay->getOne($gateway);\n    var_dump($response);\n} catch (\\VRpay\\VRpayException $e) {\n    print $e->getMessage();\n}"
            },
            {
              "language": "python",
              "code": "import urllib.request\nimport hmac\nimport hashlib\nimport base64\nimport json\n\npost_data = {}\n\ndata = urllib.parse.urlencode(post_data).encode('UTF-8')\n\ndig = hmac.new(b'INSTANCE_API_SECRET', msg=data, digestmod=hashlib.sha256).digest()\npost_data['ApiSignature'] = base64.b64encode(dig).decode()\npost_data['instance'] = 'INSTANCE_NAME'\n\ndata = urllib.parse.urlencode(post_data)\n\nresult = urllib.request.urlopen('https://api.vr-pay-secure.de/v1.0/Gateway/1/?' + data)\ncontent = result.read().decode('UTF-8')\nresponse = json.loads(content)\ngateway = response['data'][0]\nprint(gateway)"
            },
            {
              "language": "node",
              "code": "// vrpay.js module content:\nconst qs = require('qs')\nconst axios = require('axios')\nconst Base64 = require('crypto-js/enc-base64')\nconst hmacSHA256 = require('crypto-js/hmac-sha256')\n\nconst baseUrl = 'https://api.vr-pay-secure.de/v1.0/'\n\nexports.init = function (instance, secret) {\n\n  function buildSignature (query = '') {\n    return Base64.stringify(hmacSHA256(query, secret))\n  }\n\n  function buildBaseUrl (path) {\n    return baseUrl + path + '?instance=' + instance\n  }\n\n  return {\n    getGateway: function (id) {\n      const baseUrl = buildBaseUrl('Gateway/' + id + '/')\n      const url = baseUrl + '&ApiSignature=' + buildSignature()\n      return axios.get(url)\n    },\n    createGateway: function (params) {\n      if (!params.amount) {\n        throw new Error('Amount required!')\n      }\n\n      const defaultParams = {\n        currency: 'CHF'\n      }\n\n      let queryParams = Object.assign({}, defaultParams, params)\n\n      const queryStr = qs.stringify(queryParams)\n      const signature = buildSignature(queryStr)\n\n      queryParams.ApiSignature = signature\n      const queryStrSigned = qs.stringify(queryParams)\n\n      const baseUrl = buildBaseUrl('Gateway/')\n      return axios.post(baseUrl, queryStrSigned)\n    }\n  }\n}\n\n// where you want to consume the vrpay module:\nconst vrpay = vrpay.init(instance, api_secret)\nconst response = await vrpay.getGateway(1)\n\nif (response.status === 200) {\n  const gateway = response.data.data[0]\n  // here you will get the gateway\n}"
            }
          ],
          "samples-languages": [
            "curl",
            "php",
            "python",
            "node"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```