Skip to content

PayLinks — Payment Links

PayLink is a one-time or persistent payment link created by merchants, supporting embedding in web pages or sharing with customers.

All PayLink endpoints require the x-wallet header.

List PayLinks

GET /api/paylinks

curl -H "x-wallet: 0xYourWallet" https://api.cyberpay.org/api/paylinks

Response

[
  {
    "id": "uuid-xxx",
    "wallet_address": "0xYourWallet",
    "name": "Premium Plan",
    "amount": "50000000",
    "token": "USDC",
    "network": "eip155:8453",
    "description": "Monthly subscription",
    "receive_address": "0xMerchant...",
    "image_url": "https://...",
    "active": true,
    "payment_count": 12,
    "created_at": "2026-03-01T00:00:00Z",
    "updated_at": "2026-03-23T00:00:00Z"
  }
]

Create PayLink

POST /api/paylinks

{
  "name": "Premium Plan",
  "amount": "50000000",
  "token": "USDC",
  "network": "eip155:8453",
  "description": "Monthly subscription",
  "receiveAddress": "0xMerchant...",
  "imageUrl": "https://example.com/logo.png"
}
FieldTypeDescription
namestringLink name
amountstringAmount (smallest unit)
tokenstringToken symbol
networkstringChain (CAIP-2)
descriptionstringDescription
receiveAddressstringReceiving address
imageUrlstring?Display image

Toggle Status

PUT /api/paylinks/{id}/toggle

{ "active": false }

Delete PayLink

DELETE /api/paylinks/{id}

Public Access (No Authentication Required)

GET /api/paylinks/{id}/public

Returns public PayLink information (only active links are accessible).

{
  "id": "uuid-xxx",
  "name": "Premium Plan",
  "amount": "50000000",
  "token": "USDC",
  "network": "eip155:8453",
  "description": "Monthly subscription",
  "receiveAddress": "0xMerchant...",
  "imageUrl": "https://..."
}

Record Payment

POST /api/paylinks/{id}/pay

Called by the frontend after the user pays, records the transaction and increments payment_count.

{ "txHash": "0xabc123..." }

Response:

{ "success": true, "verified": true }