Skip to main content
AllScale Open API
Version: v1
Last updated: 2026-07-15
Base Path: /v1/claim_link_auto_payouts

Overview

The Claim Link Cancel API lets a merchant claim back a funded link that has not been claimed yet. The link is closed immediately and the funded amount is returned to you. Use this endpoint to:
  • Cancel a payout you sent by mistake, or to the wrong recipient
  • Close a link the recipient never claimed, without waiting out the 14-day expiry
  • Get the funds back automatically — the refund is settled by AllScale, you do not send anything on-chain
Cancelling is only possible while the link is funded and unclaimed. Once a recipient has started claiming, the link can no longer be cancelled — see Cancellable states.
The call is fast and synchronous: it flips the link to cancelled and returns immediately. The refund is settled off the request path — it does not block on an on-chain receipt. You are notified when the refund actually lands via the cancelled webhook.

Availability & Prerequisites

This endpoint is per-merchant authorized. It returns 50104 (HTTP 403) or 30002 (HTTP 403) unless both of the following hold:
  1. Your API key is a production (non-sandbox) key. Sandbox keys are rejected — a cancel moves real funds.
  2. Your store has been granted the claim_link:auto_payout scope (the same scope as create). The * wildcard scope does not grant it.
Unlike create, cancel is not gated by CLAIM_LINK_LIVE_SIGNING_ENABLED. Cancel never signs or broadcasts a transaction inside the request, so it stays available even where live signing is off — you can always claim a funded link back.

Important Design Notes

  • The cancel is synchronous, but the refund is asynchronous. A 200 means “the link is closed and the refund is scheduled”, not “the money is back”.
  • The refund is settled by the same money-safe reconciliation path that drives expiry refunds, and is returned to your business wallet.
  • Not a toggle. cancelled is a terminal state — a cancelled link can never be re-opened or claimed. A recipient who opens a cancelled link is refused.
  • Cancel is not retry-idempotent. A second cancel of an already-cancelled link returns 50108 (HTTP 409), not another 200. Treat 50108 with status: "cancelled" as “already done”, not as a failure.

Authentication

All requests must include the following headers (see the Auth doc for the full canonical-request + signing scheme):

Notes

  • X-Nonce must be unique per request; X-Timestamp must be within the allowed window.
  • The signature is computed over the raw request body bytes. This endpoint sends no body, so the body hash is that of the empty string.
  • Requests are protected against replay attacks.

POST /v1/claim_link_auto_payouts//cancel

Description

Cancel (claim back) one of your own funded, unclaimed claim links. Flips the link to cancelled and schedules the refund of the funded amount back to you.

Request

POST /v1/claim_link_auto_payouts/{claim_link_id}/cancel

Path Parameters

Headers

Body

None. This endpoint takes no request body — the link is identified entirely by the path parameter.

Cancellable states

A link can be cancelled only when it is funded, unclaimed, and yours. A link that is not yours (or an unknown id) returns 50107 (HTTP 404); an owned but non-cancellable link returns 50108 (HTTP 409) with the current status and a reason.

Successful Response

Response Fields


Error Response — not cancellable (50108)

When the link is yours but is not in a cancellable state, the details carry the link’s current status and a human-readable reason so you can branch precisely:

Possible Errors

This table lists the errors specific to this endpoint. Unexpected server-side failures may return a generic platform error code (e.g. 90000 / 99999) with HTTP 500 — treat any non-zero code as a failure and surface error + request_id for support.

Settlement — how you know the money is back

A 200 from this endpoint means the link is closed, not that the refund has landed. There are two ways the refund settles:
  1. cancelled webhook (recommended). When the refund succeeds on-chain, AllScale POSTs a cancelled terminal event to your store’s claim_link_webhook_url, carrying the refund_tx_hash. See the Claim Link Webhook doc.
  2. Reconciliation. If you have no webhook URL configured (or missed the delivery window), reconcile against your wallet balance / the link’s status.
⚠️ The cancelled webhook is only emitted for links created through the auto-payout API (POST /v1/claim_link_auto_payouts) — those links carry your store id, which is what the callback is addressed to. This endpoint is business-scoped, so it can also cancel a link your team created in the AllScale app/dashboard; such a link emits no webhook at all (by design — in-app links never do). The cancel itself works identically; only the callback is absent, so reconcile those manually. The refund lands within the reconciliation window under normal conditions. If a refund cannot be confirmed, AllScale holds the funds and pages on-call rather than re-sending — funds are never double-refunded.

Notes

  • Cancel only what you own. A link created by another business returns 50107, exactly as an unknown id does — this is deliberate, so the endpoint cannot be used to discover other merchants’ link ids.
  • Race with the recipient. Between your read and your cancel, the recipient may start claiming. That is the 50108 / status: "claiming" case — the recipient wins, and the claim proceeds. This is intended: money-safety beats cancel-wins.
  • Refund amount. You are refunded the funded amount less network/service fees already settled at funding time. An accidental overpayment at funding is returned too.
  • Cancelled links are dead. The claim URL and bearer token for a cancelled link are permanently unusable; a recipient opening it is refused.