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

# Charge a Pre-Authorized / Reserved Transaction

# 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": {
    "/Transaction/{id}/": {
      "post": {
        "summary": "Charge a Pre-Authorized / Reserved Transaction",
        "description": "",
        "operationId": "charge-a-pre-authorized-transaction",
        "parameters": [
          {
            "name": "instance",
            "in": "query",
            "description": "Your VR pay secure instance name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "ID of the transacton to charge.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "integer",
                    "description": "Amount for charge in cents.",
                    "format": "int32"
                  },
                  "purpose": {
                    "type": "string",
                    "description": "The purpose of the charge."
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Reference ID for charged transaction. Will be available in transaction webhook."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{  \n    \"status\":\"success\",\n    \"data\":[  \n        {  \n            \"id\":2,\n            \"uuid\":\"81d545ca\",\n            \"time\":\"2017-10-16 12:29:12\",\n            \"status\":\"confirmed\",\n            \"lang\":\"de\",\n            \"psp\":\"VR_Pay\"\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2,
                            "default": 0
                          },
                          "uuid": {
                            "type": "string",
                            "example": "81d545ca"
                          },
                          "time": {
                            "type": "string",
                            "example": "2017-10-16 12:29:12"
                          },
                          "status": {
                            "type": "string",
                            "example": "confirmed"
                          },
                          "lang": {
                            "type": "string",
                            "example": "de"
                          },
                          "psp": {
                            "type": "string",
                            "example": "VR_Pay"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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 POST \"https://api.vr-pay-secure.de/v1.0/Transaction/2/?instance=INSTANCE_NAME\" \\\n--data-urlencode \"amount=8925\" \\\n--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$transaction = new \\VRpay\\Models\\Request\\Transaction();\n$transaction->setId(2);\n\n// amount multiplied by 100\n$transaction->setAmount(89.25 * 100);\n\ntry {\n    $response = $vrpay->charge($transaction);\n    var_dump($response);\n} catch (\\VRpay\\VRpayException $e) {\n    print $e->getMessage();\n}\n"
            }
          ],
          "samples-languages": [
            "curl",
            "php"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```