{"id":21601,"date":"2026-06-04T09:23:58","date_gmt":"2026-06-04T07:23:58","guid":{"rendered":"https:\/\/www.drugshortage.ch\/?page_id=21601"},"modified":"2026-06-08T14:05:18","modified_gmt":"2026-06-08T12:05:18","slug":"api-key-kauf","status":"publish","type":"page","link":"https:\/\/www.drugshortage.ch\/index.php\/api-key-kauf\/","title":{"rendered":"API Key Kauf"},"content":{"rendered":"\n<!-- ============================================================\n     API-Key Kauf via Stripe\n     Einkopieren auf der API-Dokumentationsseite\n     ============================================================ -->\n<style>\n  #apibuy-outer { width:100%; box-sizing:border-box; font-family:'Segoe UI',Arial,sans-serif; font-size:13px; color:#2d3748; }\n  .apibuy-tiers { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:20px; }\n  .apibuy-tier {\n    flex:1; min-width:200px; border:2px solid #e2e8f0; border-radius:12px;\n    padding:20px; background:#fff; cursor:pointer; transition:all .2s; position:relative;\n  }\n  .apibuy-tier:hover { border-color:#e53e3e; box-shadow:0 4px 12px rgba(229,62,62,.1); }\n  .apibuy-tier.selected { border-color:#e53e3e; background:#fff5f5; }\n  .apibuy-tier-name { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:#718096; margin-bottom:6px; }\n  .apibuy-tier-price { font-size:26px; font-weight:700; color:#1a202c; margin-bottom:4px; }\n  .apibuy-tier-price span { font-size:13px; font-weight:400; color:#718096; }\n  .apibuy-tier-req { font-size:12px; color:#718096; margin-bottom:10px; }\n  .apibuy-tier-features { list-style:none; padding:0; margin:0; }\n  .apibuy-tier-features li { font-size:12px; padding:2px 0; color:#4a5568; }\n  .apibuy-tier-features li::before { content:'\u2713 '; color:#276749; font-weight:700; }\n  .apibuy-selected-badge {\n    position:absolute; top:-10px; right:12px;\n    background:#e53e3e; color:#fff; font-size:10px; font-weight:700;\n    padding:2px 10px; border-radius:10px;\n  }\n  .apibuy-btn {\n    width:100%; padding:13px; border:none; border-radius:8px;\n    background:#e53e3e; color:#fff; font-size:15px; font-weight:700;\n    cursor:pointer; transition:background .2s; margin-top:4px;\n  }\n  .apibuy-btn:hover { background:#c53030; }\n  .apibuy-btn:disabled { opacity:.5; cursor:not-allowed; }\n  .apibuy-spinner { display:inline-block; width:16px; height:16px; border:3px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation:apibuyspin .7s linear infinite; vertical-align:middle; margin-right:6px; }\n  @keyframes apibuyspin { to { transform:rotate(360deg); } }\n  .apibuy-secure { font-size:11px; color:#a0aec0; text-align:center; margin-top:10px; }\n  .apibuy-alert { border-radius:8px; padding:10px 14px; font-size:13px; margin-bottom:12px; }\n  .apibuy-alert-err { background:#fff5f5; border:1px solid #feb2b2; color:#742a2a; }\n<\/style>\n\n<div id=\"apibuy-outer\">\n  <div id=\"apibuy-alert\"><\/div>\n\n  <!-- Tier-Auswahl -->\n  <div class=\"apibuy-tiers\">\n    <div class=\"apibuy-tier selected\" id=\"apibuy-tier-basic\" onclick=\"waehle('basic')\">\n      <div class=\"apibuy-selected-badge\" id=\"apibuy-badge-basic\">\u2713 Gew\u00e4hlt<\/div>\n      <div class=\"apibuy-tier-name\">Basic<\/div>\n      <div class=\"apibuy-tier-price\">CHF 29<span>\/Mo<\/span><\/div>\n      <div class=\"apibuy-tier-req\">5&#8217;000 Req\/Tag \u00b7 API-Key<\/div>\n      <ul class=\"apibuy-tier-features\">\n        <li>Alle Endpoints<\/li>\n        <li>Suche &amp; Filter<\/li>\n        <li>Rate-Limit-Header<\/li>\n        <li>Support via E-Mail<\/li>\n      <\/ul>\n    <\/div>\n    <div class=\"apibuy-tier\" id=\"apibuy-tier-pro\" onclick=\"waehle('pro')\">\n      <div class=\"apibuy-selected-badge\" id=\"apibuy-badge-pro\" style=\"display:none;\">\u2713 Gew\u00e4hlt<\/div>\n      <div class=\"apibuy-tier-name\">Pro<\/div>\n      <div class=\"apibuy-tier-price\">CHF 79<span>\/Mo<\/span><\/div>\n      <div class=\"apibuy-tier-req\">50&#8217;000 Req\/Tag \u00b7 API-Key<\/div>\n      <ul class=\"apibuy-tier-features\">\n        <li>Alles aus Basic<\/li>\n        <li>Franz\u00f6sische Namen (lang=fr)<\/li>\n        <li>CSV-Export<\/li>\n        <li>Webhooks<\/li>\n      <\/ul>\n    <\/div>\n  <\/div>\n\n  <button class=\"apibuy-btn\" id=\"apibuy-btn\" onclick=\"kaufe()\">\n    Jetzt Basic abonnieren \u2013 CHF 29\/Mo\n  <\/button>\n  <div class=\"apibuy-secure\">&#x1f512; Sichere Zahlung via Stripe \u00b7 Monatlich k\u00fcndbar \u00b7 Key sofort per E-Mail<\/div>\n<\/div>\n\n<script>\nconst APIBUY_PRICES = {\n  basic: { priceId: 'price_1TeVGCKZkvHmj4lAxvQc8pqe', label: 'Basic', price: 29 },\n  pro:   { priceId: 'price_1TeVGgKZkvHmj4lAXC2JJHTj', label: 'Pro',   price: 79 },\n};\nconst APIBUY_PK = \"pk_live_51TbKrfKZkvHmj4lAHnd2h8IIy2E23vOzxFkXqJOiR2X1beTbjgtomEzD4kheM0oneyVHJnJlhABoQPfT8NEQRLxI00vpP0E7mA\";\n\nlet apibuyTier = 'basic';\n\nfunction waehle(tier) {\n  apibuyTier = tier;\n  ['basic','pro'].forEach(function(t) {\n    document.getElementById(\"apibuy-tier-\" + t).classList.toggle('selected', t === tier);\n    document.getElementById(\"apibuy-badge-\" + t).style.display = t === tier ? 'block' : 'none';\n  });\n  const p = APIBUY_PRICES[tier];\n  document.getElementById(\"apibuy-btn\").textContent =\n    \"Jetzt \" + p.label + \" abonnieren \u2013 CHF \" + p.price + \"\/Mo\";\n}\n\nasync function kaufe() {\n  const btn = document.getElementById(\"apibuy-btn\");\n  btn.disabled = true;\n  btn.innerHTML = \"<span class='apibuy-spinner'><\/span> Weiterleitung zu Stripe\u2026\";\n  document.getElementById(\"apibuy-alert\").innerHTML = \"\";\n\n  try {\n    const price = APIBUY_PRICES[apibuyTier];\n\n    \/\/ Stripe Checkout Session erstellen\n    const res = await fetch(\"https:\/\/www.drugshortage.ch\/api\/api_checkout.php?action=create\", {\n      method: \"POST\",\n      headers: {\"Content-Type\": \"application\/json\", \"X-Requested-With\": \"XMLHttpRequest\"},\n      body: JSON.stringify({priceId: price.priceId, tier: apibuyTier})\n    });\n    const d = await res.json();\n\n    if (d.error) {\n      document.getElementById(\"apibuy-alert\").innerHTML =\n        \"<div class='apibuy-alert apibuy-alert-err'>&#x274c; \" + d.error + \"<\/div>\";\n      btn.disabled = false;\n      btn.textContent = \"Jetzt \" + price.label + \" abonnieren \u2013 CHF \" + price.price + \"\/Mo\";\n      return;\n    }\n\n    \/\/ Zu Stripe Checkout weiterleiten\n    window.location.href = d.url;\n\n  } catch(err) {\n    document.getElementById(\"apibuy-alert\").innerHTML =\n      \"<div class='apibuy-alert apibuy-alert-err'>&#x274c; Fehler: \" + err + \"<\/div>\";\n    btn.disabled = false;\n  }\n}\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>\u2713 Gew\u00e4hlt Basic CHF 29\/Mo 5&#8217;000 Req\/Tag \u00b7 API-Key Alle Endpoints Suche &amp; Filter Rate-Limit-Header Support via E-Mail \u2713 Gew\u00e4hlt Pro CHF 79\/Mo 50&#8217;000 Req\/Tag \u00b7 API-Key Alles aus Basic Franz\u00f6sische Namen (lang=fr) CSV-Export Webhooks Jetzt Basic abonnieren \u2013 CHF 29\/Mo &#x1f512; Sichere Zahlung via Stripe \u00b7 Monatlich k\u00fcndbar \u00b7 Key sofort per E-Mail<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":"","_members_access_role":[],"_members_access_error":""},"class_list":["post-21601","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/comments?post=21601"}],"version-history":[{"count":1,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21601\/revisions"}],"predecessor-version":[{"id":21602,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21601\/revisions\/21602"}],"wp:attachment":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/media?parent=21601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}