---
title: Delete a subscription
slug: amberflo-api/delete-a-subscription
docTags: 
createdAt: 2024-11-07T15:10:16.976Z
---

{
  "id": "DFP5PIxzYS90k1DKDwewH",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid-subscription",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid-subscription"
      }
    ],
    "name": "Delete a subscription",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "k97hYiDojwYcmd5XhVlx1",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid-subscription \\\n     --header 'accept: application/json'"
        },
        {
          "id": "cG06uFvdI9C13LDklGD7A",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid-subscription\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "TPF0_Vjt4XxEteoVEiIL6",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid-subscription\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "NsQfdyKk8PganOeMo9yP_",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid-subscription\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "k97hYiDojwYcmd5XhVlx1"
    },
    "results": {
      "languages": [
        {
          "id": "2d6hTtahozh_j5sS81Vf8",
          "language": "200",
          "code": "// Successful request\n\"\""
        }
      ],
      "selectedLanguageId": "2d6hTtahozh_j5sS81Vf8"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}