{"id":30998,"date":"2026-12-03T13:41:40","date_gmt":"2026-12-03T13:41:40","guid":{"rendered":"https:\/\/cutflow.app\/?page_id=30998"},"modified":"2026-12-03T17:01:57","modified_gmt":"2026-12-03T17:01:57","slug":"payment-collect-integration","status":"publish","type":"page","link":"https:\/\/cutflow.app\/es\/payment-collect-integration\/","title":{"rendered":"Payment Collect Integration"},"content":{"rendered":"<!-- Cutflow developer docs \u2014 paste into a WordPress \"Custom HTML\" block. Everything is scoped under .cf-docs -->\n<style>\n.cf-docs{\n  \/* Brand (from cutflow.app \/ Elementor). #0078D4 fails AA as body-link text on #151515, so links use --cf-link. *\/\n  --cf-blue:#0078D4;\n  --cf-blue-hover:#5EB3F5;\n  --cf-link:#4DA3E8;\n  --cf-link-hover:#79C0FF;\n  --cf-blue-text:#79C0FF;\n  --cf-blue-soft:rgba(0,120,212,.18);\n  --cf-green:#23A455;\n  --cf-green-badge:#23874F; \/* slightly darker so white badge type meets AA *\/\n  --cf-green-text:#6ECE8C;\n  --cf-green-soft:rgba(35,164,85,.18);\n  --cf-red:#CB4A40;\n  --cf-red-text:#F08A82;\n  --cf-red-soft:rgba(203,74,64,.18);\n  --cf-amber:#EEC432;\n  --cf-amber-text:#EEC432;\n  --cf-amber-soft:rgba(238,196,50,.14);\n  \/* Surfaces *\/\n  --cf-bg:#151515;\n  --cf-bg-alt:#1C1C1C;\n  --cf-bg-elev:#222222;\n  --cf-ink:#FEFEFE;\n  --cf-text:#E0E0E0;\n  --cf-muted:#A2A2A2;\n  --cf-line:#2F2F2F;\n  --cf-code-bg:#0E0E0E;\n  --cf-code-head:#161616;\n  --cf-code-text:#E8E8E8;\n  --cf-copy-bg:#2A2A2A;\n  --cf-copy-line:#3D3D3D;\n  --cf-badge-text:#FFFFFF;\n  --cf-syn-key:#79C0FF;\n  --cf-syn-str:#A5D6A7;\n  --cf-syn-num:#FFB86C;\n  --cf-syn-bool:#FF8FA3;\n  --cf-syn-punct:#8B8B8B;\n  --cf-syn-comment:#7D8590;\n  --cf-head:stolzl,\"DM Sans\",system-ui,-apple-system,\"Segoe UI\",sans-serif;\n  --cf-body:\"DM Sans\",system-ui,-apple-system,\"Segoe UI\",sans-serif;\n  --cf-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,\"Liberation Mono\",monospace;\n  --cf-top:24px; \/* sticky offset: raise to your theme's fixed header height *\/\n  box-sizing:border-box;max-width:1200px;margin:0 auto;padding:24px 20px 64px;\n  font-family:var(--cf-body);font-size:16px;line-height:1.65;color:var(--cf-text);background:var(--cf-bg);\n  display:grid;grid-template-columns:240px minmax(0,1fr);gap:48px;align-items:start;text-align:left;\n}\n.cf-docs *,.cf-docs *::before,.cf-docs *::after{box-sizing:border-box}\n.cf-docs a{color:var(--cf-link);text-decoration:none}\n.cf-docs a:hover{color:var(--cf-link-hover);text-decoration:underline}\n\n.cf-docs .cf-side{position:sticky;top:var(--cf-top);align-self:start}\n.cf-docs .cf-side summary{list-style:none;cursor:pointer;font:600 12px\/1 var(--cf-head);letter-spacing:.08em;text-transform:uppercase;color:var(--cf-muted);padding:0 0 12px}\n.cf-docs .cf-side summary::-webkit-details-marker{display:none}\n.cf-docs .cf-nav{list-style:none;margin:0;padding:0;border-left:2px solid var(--cf-line)}\n.cf-docs .cf-nav li{margin:0;padding:0}\n.cf-docs .cf-nav a{display:block;padding:7px 14px;margin-left:-2px;border-left:2px solid transparent;color:var(--cf-text);font-size:15px;font-weight:500}\n.cf-docs .cf-nav a:hover{color:var(--cf-link);text-decoration:none}\n.cf-docs .cf-nav a.is-active{color:var(--cf-link);border-left-color:var(--cf-blue);background:linear-gradient(90deg,var(--cf-blue-soft),transparent)}\n\n.cf-docs .cf-main{min-width:0}\n.cf-docs .cf-eyebrow{display:inline-block;font:600 12px\/1 var(--cf-head);letter-spacing:.08em;text-transform:uppercase;color:var(--cf-blue-text);background:var(--cf-blue-soft);padding:7px 12px;border-radius:999px;margin:0 0 16px}\n.cf-docs h1,.cf-docs h2,.cf-docs h3{font-family:var(--cf-head);color:var(--cf-ink);letter-spacing:-.01em;margin:0}\n.cf-docs h1{font-size:clamp(30px,4.5vw,44px);line-height:1.1;font-weight:700;margin-bottom:14px}\n.cf-docs h2{font-size:clamp(23px,3vw,29px);line-height:1.2;font-weight:700;padding-top:40px;margin:40px 0 14px;border-top:1px solid var(--cf-line);scroll-margin-top:calc(var(--cf-top) + 8px)}\n.cf-docs section:first-of-type h2{border-top:0;margin-top:24px;padding-top:0}\n.cf-docs h3{font-size:18px;font-weight:600;margin:28px 0 10px}\n.cf-docs p{margin:0 0 14px}\n.cf-docs .cf-lead{font-size:18px;color:var(--cf-muted);max-width:62ch}\n.cf-docs ul.cf-list,.cf-docs ol.cf-list{margin:0 0 16px;padding-left:22px}\n.cf-docs .cf-list li{margin:4px 0}\n.cf-docs code{font-family:var(--cf-mono);font-size:.88em;background:var(--cf-bg-alt);border:1px solid var(--cf-line);border-radius:5px;padding:.08em .28em;color:var(--cf-ink);overflow-wrap:anywhere}\n\n.cf-docs .cf-endpoint{display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:10px 14px;background:var(--cf-bg-alt);border:1px solid var(--cf-line);border-radius:12px;overflow-x:auto}\n.cf-docs .cf-method{flex:none;font:700 12px\/1 var(--cf-mono);letter-spacing:.04em;padding:6px 10px;border-radius:6px;color:var(--cf-badge-text);background:var(--cf-muted)}\n.cf-docs .cf-method.get{background:var(--cf-green-badge)}\n.cf-docs .cf-method.post{background:var(--cf-blue)}\n.cf-docs .cf-method.put,.cf-docs .cf-method.patch{background:var(--cf-amber);color:var(--cf-bg)}\n.cf-docs .cf-method.delete{background:var(--cf-red)}\n.cf-docs .cf-path{font:500 14.5px\/1.4 var(--cf-mono);color:var(--cf-ink);white-space:nowrap;background:none;border:0;padding:0}\n.cf-docs .cf-path em{font-style:normal;color:var(--cf-blue-text)}\n\n.cf-docs .cf-header{margin:0 0 16px;padding:12px 16px;background:var(--cf-bg-alt);border:1px solid var(--cf-line);border-radius:12px;font:500 14.5px\/1.5 var(--cf-mono);color:var(--cf-ink);overflow-x:auto;white-space:nowrap}\n.cf-docs .cf-callout .cf-header{margin:10px 0;background:var(--cf-bg)}\n.cf-docs .cf-header .t-k{color:var(--cf-muted);font-weight:600}\n\n.cf-docs .cf-code{position:relative;margin:0 0 20px;border-radius:12px;background:var(--cf-code-bg);overflow:hidden;border:1px solid var(--cf-line);box-shadow:0 12px 32px rgba(0,0,0,.35)}\n.cf-docs .cf-code-head{display:flex;align-items:center;justify-content:space-between;padding:8px 8px 8px 16px;background:var(--cf-code-head);border-bottom:1px solid var(--cf-line)}\n.cf-docs .cf-code-label{font:600 11px\/1 var(--cf-head);letter-spacing:.08em;text-transform:uppercase;color:var(--cf-muted)}\n.cf-docs .cf-copy{font:600 12px\/1 var(--cf-body);color:var(--cf-ink);background:var(--cf-copy-bg);border:1px solid var(--cf-copy-line);border-radius:999px;padding:7px 14px;cursor:pointer}\n.cf-docs .cf-copy:hover{background:var(--cf-blue);border-color:var(--cf-blue);color:var(--cf-badge-text)}\n.cf-docs .cf-copy.is-done{background:var(--cf-green-badge);border-color:var(--cf-green-badge);color:var(--cf-badge-text)}\n.cf-docs .cf-code pre{margin:0;padding:16px 18px;overflow-x:auto;background:transparent;border:0;color:var(--cf-code-text);font:400 13.5px\/1.7 var(--cf-mono);tab-size:2;white-space:pre}\n.cf-docs .cf-code pre code{background:none;border:0;padding:0;font:inherit;color:inherit}\n.cf-docs .t-k{color:var(--cf-syn-key)}\n.cf-docs .t-s{color:var(--cf-syn-str)}\n.cf-docs .t-n{color:var(--cf-syn-num)}\n.cf-docs .t-b{color:var(--cf-syn-bool)}\n.cf-docs .t-p{color:var(--cf-syn-punct)}\n.cf-docs .t-c{color:var(--cf-syn-comment);font-style:italic}\n\n.cf-docs .cf-callout{margin:0 0 20px;padding:14px 16px 14px 18px;border-radius:12px;border:1px solid var(--cf-line);border-left:4px solid var(--cf-blue);background:var(--cf-blue-soft)}\n.cf-docs .cf-callout p{margin:0 0 8px}\n.cf-docs .cf-callout p:last-child{margin:0}\n.cf-docs .cf-callout strong.cf-ct{display:block;font:700 12px\/1 var(--cf-head);letter-spacing:.07em;text-transform:uppercase;margin-bottom:6px;color:var(--cf-blue-text)}\n.cf-docs .cf-callout.warn{border-left-color:var(--cf-amber);background:var(--cf-amber-soft)}\n.cf-docs .cf-callout.warn strong.cf-ct{color:var(--cf-amber-text)}\n.cf-docs .cf-callout.error{border-left-color:var(--cf-red);background:var(--cf-red-soft)}\n.cf-docs .cf-callout.error strong.cf-ct{color:var(--cf-red-text)}\n.cf-docs .cf-callout.ok{border-left-color:var(--cf-green);background:var(--cf-green-soft)}\n.cf-docs .cf-callout.ok strong.cf-ct{color:var(--cf-green-text)}\n\n.cf-docs .cf-table-wrap{margin:0 0 20px;overflow-x:auto;border:1px solid var(--cf-line);border-radius:12px}\n.cf-docs table.cf-table{width:100%;border-collapse:collapse;margin:0;font-size:15px;background:var(--cf-bg-alt)}\n.cf-docs .cf-table th{text-align:left;font:600 12px\/1 var(--cf-head);letter-spacing:.07em;text-transform:uppercase;color:var(--cf-muted);background:var(--cf-bg-alt);padding:12px 16px;border:0;border-bottom:1px solid var(--cf-line)}\n.cf-docs .cf-table td{padding:12px 16px;border:0;border-bottom:1px solid var(--cf-line);vertical-align:top}\n.cf-docs .cf-table tr:last-child td{border-bottom:0}\n.cf-docs .cf-pill{display:inline-block;font:600 12px\/1 var(--cf-mono);padding:5px 9px;border-radius:999px;background:var(--cf-bg-elev);color:var(--cf-text);border:1px solid var(--cf-line)}\n.cf-docs .cf-pill.ok{background:var(--cf-green-soft);color:var(--cf-green-text);border-color:transparent}\n.cf-docs .cf-pill.err{background:var(--cf-red-soft);color:var(--cf-red-text);border-color:transparent}\n.cf-docs .cf-pill.info{background:var(--cf-blue-soft);color:var(--cf-blue-text);border-color:transparent}\n.cf-docs .cf-pill.warn{background:var(--cf-amber-soft);color:var(--cf-amber-text);border-color:transparent}\n\n\n.cf-docs .cf-pills{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;align-items:center}\n.cf-docs .cf-muted{color:var(--cf-muted)}\n.cf-docs .cf-table td[data-label]{}\n@media (max-width:640px){\n  .cf-docs .cf-path{white-space:pre-wrap;overflow-wrap:anywhere}\n  .cf-docs .cf-code pre{font-size:12.5px}\n  .cf-docs .cf-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}\n  .cf-docs table.cf-table,.cf-docs .cf-table tbody,.cf-docs .cf-table tr,.cf-docs .cf-table th,.cf-docs .cf-table td{display:block;width:100%}\n  .cf-docs .cf-table tr{padding:12px 16px;border-bottom:1px solid var(--cf-line)}\n  .cf-docs .cf-table tr:last-child{border-bottom:0}\n  .cf-docs .cf-table td,.cf-docs .cf-table th{padding:3px 0;border:0}\n  .cf-docs .cf-table td::before{content:attr(data-label);display:block;font:600 11px\/1 var(--cf-head);letter-spacing:.07em;text-transform:uppercase;color:var(--cf-muted);margin:8px 0 4px}\n  .cf-docs .cf-table td:first-child::before{margin-top:0}\n  .cf-docs .cf-table td.cf-empty{display:none}\n}\n@media (max-width:900px){\n  .cf-docs{display:block;padding:16px 16px 48px}\n  .cf-docs .cf-side{position:static;margin:0 0 24px;padding:14px 16px;background:var(--cf-bg-alt);border:1px solid var(--cf-line);border-radius:12px}\n  .cf-docs .cf-side summary{padding:0;display:flex;justify-content:space-between;align-items:center}\n  .cf-docs .cf-side summary::after{content:\"+\";font-size:18px;line-height:1}\n  .cf-docs .cf-side[open] summary::after{content:\"\\2212\"}\n  .cf-docs .cf-side[open] summary{padding-bottom:12px}\n  .cf-docs h2{scroll-margin-top:16px}\n}\n@media (prefers-reduced-motion:no-preference){.cf-docs{scroll-behavior:smooth}}\n<\/style>\n<style>\n.cf-docs .cf-side{max-height:calc(100vh - var(--cf-top) - 20px);overflow-y:auto}\n.cf-docs .cf-diagram{margin:0 0 20px;padding:16px;background:var(--cf-bg-alt);border:1px solid var(--cf-line);border-radius:12px;overflow-x:auto}\n.cf-docs .cf-diagram svg{display:block;width:100%;min-width:640px;height:auto;font-family:var(--cf-body);font-size:15px;fill:var(--cf-text)}\n.cf-docs .cf-node{fill:var(--cf-bg-elev);stroke:var(--cf-line);stroke-width:1.5}\n.cf-docs .cf-life{stroke:var(--cf-muted);stroke-dasharray:5 5;opacity:.55}\n.cf-docs .cf-arrow{stroke:var(--cf-blue-text);stroke-width:1.5;fill:none}\n.cf-docs .cf-msg{font-size:12px;fill:var(--cf-text)}\n@media(max-width:900px){.cf-docs .cf-side{max-height:none;overflow:visible}}\n<\/style>\n<div class=\"cf-docs\" id=\"cf-docs\"><details class=\"cf-side\" open><summary>On this page<\/summary><ul class=\"cf-nav\"><li><a href=\"#cf-how-a-payment-works\">How a payment works<\/a><\/li><li><a href=\"#cf-authentication\">Authentication<\/a><\/li><li><a href=\"#cf-payment-link-object\">Payment link object<\/a><\/li><li><a href=\"#cf-list-merchants\">List merchants<\/a><\/li><li><a href=\"#cf-create-a-payment-link\">Create a payment link<\/a><\/li><li><a href=\"#cf-retrieve-a-payment-link\">Retrieve a payment link<\/a><\/li><li><a href=\"#cf-cancel-a-payment-link\">Cancel a payment link<\/a><\/li><li><a href=\"#cf-register-a-webhook-or-a-callback\">Register a webhook or a callback<\/a><\/li><li><a href=\"#cf-send-a-test-webhook\">Send a test webhook<\/a><\/li><li><a href=\"#cf-webhook-payment-collect-finished\">Webhook: payment-collect-finished<\/a><\/li><li><a href=\"#cf-callback\">Callback<\/a><\/li><\/ul><\/details><main class=\"cf-main\"><span class=\"cf-eyebrow\">Developer docs<\/span><h1>Payment collect<\/h1>\n<p class=\"cf-lead\">Payment collect is how your system asks a customer to pay a specific amount. You create a payment link, send the customer to that link, and Cutflow hosts the card page. When the customer finishes, Cutflow notifies your system.<\/p>\n<p>Your server keeps the access key. The link you give the customer is only a checkout page. It does not carry the access key.<\/p>\n<p>Base URL: <code>https:\/\/api.cutflow.app\/v1<\/code><\/p><section>\n<h2 id=\"cf-how-a-payment-works\">How a payment works<\/h2>\n<div class=\"cf-diagram\"><svg aria-label=\"Payment sequence\" role=\"img\" viewbox=\"0 0 760 420\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><defs><marker id=\"cf-arrow\" markerheight=\"8\" markerwidth=\"8\" orient=\"auto\" refx=\"7\" refy=\"4\"><path d=\"M0 0L8 4L0 8Z\" fill=\"#79C0FF\"><\/path><\/marker><\/defs><rect class=\"cf-node\" height=\"42\" rx=\"8\" width=\"180\" x=\"20\" y=\"12\"><\/rect><text text-anchor=\"middle\" x=\"110\" y=\"38\">Your system<\/text><path class=\"cf-life\" d=\"M110 54V405\"><\/path><rect class=\"cf-node\" height=\"42\" rx=\"8\" width=\"180\" x=\"290\" y=\"12\"><\/rect><text text-anchor=\"middle\" x=\"380\" y=\"38\">Cutflow<\/text><path class=\"cf-life\" d=\"M380 54V405\"><\/path><rect class=\"cf-node\" height=\"42\" rx=\"8\" width=\"180\" x=\"560\" y=\"12\"><\/rect><text text-anchor=\"middle\" x=\"650\" y=\"38\">Customer<\/text><path class=\"cf-life\" d=\"M650 54V405\"><\/path><text class=\"cf-msg\" text-anchor=\"middle\" x=\"245.0\" y=\"91\">Create a payment link<\/text><path class=\"cf-arrow\" d=\"M110 100H380\" marker-end=\"url(#cf-arrow)\"><\/path><text class=\"cf-msg\" text-anchor=\"middle\" x=\"245.0\" y=\"146\">paymentCode and url<\/text><path class=\"cf-arrow\" d=\"M380 155H110\" marker-end=\"url(#cf-arrow)\"><\/path><text class=\"cf-msg\" text-anchor=\"middle\" x=\"380.0\" y=\"201\">Send the customer to the url<\/text><path class=\"cf-arrow\" d=\"M110 210H650\" marker-end=\"url(#cf-arrow)\"><\/path><text class=\"cf-msg\" text-anchor=\"middle\" x=\"515.0\" y=\"256\">Pays on the hosted page<\/text><path class=\"cf-arrow\" d=\"M650 265H380\" marker-end=\"url(#cf-arrow)\"><\/path><text class=\"cf-msg\" text-anchor=\"middle\" x=\"245.0\" y=\"311\">POST payment-collect-finished<\/text><path class=\"cf-arrow\" d=\"M380 320H110\" marker-end=\"url(#cf-arrow)\"><\/path><text class=\"cf-msg\" text-anchor=\"middle\" x=\"515.0\" y=\"366\">Browser opens your callback URL<\/text><path class=\"cf-arrow\" d=\"M380 375H650\" marker-end=\"url(#cf-arrow)\"><\/path><\/svg><\/div>\n<ol class=\"cf-list\">\n<li>List the card merchants for the business and choose the one that should receive the money.<\/li>\n<li>Create a payment link for an amount. Save <code>paymentCode<\/code>. Give <code>url<\/code> to the customer.<\/li>\n<li>The customer pays on the Cutflow page. You can poll the link if you want the current status.<\/li>\n<li>Cutflow posts <code>payment-collect-finished<\/code> to every webhook you registered, when the link is paid or cancelled.<\/li>\n<li>After a successful payment, the customer&#8217;s browser is sent to your callback URL.<\/li>\n<\/ol>\n<div class=\"cf-diagram\"><svg aria-label=\"Payment states\" role=\"img\" viewbox=\"0 0 760 280\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><defs><marker id=\"cf-state-arrow\" markerheight=\"8\" markerwidth=\"8\" orient=\"auto\" refx=\"7\" refy=\"4\"><path d=\"M0 0L8 4L0 8Z\" fill=\"#79C0FF\"><\/path><\/marker><\/defs><circle cx=\"35\" cy=\"75\" fill=\"#79C0FF\" r=\"8\"><\/circle><g class=\"cf-arrow\" marker-end=\"url(#cf-state-arrow)\"><path d=\"M45 75H95\"><\/path><path d=\"M245 75H345\"><\/path><path d=\"M495 75H595\"><\/path><path d=\"M420 100V150H170V100\"><\/path><path d=\"M150 100V220H345\"><\/path><\/g><g class=\"cf-msg\" text-anchor=\"middle\"><text x=\"295\" y=\"61\">customer pays<\/text><text x=\"545\" y=\"61\">charge approved<\/text><text x=\"295\" y=\"140\">charge declined<\/text><text x=\"245\" y=\"210\">you cancel<\/text><\/g><rect class=\"cf-node\" height=\"50\" rx=\"9\" style=\"stroke:#79C0FF\" width=\"150\" x=\"95\" y=\"50\"><\/rect><text style=\"fill:#79C0FF\" text-anchor=\"middle\" x=\"170\" y=\"80\">pending<\/text><rect class=\"cf-node\" height=\"50\" rx=\"9\" style=\"stroke:#EEC432\" width=\"150\" x=\"345\" y=\"50\"><\/rect><text style=\"fill:#EEC432\" text-anchor=\"middle\" x=\"420\" y=\"80\">processing<\/text><rect class=\"cf-node\" height=\"50\" rx=\"9\" style=\"stroke:#6ECE8C\" width=\"150\" x=\"595\" y=\"50\"><\/rect><text style=\"fill:#6ECE8C\" text-anchor=\"middle\" x=\"670\" y=\"80\">paid<\/text><rect class=\"cf-node\" height=\"50\" rx=\"9\" style=\"stroke:#A2A2A2\" width=\"150\" x=\"345\" y=\"195\"><\/rect><text style=\"fill:#A2A2A2\" text-anchor=\"middle\" x=\"420\" y=\"225\">cancelled<\/text><\/svg><\/div>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Status<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Status\"><span class=\"cf-pill info\">pending<\/span><\/td>\n<td data-label=\"Meaning\">The link is waiting for the customer. You can still cancel it.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Status\"><span class=\"cf-pill warn\">processing<\/span><\/td>\n<td data-label=\"Meaning\">A charge is in progress. Wait for <code>paid<\/code>, or for the link to return to <code>pending<\/code> if the charge is declined.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Status\"><span class=\"cf-pill ok\">paid<\/span><\/td>\n<td data-label=\"Meaning\">The customer paid. A paid link cannot be cancelled, and trying to cancel it does not refund the charge.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Status\"><span class=\"cf-pill\">cancelled<\/span><\/td>\n<td data-label=\"Meaning\">You cancelled the link before a charge started.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/section><section>\n<h2 id=\"cf-authentication\">Authentication<\/h2>\n<p>Create an access key in Cutflow, under Payment collect, and store it on your server. Send it on every request:<\/p>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">HTTP<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code>Authorization: Bearer &lt;access key&gt;\nContent-Type: application\/json<\/code><\/pre><\/div>\n<p>A failed call returns JSON:<\/p>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>reference<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Stable code to match in your client.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>message<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Short description of the failure.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>details<\/code><\/td>\n<td data-label=\"Type\">any<\/td>\n<td data-label=\"Description\">Extra information. Omitted when there is none.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"reference\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"general\/bad_request\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"message\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"bad request, malformed body\"<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>HTTP<\/th>\n<th><code>reference<\/code><\/th>\n<th><code>message<\/code><\/th>\n<th>When<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">400<\/span><\/td>\n<td data-label=\"reference\"><code>general\/missing_headers<\/code><\/td>\n<td data-label=\"message\"><code>missing headers<\/code><\/td>\n<td data-label=\"When\">The <code>Authorization<\/code> header is missing.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">401<\/span><\/td>\n<td data-label=\"reference\"><code>auth\/unauthorized<\/code><\/td>\n<td data-label=\"message\"><code>invalid authentication details provided<\/code><\/td>\n<td data-label=\"When\">The access key is not accepted.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">400<\/span><\/td>\n<td data-label=\"reference\"><code>general\/bad_request<\/code><\/td>\n<td data-label=\"message\"><code>bad request, malformed body<\/code><\/td>\n<td data-label=\"When\">The body or the link state cannot be accepted.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">404<\/span><\/td>\n<td data-label=\"reference\"><code>general\/record_not_found<\/code><\/td>\n<td data-label=\"message\"><code>record not found<\/code><\/td>\n<td data-label=\"When\">No payment link with that code belongs to this access key.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">404<\/span><\/td>\n<td data-label=\"reference\"><code>proceesor_merchant\/not_found<\/code><\/td>\n<td data-label=\"message\"><code>processor merchant not found<\/code><\/td>\n<td data-label=\"When\"><code>processorMerchantId<\/code> is not one of this business&#8217;s merchants.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/section><section>\n<h2 id=\"cf-payment-link-object\">Payment link object<\/h2>\n<p>Create, retrieve, and cancel all return this object.<\/p>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>paymentCode<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Code Cutflow assigns to this link. Keep it. You pass it to check the status or cancel the link, and Cutflow sends the same code on the webhook and the callback so you know which link finished.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>url<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Hosted checkout page. Give this to the customer.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>amount<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Charge before tax, rounded to 2 decimals.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>tax<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Tax, rounded to 2 decimals. <code>0<\/code> when you omit tax.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>total<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\"><code>amount<\/code> plus <code>tax<\/code>, rounded to 2 decimals. Cutflow calculates this.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>currency<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\"><code>usd<\/code>, <code>cad<\/code>, <code>dop<\/code>, or <code>eur<\/code>. Cutflow sets this from the business country. A business with no country currency uses <code>usd<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>status<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\"><code>pending<\/code>, <code>processing<\/code>, <code>paid<\/code>, or <code>cancelled<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>context<\/code><\/td>\n<td data-label=\"Type\">string or null<\/td>\n<td data-label=\"Description\">The string you sent at creation, returned unchanged. <code>null<\/code> when you did not send one. Cutflow also returns this value on the webhook and on the callback URL.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"paymentCode\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"url\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"https:\/\/shop.example\/collect\/7c9e6679-7425-40de-944b-e07fc1f90ae7\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"amount\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">25<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"tax\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">2<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"total\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">27<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"currency\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"usd\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"status\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"pending\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"context\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"order-1001\"<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<\/section><section>\n<h2 id=\"cf-list-merchants\">List merchants<\/h2>\n<div class=\"cf-endpoint\"><span class=\"cf-method get\">GET<\/span><code class=\"cf-path\">\/payment-collect\/merchants<\/code><\/div>\n<p>Returns the card merchants that can receive a payment link. Call this before you create a link, and pass the merchant <code>id<\/code> as <code>processorMerchantId<\/code>.<\/p>\n<p>No request body.<\/p>\n<h3>Response <code>200<\/code><\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>merchants<\/code><\/td>\n<td data-label=\"Type\">array<\/td>\n<td data-label=\"Description\">Merchants for the business that owns the access key. Empty when the business has none.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>merchants[].id<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Merchant id. A UUID. Send this value as <code>processorMerchantId<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>merchants[].processor<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Card processor. One of <code>stripe<\/code>, <code>azul<\/code>, <code>tsys<\/code>, <code>cardnet<\/code>, <code>sabadell<\/code>, <code>globalpayments<\/code>, <code>mastercard<\/code>, <code>magensa<\/code>, <code>godaddy<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>merchants[].mid<\/code><\/td>\n<td data-label=\"Type\">string or null<\/td>\n<td data-label=\"Description\">Merchant number at the processor.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>merchants[].description<\/code><\/td>\n<td data-label=\"Type\">string or null<\/td>\n<td data-label=\"Description\">Name shown for this merchant in Cutflow.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"merchants\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-p\">[<\/span>\n    <span class=\"t-p\">{<\/span>\n      <span class=\"t-k\">\"id\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"480a875b-a75d-4ab7-b687-dba76500feab\"<\/span><span class=\"t-p\">,<\/span>\n      <span class=\"t-k\">\"processor\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"tsys\"<\/span><span class=\"t-p\">,<\/span>\n      <span class=\"t-k\">\"mid\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"123456789\"<\/span><span class=\"t-p\">,<\/span>\n      <span class=\"t-k\">\"description\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"Main merchant\"<\/span>\n    <span class=\"t-p\">}<\/span>\n  <span class=\"t-p\">]<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<\/section><section>\n<h2 id=\"cf-create-a-payment-link\">Create a payment link<\/h2>\n<div class=\"cf-endpoint\"><span class=\"cf-method post\">POST<\/span><code class=\"cf-path\">\/payment-collect\/requests<\/code><\/div>\n<p>Creates a link in <code>pending<\/code> status. Cutflow sets <code>total<\/code>, <code>currency<\/code>, <code>paymentCode<\/code>, and <code>url<\/code>.<\/p>\n<h3>Request<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>processorMerchantId<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\">Merchant <code>id<\/code> from <a href=\"#cf-list-merchants\">List merchants<\/a>. A UUID.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>amount<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\">Amount before tax. Must be greater than 0. Rounded to 2 decimals.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>tax<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Required\">no<\/td>\n<td data-label=\"Description\">Tax. Defaults to <code>0<\/code>. Must be <code>0<\/code> or greater. Rounded to 2 decimals.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>context<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Required\">no<\/td>\n<td data-label=\"Description\">A value you want back with this payment. Cutflow stores it and returns the same string on the webhook and as a query parameter on the callback URL, so your system can tell which order finished. At most 255 characters. Blank becomes <code>null<\/code>. A number or object is rejected.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"processorMerchantId\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"480a875b-a75d-4ab7-b687-dba76500feab\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"amount\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">25<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"tax\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">2<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"context\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"order-1001\"<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<h3>Response <code>200<\/code><\/h3>\n<p>A <a href=\"#cf-payment-link-object\">payment link object<\/a>. <code>status<\/code> is <code>pending<\/code>.<\/p>\n<h3>Errors<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>HTTP<\/th>\n<th><code>reference<\/code><\/th>\n<th>When<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">400<\/span><\/td>\n<td data-label=\"reference\"><code>general\/bad_request<\/code><\/td>\n<td data-label=\"When\">The merchant id is missing or is not a UUID, <code>amount<\/code> is missing or not greater than 0, <code>tax<\/code> is negative, or <code>context<\/code> is not a string of at most 255 characters.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">404<\/span><\/td>\n<td data-label=\"reference\"><code>proceesor_merchant\/not_found<\/code><\/td>\n<td data-label=\"When\">That merchant does not belong to this access key.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/section><section>\n<h2 id=\"cf-retrieve-a-payment-link\">Retrieve a payment link<\/h2>\n<div class=\"cf-endpoint\"><span class=\"cf-method get\">GET<\/span><code class=\"cf-path\">\/payment-collect\/requests\/<em>:paymentCode<\/em><\/code><\/div>\n<p>Returns the current link. Poll this when you need the status and you have not received the webhook yet.<\/p>\n<h3>Path<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>paymentCode<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\"><code>paymentCode<\/code> from the create response.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<p>No request body.<\/p>\n<h3>Response <code>200<\/code><\/h3>\n<p>A <a href=\"#cf-payment-link-object\">payment link object<\/a>.<\/p>\n<h3>Errors<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>HTTP<\/th>\n<th><code>reference<\/code><\/th>\n<th>When<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">404<\/span><\/td>\n<td data-label=\"reference\"><code>general\/record_not_found<\/code><\/td>\n<td data-label=\"When\">No link with that code belongs to this access key.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/section><section>\n<h2 id=\"cf-cancel-a-payment-link\">Cancel a payment link<\/h2>\n<div class=\"cf-endpoint\"><span class=\"cf-method post\">POST<\/span><code class=\"cf-path\">\/payment-collect\/requests\/<em>:paymentCode<\/em>\/cancel<\/code><\/div>\n<p>Cancels a link that is still <code>pending<\/code>. The customer can no longer pay it. Cutflow then posts <code>payment-collect-finished<\/code> with <code>status<\/code> <code>cancelled<\/code>.<\/p>\n<p>A <code>processing<\/code> or <code>paid<\/code> link cannot be cancelled, and the call returns <code>400<\/code>. Trying to cancel a paid link does not refund the charge.<\/p>\n<h3>Path<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>paymentCode<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\"><code>paymentCode<\/code> from the create response.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<p>No request body.<\/p>\n<h3>Response <code>200<\/code><\/h3>\n<p>A <a href=\"#cf-payment-link-object\">payment link object<\/a>. <code>status<\/code> is <code>cancelled<\/code>.<\/p>\n<h3>Errors<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>HTTP<\/th>\n<th><code>reference<\/code><\/th>\n<th>When<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">400<\/span><\/td>\n<td data-label=\"reference\"><code>general\/bad_request<\/code><\/td>\n<td data-label=\"When\">The link is <code>processing<\/code>, <code>paid<\/code>, or already <code>cancelled<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">404<\/span><\/td>\n<td data-label=\"reference\"><code>general\/record_not_found<\/code><\/td>\n<td data-label=\"When\">No link with that code belongs to this access key.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/section><section>\n<h2 id=\"cf-register-a-webhook-or-a-callback\">Register a webhook or a callback<\/h2>\n<div class=\"cf-endpoint\"><span class=\"cf-method post\">POST<\/span><code class=\"cf-path\">\/payment-collect\/hooks<\/code><\/div>\n<p>Registers where Cutflow should contact you.<\/p>\n<ul class=\"cf-list\">\n<li>A <strong>webhook<\/strong> is a server endpoint. Cutflow sends an HTTP <code>POST<\/code> with JSON when a link is paid or cancelled. You can register more than one. Every registered webhook receives the event.<\/li>\n<li>A <strong>callback<\/strong> is a page in the customer&#8217;s browser. After a successful payment, Cutflow sends the browser to that URL. The business has one callback. Registering another callback replaces the previous URL.<\/li>\n<\/ul>\n<h3>Request<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>type<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\"><code>webhook<\/code> or <code>callback<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>url<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\"><code>http<\/code> or <code>https<\/code> URL, at most 2048 characters. The host must be public. Localhost, private networks, and cloud metadata addresses are rejected. A username or password in the URL is rejected. Cutflow does not follow a redirect from this URL.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>secret<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Required\">no<\/td>\n<td data-label=\"Description\">Signing secret for a webhook, at most 255 characters. Blank means the webhook is unsigned. Ignored for a callback. Cutflow never returns this value.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"type\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"webhook\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"url\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"https:\/\/example.com\/cutflow\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"secret\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"your-signing-secret\"<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<h3>Response <code>200<\/code><\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>id<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Id of this registration. The same id is used in a <a href=\"#cf-send-a-test-webhook\">test delivery<\/a>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>businessId<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Business that owns the access key.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>name<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\"><code>payment-collect-finished-webhook<\/code> or <code>payment-collect-finished-callback<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>type<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\"><code>webhook<\/code> or <code>callback<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>url<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">URL Cutflow will call.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>createdAt<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">When the registration was created, ISO 8601.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>updatedAt<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">When the registration was last changed, ISO 8601. A replaced callback updates this time.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"id\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">12<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"businessId\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">362<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"name\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"payment-collect-finished-webhook\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"type\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"webhook\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"url\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"https:\/\/example.com\/cutflow\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"createdAt\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"2026-12-03T16:00:00.000Z\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"updatedAt\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"2026-12-03T16:00:00.000Z\"<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<h3>Errors<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>HTTP<\/th>\n<th><code>reference<\/code><\/th>\n<th>When<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">400<\/span><\/td>\n<td data-label=\"reference\"><code>general\/bad_request<\/code><\/td>\n<td data-label=\"When\"><code>type<\/code> is not <code>webhook<\/code> or <code>callback<\/code>, the URL is missing or not a public <code>http<\/code>\/<code>https<\/code> address, or <code>secret<\/code> is not a string of at most 255 characters.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/section><section>\n<h2 id=\"cf-send-a-test-webhook\">Send a test webhook<\/h2>\n<div class=\"cf-endpoint\"><span class=\"cf-method post\">POST<\/span><code class=\"cf-path\">\/payment-collect\/hooks\/test<\/code><\/div>\n<p>Posts a sample <code>payment-collect-finished<\/code> body to every webhook named <code>payment-collect-finished-webhook<\/code>. The sample uses a random <code>paymentCode<\/code>, <code>status<\/code> <code>paid<\/code>, <code>amount<\/code> <code>1<\/code>, <code>tax<\/code> <code>0<\/code>, <code>total<\/code> <code>1<\/code>, the business currency, and <code>context<\/code> <code>\"test\"<\/code>. It is signed when that webhook has a secret.<\/p>\n<p>No request body. This does not create a payment link and does not call the callback URL.<\/p>\n<h3>Response <code>200<\/code><\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>deliveries<\/code><\/td>\n<td data-label=\"Type\">array<\/td>\n<td data-label=\"Description\">One entry per registered webhook. A failure of one destination does not stop the others.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>deliveries[].id<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Webhook registration id.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>deliveries[].url<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">URL that was called.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>deliveries[].status<\/code><\/td>\n<td data-label=\"Type\">number or null<\/td>\n<td data-label=\"Description\">HTTP status returned by your server. <code>null<\/code> when your server did not answer within 5 seconds.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"deliveries\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-p\">[<\/span>\n    <span class=\"t-p\">{<\/span>\n      <span class=\"t-k\">\"id\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">12<\/span><span class=\"t-p\">,<\/span>\n      <span class=\"t-k\">\"url\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"https:\/\/example.com\/cutflow\"<\/span><span class=\"t-p\">,<\/span>\n      <span class=\"t-k\">\"status\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">200<\/span>\n    <span class=\"t-p\">}<\/span>\n  <span class=\"t-p\">]<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<h3>Errors<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>HTTP<\/th>\n<th><code>reference<\/code><\/th>\n<th>When<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"HTTP\"><span class=\"cf-pill err\">400<\/span><\/td>\n<td data-label=\"reference\"><code>general\/bad_request<\/code><\/td>\n<td data-label=\"When\">No payment-collect webhook is registered.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/section><section>\n<h2 id=\"cf-webhook-payment-collect-finished\">Webhook: <code>payment-collect-finished<\/code><\/h2>\n<p>Cutflow sends this HTTP <code>POST<\/code> to each registered webhook when a link becomes <code>paid<\/code> or <code>cancelled<\/code>. The body is JSON. The request waits at most 5 seconds. A failed delivery is not retried by a later poll; retrieve the link if you need to confirm the status.<\/p>\n<p>Verify the signature against the raw body before you trust the JSON. The header is present only when that webhook was registered with a secret:<\/p>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">HTTP<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code>Content-Type: application\/json\nX-Cutflow-Signature: sha256=&lt;hex&gt;<\/code><\/pre><\/div>\n<p><code>hex<\/code> is HMAC-SHA256 of the exact raw body, using the webhook secret, encoded as lowercase hexadecimal.<\/p>\n<h3>Body<\/h3>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Field\"><code>event<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Always <code>payment-collect-finished<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>paymentCode<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\">Same code returned when the link was created. Use it to match this event to that link.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>businessId<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Business that owns the link.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>status<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\"><code>paid<\/code> or <code>cancelled<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>amount<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Amount before tax.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>tax<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Tax.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>total<\/code><\/td>\n<td data-label=\"Type\">number<\/td>\n<td data-label=\"Description\">Amount plus tax.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>currency<\/code><\/td>\n<td data-label=\"Type\">string<\/td>\n<td data-label=\"Description\"><code>usd<\/code>, <code>cad<\/code>, <code>dop<\/code>, or <code>eur<\/code>.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Field\"><code>context<\/code><\/td>\n<td data-label=\"Type\">string or null<\/td>\n<td data-label=\"Description\">The <code>context<\/code> you sent when creating the link, returned so you can match this event to your own order. <code>null<\/code> when you did not send one.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">JSON<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code><span class=\"t-p\">{<\/span>\n  <span class=\"t-k\">\"event\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"payment-collect-finished\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"paymentCode\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"businessId\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">362<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"status\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"paid\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"amount\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">25<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"tax\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">2<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"total\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-n\">27<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"currency\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"usd\"<\/span><span class=\"t-p\">,<\/span>\n  <span class=\"t-k\">\"context\"<\/span><span class=\"t-p\">:<\/span> <span class=\"t-s\">\"order-1001\"<\/span>\n<span class=\"t-p\">}<\/span><\/code><\/pre><\/div>\n<p>Respond with any HTTP <code>2xx<\/code>. Cutflow records other statuses as a failed delivery and still delivers the event to your remaining webhooks.<\/p>\n<\/section><section>\n<h2 id=\"cf-callback\">Callback<\/h2>\n<p>The callback is a browser redirect after the customer pays. Cutflow does not <code>POST<\/code> to it.<\/p>\n<p>The address is the newest callback URL, with these query parameters:<\/p>\n<div class=\"cf-table-wrap\"><table class=\"cf-table\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-label=\"Parameter\"><code>status<\/code><\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\">Link status after payment. This is <code>paid<\/code> for a completed checkout.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Parameter\"><code>paymentCode<\/code><\/td>\n<td data-label=\"Required\">yes<\/td>\n<td data-label=\"Description\">Same code returned when the link was created.<\/td>\n<\/tr>\n<tr>\n<td data-label=\"Parameter\"><code>context<\/code><\/td>\n<td data-label=\"Required\">no<\/td>\n<td data-label=\"Description\">The <code>context<\/code> you sent when creating the link, returned as a query parameter. Omitted when you did not send one.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<div class=\"cf-code\"><div class=\"cf-code-head\"><span class=\"cf-code-label\">TEXT<\/span><button class=\"cf-copy\" hidden=\"\" type=\"button\">Copy<\/button><\/div><pre><code>https:\/\/example.com\/paid?status=paid&amp;paymentCode=7c9e6679-7425-40de-944b-e07fc1f90ae7&amp;context=order-1001<\/code><\/pre><\/div>\n<p>The redirect is not signed. Confirm the payment with the webhook, or with <a href=\"#cf-retrieve-a-payment-link\">Retrieve a payment link<\/a>, before you fulfill the order.<\/p>\n<\/section><\/main><\/div>\n<script>\n(function(){\n  var root=document.getElementById('cf-docs'); if(!root||!window.addEventListener) return;\n  var blocks=root.querySelectorAll('.cf-code');\n  for(var i=0;i<blocks.length;i++){(function(b){\n    var btn=b.querySelector('.cf-copy'),pre=b.querySelector('pre'); if(!btn||!pre) return;\n    btn.hidden=false;\n    btn.addEventListener('click',function(){\n      var txt=pre.innerText;\n      function done(){btn.textContent='Copied';btn.className='cf-copy is-done';setTimeout(function(){btn.textContent='Copy';btn.className='cf-copy';},1600);}\n      if(navigator.clipboard&#038;&#038;navigator.clipboard.writeText){navigator.clipboard.writeText(txt).then(done,fb);}else{fb();}\n      function fb(){var t=document.createElement('textarea');t.value=txt;t.style.position='fixed';t.style.opacity='0';document.body.appendChild(t);t.select();try{document.execCommand('copy');done();}catch(e){}document.body.removeChild(t);}\n    });\n  })(blocks[i]);}\n  var side=root.querySelector('.cf-side'),mq=window.matchMedia&#038;&#038;window.matchMedia('(max-width:900px)');\n  function sync(){ if(!side||!mq) return; if(mq.matches) side.removeAttribute('open'); else side.setAttribute('open',''); }\n  sync(); if(mq){ if(mq.addEventListener) mq.addEventListener('change',sync); else if(mq.addListener) mq.addListener(sync); }\n  var links=root.querySelectorAll('.cf-nav a');\n  for(var j=0;j<links.length;j++){links[j].addEventListener('click',function(){ if(mq&#038;&#038;mq.matches&#038;&#038;side) side.removeAttribute('open'); });}\n  if(!('IntersectionObserver' in window)) return;\n  var map={},heads=[];\n  for(var k=0;k<links.length;k++){var id=links[k].getAttribute('href').slice(1);map[id]=links[k];var h=document.getElementById(id);if(h)heads.push(h);}\n  function setActive(id){for(var key in map){map[key].className=(key===id)?'is-active':'';}}\n  var ticking=false;\n  function update(){ticking=false;var cur=heads[0]; for(var m=0;m<heads.length;m++){ if(heads[m].getBoundingClientRect().top<=120) cur=heads[m]; } if(cur) setActive(cur.id);}\n  var io=new IntersectionObserver(function(){update();},{rootMargin:'0px 0px -60% 0px',threshold:[0,1]});\n  for(var n=0;n<heads.length;n++) io.observe(heads[n]);\n  window.addEventListener('scroll',function(){if(!ticking){ticking=true;requestAnimationFrame(update);}},{passive:true});\n  setActive(heads[0]&#038;&#038;heads[0].id);\n})();\n<\/script>","protected":false},"excerpt":{"rendered":"<p>On this page How a payment works Authentication Payment link object List merchants Create a payment link Retrieve a payment link Cancel a payment link Register a webhook or a&hellip;<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-30998","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/pages\/30998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/comments?post=30998"}],"version-history":[{"count":5,"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/pages\/30998\/revisions"}],"predecessor-version":[{"id":31006,"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/pages\/30998\/revisions\/31006"}],"wp:attachment":[{"href":"https:\/\/cutflow.app\/es\/wp-json\/wp\/v2\/media?parent=30998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}