{
  "info": {
    "title": "FlexPay Purchase documentation",
    "version": "4"
  },
  "openapi": "3.1.0",
  "paths": {
    "/startorder": {
      "get": {
        "operationId": "create-a-purchase-order",
        "parameters": [
          {
            "description": "version version of the FlexPay call, `4` for this version",
            "in": "query",
            "name": "version",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "numerical ID of the website in the Verotel system",
            "in": "query",
            "name": "shopID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "`purchase`",
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "priceAmount amount to be processed in nnn.nn format",
            "in": "query",
            "name": "priceAmount",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "priceCurrency 3 char ISO code, must be one of the Sale currencies (`USD` `EUR` `GBP` `AUD` `CAD` `CHF` `DKK` `NOK` `SEK`)\nNOTE: only `EUR` is can be used for `DDEU` payment method system",
            "in": "query",
            "name": "priceCurrency",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "description of the product. Text is displayed on the order page - max 100 printable characters",
            "in": "query",
            "name": "description",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "payment method, `CC`, `YOURSAFE_DIRECT` or, `DDEU` (if not set then buyers can choose from available payment methods)\nNOTE: `DDEU` is available only in DE, AT, CH, BE, IT, NL, ES and FR\nIf oneClickToken is sent, the payment method must be set to `CC`.\nWhen processing without Orderpage, `IDEAL` must be set.",
            "in": "query",
            "name": "paymentMethod",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "merchant’s reference identifier. It must be unique if provided",
            "in": "query",
            "name": "referenceID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom1",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom2",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom3",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "URL for redirect after successful transaction - max 255 characters. Defaults to success landing URL on the website.",
            "in": "query",
            "name": "successURL",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "URL for redirect after declined transaction - max 255 characters. Defaults to decline landing URL on the website.",
            "in": "query",
            "name": "declineURL",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the one-time oneClickToken from previous purchase\nNOTE: oneClickToken is excluded from signature calculations",
            "in": "query",
            "name": "oneClickToken",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "email of the buyer. If not set, it will be collected on the Order Page\nNOTE: email is excluded from signature calculations (max 100 chars else it will be ignored)",
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Signature calculation",
            "in": "query",
            "name": "signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "servers": [
          {
            "url": "https://secure.verotel.com"
          },
          {
            "url": "https://secure.billing.creditcard"
          },
          {
            "url": "https://secure.gaycharge.com"
          },
          {
            "url": "https://secure.yoursafedirect.com"
          }
        ],
        "summary": "Create a purchase order"
      }
    },
    "/status/order": {
      "get": {
        "operationId": "status-page-request",
        "parameters": [
          {
            "description": "`4`",
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "numerical ID of the website in the Verotel system",
            "in": "query",
            "name": "shopID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Merchant’s reference identifier if provided (referenceID OR saleID must be posted - NOT BOTH)",
            "in": "query",
            "name": "referenceID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Verotel saleID identifier (referenceID OR saleID must be posted - NOT BOTH)",
            "in": "query",
            "name": "saleID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Signature calculation",
            "in": "query",
            "name": "signature",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-www-form-urlencoded": {
                "schema": {
                  "properties": {
                    "billingAddr_addressLine1": {
                      "description": "billing address: 1st line field value",
                      "type": "string"
                    },
                    "billingAddr_addressLine2": {
                      "description": "billing address: 2nd line field value",
                      "type": "string"
                    },
                    "billingAddr_city": {
                      "description": "billing address: city name",
                      "type": "string"
                    },
                    "billingAddr_company": {
                      "description": "billing address: company field value",
                      "type": "string"
                    },
                    "billingAddr_country": {
                      "description": "billing address: country ISO code (ISO 3166-1-alpha-2 code)",
                      "type": "string"
                    },
                    "billingAddr_fullName": {
                      "description": "billing address: full name field value",
                      "type": "string"
                    },
                    "billingAddr_state": {
                      "description": "billing address: US state code (ISO 3166-2)",
                      "type": "string"
                    },
                    "billingAddr_zip": {
                      "description": "billing address: zip code / postal code",
                      "type": "string"
                    },
                    "country": {
                      "description": "selected or detected country ISO code (ISO 3166-1-alpha-2 code)",
                      "type": "string"
                    },
                    "createdOn": {
                      "description": "Timestamp of purchase creation",
                      "type": "string"
                    },
                    "description": {
                      "description": "Product description text - max 100 printable characters",
                      "type": "string"
                    },
                    "email": {
                      "description": "email address of the buyer",
                      "type": "string"
                    },
                    "error": {
                      "description": "message (for response=`ERROR`)",
                      "type": "string"
                    },
                    "name": {
                      "description": "name of the buyer",
                      "type": "string"
                    },
                    "oneClickToken": {
                      "description": "If the feature is enabled - Currently valid oneClickToken",
                      "type": "string"
                    },
                    "paymentMethod": {
                      "description": "an identifier of payment method that was used for the transaction.\nCan be one of following: `Credit Card` or `Direct Debit EU`",
                      "type": "string"
                    },
                    "priceAmount": {
                      "description": "amount processed. in nnn.nn formatt",
                      "type": "string"
                    },
                    "priceCurrency": {
                      "description": "3 char ISO code of the Sale currency",
                      "type": "string"
                    },
                    "referenceID": {
                      "description": "Merchant reference identifier - max 100 printable characters",
                      "type": "string"
                    },
                    "response": {
                      "description": "`FOUND` - purchase record found and returned\n`NOTFOUND` - purchase not found\n`ERROR` - error (see ‘error’ key)",
                      "type": "string"
                    },
                    "saleID": {
                      "description": "identifier of the transaction in Verotel System",
                      "type": "string"
                    },
                    "saleResult": {
                      "description": "purchase processing result (APPROVED)",
                      "type": "string"
                    },
                    "shopID": {
                      "description": "ID of website in Verotel system",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-order": [
                    "response",
                    "error",
                    "saleID",
                    "shopID",
                    "paymentMethod",
                    "priceAmount",
                    "priceCurrency",
                    "description",
                    "referenceID",
                    "name",
                    "email",
                    "country",
                    "oneClickToken",
                    "createdOn",
                    "saleResult",
                    "billingAddr_fullName",
                    "billingAddr_company",
                    "billingAddr_addressLine1",
                    "billingAddr_addressLine2",
                    "billingAddr_city",
                    "billingAddr_zip",
                    "billingAddr_state",
                    "billingAddr_country"
                  ]
                }
              }
            },
            "description": "response: `FOUND` - purchase record found and returned\n`NOTFOUND` - purchase not found\n`ERROR` - error (see ‘error’ key)\nerror: message (for response=`ERROR`)\nsaleID: identifier of the transaction in Verotel System\nshopID: ID of website in Verotel system\npaymentMethod: an identifier of payment method that was used for the transaction.\nCan be one of following: `Credit Card` or `Direct Debit EU`\npriceAmount: amount processed. in nnn.nn formatt\npriceCurrency: 3 char ISO code of the Sale currency\ndescription: Product description text - max 100 printable characters\nreferenceID: Merchant reference identifier - max 100 printable characters\nname: name of the buyer\nemail: email address of the buyer\ncountry: selected or detected country ISO code (ISO 3166-1-alpha-2 code)\noneClickToken: If the feature is enabled - Currently valid oneClickToken\ncreatedOn: Timestamp of purchase creation\nsaleResult: purchase processing result (APPROVED)\nbillingAddr_fullName: billing address: full name field value\nbillingAddr_company: billing address: company field value\nbillingAddr_addressLine1: billing address: 1st line field value\nbillingAddr_addressLine2: billing address: 2nd line field value\nbillingAddr_city: billing address: city name\nbillingAddr_zip: billing address: zip code / postal code\nbillingAddr_state: billing address: US state code (ISO 3166-2)\nbillingAddr_country: billing address: country ISO code (ISO 3166-1-alpha-2 code)"
          }
        },
        "servers": [
          {
            "url": "https://secure.verotel.com"
          },
          {
            "url": "https://secure.billing.creditcard"
          },
          {
            "url": "https://secure.gaycharge.com"
          },
          {
            "url": "https://secure.yoursafedirect.com"
          }
        ],
        "summary": "Status page request"
      }
    }
  },
  "webhooks": {
    "chargeback-postback": {
      "get": {
        "operationId": "chargeback-postback",
        "parameters": [
          {
            "description": "numerical ID of the website in the Verotel system",
            "in": "query",
            "name": "shopID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "`chargeback`",
            "in": "query",
            "name": "event",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "merchant reference identifier. It must be unique if provided",
            "in": "query",
            "name": "referenceID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "identifier of the sale in the Verotel system",
            "in": "query",
            "name": "saleID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "amount of chargebacked transaction",
            "in": "query",
            "name": "priceAmount",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "chargebacked transaction currency",
            "in": "query",
            "name": "priceCurrency",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "transaction id of credit transaction",
            "in": "query",
            "name": "transactionID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "transaction id of transaction which was credited",
            "in": "query",
            "name": "parentID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "`purchase`",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom1",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom2",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom3",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Signature calculation",
            "in": "query",
            "name": "signature",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "summary": "Chargeback postback"
      }
    },
    "credit-postback": {
      "get": {
        "operationId": "credit-postback",
        "parameters": [
          {
            "description": "numerical ID of the website in the Verotel system",
            "in": "query",
            "name": "shopID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "`credit`",
            "in": "query",
            "name": "event",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "merchant reference identifier. It must be unique if provided",
            "in": "query",
            "name": "referenceID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "identifier of the sale in the Verotel system",
            "in": "query",
            "name": "saleID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "amount of refunded transaction",
            "in": "query",
            "name": "priceAmount",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "refunded transaction currency",
            "in": "query",
            "name": "priceCurrency",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "transaction id of credit transaction",
            "in": "query",
            "name": "transactionID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "transaction id of transaction which was credited",
            "in": "query",
            "name": "parentID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "`purchase`",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom1",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom2",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom3",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Signature calculation",
            "in": "query",
            "name": "signature",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "summary": "Credit postback"
      }
    },
    "success-postback": {
      "get": {
        "operationId": "success-postback",
        "parameters": [
          {
            "description": "numerical ID of the website in the Verotel system",
            "in": "query",
            "name": "shopID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "`purchase`",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "merchant reference identifier. It must be unique if provided",
            "in": "query",
            "name": "referenceID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "identifier of the sale in the Verotel system",
            "in": "query",
            "name": "saleID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "identifier of the transaction in the Verotel system (only avaible for postbacks version 2)",
            "in": "query",
            "name": "transactionID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "amount to be processed in nnn.nn format",
            "in": "query",
            "name": "priceAmount",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "3 char ISO code of the Sale currency",
            "in": "query",
            "name": "priceCurrency",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom1",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom2",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom3",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "payment method, `CC`, `YOURSAFE_DIRECT`, `DDEU`",
            "in": "query",
            "name": "paymentMethod",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "if the feature is enabled - oneClickToken valid for next purchase",
            "in": "query",
            "name": "oneClickToken",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Signature calculation",
            "in": "query",
            "name": "signature",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Truncated (masked) payment instrument identification, e.g. card number",
            "in": "query",
            "name": "truncatedPAN",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only present if paid via Credit Card, represents the card brand, e.g. VISA",
            "in": "query",
            "name": "CCBrand",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "summary": "Success postback"
      }
    },
    "success-redirect": {
      "get": {
        "operationId": "success-redirect",
        "parameters": [
          {
            "description": "numerical ID of the website in the Verotel system",
            "in": "query",
            "name": "shopID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "`purchase`",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "merchant reference identifier. It must be unique if provided",
            "in": "query",
            "name": "referenceID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "identifier of the sale in the Verotel system",
            "in": "query",
            "name": "saleID",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "amount to be processed in nnn.nn format",
            "in": "query",
            "name": "priceAmount",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "3 char ISO code of the Sale currency",
            "in": "query",
            "name": "priceCurrency",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom1",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom2",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass-through variable - max 255 printable characters",
            "in": "query",
            "name": "custom3",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "payment method, `CC`, `YOURSAFE_DIRECT`, `DDEU`",
            "in": "query",
            "name": "paymentMethod",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Signature calculation",
            "in": "query",
            "name": "signature",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "summary": "Success redirect"
      }
    }
  }
}
