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

Overview

The Claim Link Auto-Payout API lets a merchant create a single claim link and fund it automatically in one call — no on-chain deposit step for the merchant. AllScale creates the link, then funds its pool wallet from the merchant’s own custodied (Turnkey) wallet using a small-amount passwordless signing session, and returns the bearer claim URL. Use this endpoint to:
  • Create one claim link for a recipient (payout / disbursement)
  • Have AllScale fund it automatically from your custodied wallet (no manual deposit)
  • Get back a shareable claim URL (and the one-time bearer token) to deliver to the recipient
  • Make the call idempotent with a reference_id (always required)
The recipient later opens the claim URL to claim the funds. For the sender-funded flow where you deposit on-chain yourself, see the standard claim-link create (dashboard/GraphQL) or the Batch API.

Availability & Prerequisites

This endpoint is deploy-flag gated and per-merchant authorized. All of the following must hold (1–2 fail with 50104, 3 fails with 30002 — both HTTP 403):
  1. Live signing is enabled on the environment (CLAIM_LINK_LIVE_SIGNING_ENABLED). It is enabled on gamma (staging) and gated off on production until launch.
  2. Your API key is a production (non-sandbox) key. Sandbox keys are rejected.
  3. Your store has been granted the claim_link:auto_payout scope. This scope is provisioned only after your business completes the auto-payout onboarding (creating a Turnkey session user + amount-limit policy). The * wildcard scope does not grant it.
Funding is capped per session by the amount-limit policy set during onboarding; a request over the cap is rejected by the signing policy.

Important Design Notes

  • All enum values (stable_coin, chain) are integers in requests and responses.
  • amount is sent and returned as a string to preserve exact decimal precision — never a JSON number.
  • Settlement stable coins: USDT (1) and USDC (2).
  • Chains: EVM chains only — Ethereum (1), Base (5), BNB (6), Arbitrum (7), Polygon (8), Optimism (9); Sepolia testnet (11) is additionally accepted on test environments.
  • The call is synchronous: it creates the link and blocks until the funding transaction settles (≈ up to ~90s), then returns the funded link.

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.
  • Requests are protected against replay attacks.

POST /v1/claim_link_auto_payouts

Description

Create a claim link and auto-fund it from the merchant’s custodied wallet. Returns the created (and funded) link, including the bearer claim URL.

Request

POST /v1/claim_link_auto_payouts

Headers

Body Example

Request Fields

⚠️ Important
  • amount must be > 0 and match the token’s on-chain precision for the selected chain (e.g. USDT/USDC allow 6 decimals on most chains, but 18 on BNB). An over-precise amount is rejected with 10001.
  • stable_coin and chain are integers, not strings ("USDT" / "BASE" will be rejected).
  • reference_id is always required — it is the idempotency key that makes retries safe, and there is no opt-out. Because this call is synchronous (it blocks up to ~90s for the funding receipt), a client timeout + retry is the likeliest failure path, and the stable reference_id is exactly what stops that retry creating a second link and a second debit. A missing or blank reference_id is rejected with 10001.

Successful Response

Response Fields


Error Response — funding/signing failure (50103)

A create that fails at the funding stage returns 50103, and error.details carries the underlying AllScale code (plutus_code) plus a human-readable reason telling you what to do next:
plutus_code: 8148 — the payout could not be signed. No funds moved: 8148 is always raised before broadcast, and the reserved budget is released, so your used-percentage is unaffected. All 8148s share the one code — the machine-readable reason_code tells the three cases apart:
A policy rejection does not necessarily mean the amount was too high. The wallet policy checks several things at once — the chain and verifying contract, the token, the sponsor, and the per-transaction amount ceiling — and the signer reports one rejected result without saying which check failed. So lowering the amount will not help if some other part of the policy was the cause; re-verify the policy as well.
Retrying an 8148 is safe. Nothing was signed or broadcast and the budget reservation is released, so re-sending the request with the same reference_id cannot double-pay: the endpoint is idempotent per (business, store, reference_id) and reference_id is always required. Always retry with the original reference_id — never mint a new one for a retry, which would be a genuinely new payout.
reason is human-readable guidance and its exact wording may change — do not match on the literal string. Branch on code / plutus_code / reason_code (a stable machine-readable category: session_expired, policy_denied, or signer_error), and surface reason (plus request_id) to whoever operates the integration. reason_code is present only when the failure maps to one of these categories.

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.

Notes

  • Deliver the claim_url (or token) to your recipient over a secure channel. The token is a bearer credential shown once.
  • The endpoint is idempotent per (business, store, reference_id) — uniqueness is scoped to the authenticating store, not the whole business, so a business running several stores (each with its own API key) can reuse the same reference_id in different stores. A retry with the same reference_id on the same store and the same (chain, coin, amount) returns the original link (with idempotent_hit: true) — it never double-creates or double-debits. Reusing the reference with different parameters is rejected with 50106 (409), not replayed.
  • Funding draws from your custodied (Turnkey) wallet; ensure it holds enough of the stable coin to cover the payout amount plus fees. Funding is gasless / sponsored — you do not need to hold native gas in that wallet. A balance shortfall returns 50103.
  • This endpoint is currently live on gamma (staging) and gated off on production until the launch flag is flipped.