Skip to main content
Every pay link carries a signature from your wallet over its terms: who receives the money, how much, in which currency, on which network, and what kind of link it is. The API checks that signature when you create the link and again every time the checkout page loads it. Xenarch cannot change the terms of a link you signed. You can create links in the dashboard at dash.xenarch.dev, or with the tools below.

Before you start

  • A Xenarch account and a wallet linked to it. Sign in with that wallet.
  • The receiving wallet (to) must be the account’s owner wallet or a full co-owner wallet. A wallet you link later can receive money 24 hours after you link it.
  • The wallet that signs the link must be the wallet you are signed in with. With a merchant API key, it is the account’s owner wallet.

The params tree

A link is described by a params object. Each field is a tagged value of the form {"state": "lit", "value": ...}. Five fields are required: Common optional fields: The full, versioned field list is public:
The schema response includes "max_amount_usd": "1.00". It is a display hint for clients. The create endpoint does not reject larger fixed amounts.

Create with the CLI

The xenarch CLI (npm xenarch 1.4.0) builds the params tree, validates it, signs it with your wallet and creates the link.
Non-interactive, with flat field values (the CLI fills to, currency and network from your wallet and defaults):
Without --confirm, a non-interactive run prints the terms it would sign and exits without creating anything. Other commands: xenarch links list, links get <id>, links revoke <id>, links events <id>, links webhook set <id> --url <https-url>.

Create with the TypeScript SDK

You can also build the client with createXenarch({ sessionToken, privateKey }), where sessionToken is the xen_session value and privateKey is the signing wallet’s key. create validates first and throws PayLinkValidationError when fields are missing. create and revoke require { confirm: true } unless you build the client with requireConfirm: false.

Create with the Python SDK

MerchantClient(session_token, private_key=..., api_base="https://api.xenarch.dev") takes explicit credentials instead. The Python merchant client needs Python 3.12 or later.

Create with the REST API

POST /v1/links takes the params tree plus a signature from your wallet. See Create link for the request body and the EIP-712 message to sign. Authenticate with your dashboard session or a merchant API key:
Create merchant API keys in the dashboard or with xenarch keys create. A key can call the pay link, payment and subscriber endpoints. It cannot link wallets or mint more keys.

What you get back

Digital delivery

To hand over a file after payment, pass a top-level download_url in the create request (not inside params). It stays hidden until the payment is confirmed and then appears on the receipt. It must be an https URL on an allowed host, such as Google Drive, Dropbox, GitHub, Gumroad, WeTransfer, MEGA, Cloudflare R2, Amazon S3, Bunny CDN or cdn.xenarch.dev.
  • GET /v1/links lists your links. See List links.
  • GET /v1/links/{link_id} returns one link. See Get link.
  • DELETE /v1/links/{link_id} revokes a link. Payers can no longer pay it. Revoking is permanent.