Skip to main content
Products represent items or services in your catalog. Each product defines pricing, token, and chain configuration that can be reused across multiple payment links and checkout sessions.
Products support three pricing types: one_time for single purchases, subscription for recurring payments, and variable for customer-chosen amounts.

The Product object

id
string
Unique identifier for the product (e.g., prod_abc123).
name
string
Product name displayed to customers.
amount
string | null
Price in the token’s smallest unit. Null for variable product types.
token_address
string
Contract address of the token for pricing.
chain_id
number
Chain ID for the pricing token.
description
string | null
Product description.
image_url
string | null
Product image URL.
recipient_address
string
Default wallet address that receives payments for this product.
product_type
string
Pricing type: one_time, subscription, or variable.
metadata
object | null
Arbitrary key-value pairs for your own use. Not displayed to customers.
form_schema
object | null
Custom form fields to collect during checkout. Same structure as Payment Links form_schema.
shipping_options
array | null
Shipping options for physical goods. Same structure as Payment Links shipping_options.
active
boolean
Whether the product is active. Inactive products cannot be used in new payment links.
created_at
string
ISO 8601 creation timestamp.
updated_at
string
ISO 8601 last update timestamp.

List products

Retrieve a paginated list of your products.
page
number
default:1
Page number for pagination.
limit
number
default:20
Number of results per page (max 100).
active
boolean
Filter by active status. Omit to return all products.
curl -X GET "https://platform-api.anyspend.com/api/v1/products?page=1&limit=20" \
  -H "Authorization: Bearer asp_xxx"
{
  "data": [
    {
      "id": "prod_abc123",
      "name": "Pro Plan",
      "amount": "50000000",
      "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "chain_id": 1,
      "description": "Professional tier with unlimited access",
      "image_url": "https://example.com/pro.png",
      "recipient_address": "0x1234...abcd",
      "product_type": "one_time",
      "metadata": {
        "sku": "PRO-001",
        "internal_id": "tier_3"
      },
      "form_schema": null,
      "shipping_options": null,
      "active": true,
      "created_at": "2026-01-10T09:00:00Z",
      "updated_at": "2026-02-15T12:00:00Z"
    },
    {
      "id": "prod_def456",
      "name": "Donation",
      "amount": null,
      "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "chain_id": 1,
      "description": "Support our project with any amount",
      "image_url": null,
      "recipient_address": "0x1234...abcd",
      "product_type": "variable",
      "metadata": null,
      "form_schema": null,
      "shipping_options": null,
      "active": true,
      "created_at": "2026-01-20T14:30:00Z",
      "updated_at": "2026-01-20T14:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2,
    "total_pages": 1,
    "has_more": false
  }
}

Create a product

name
string
required
Product name.
token_address
string
required
Contract address of the token for pricing.
chain_id
number
required
Chain ID for the pricing token.
recipient_address
string
required
Default wallet address that receives payments.
product_type
string
required
Pricing type. One of: one_time, subscription, variable.
amount
string
Price in the token’s smallest unit. Required for one_time and subscription types.
description
string
Product description.
image_url
string
Product image URL.
metadata
object
Arbitrary key-value pairs (e.g., {"sku": "PRO-001"}). Up to 50 keys, 500 character values.
form_schema
object
Custom form fields to collect during checkout.
shipping_options
array
Shipping options for physical goods.
curl -X POST "https://platform-api.anyspend.com/api/v1/products" \
  -H "Authorization: Bearer asp_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Plan",
    "amount": "50000000",
    "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "chain_id": 1,
    "recipient_address": "0x1234567890abcdef1234567890abcdef12345678",
    "product_type": "one_time",
    "description": "Professional tier with unlimited access",
    "image_url": "https://example.com/pro.png",
    "metadata": {
      "sku": "PRO-001",
      "internal_id": "tier_3"
    }
  }'
{
  "id": "prod_abc123",
  "name": "Pro Plan",
  "amount": "50000000",
  "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "chain_id": 1,
  "description": "Professional tier with unlimited access",
  "image_url": "https://example.com/pro.png",
  "recipient_address": "0x1234567890abcdef1234567890abcdef12345678",
  "product_type": "one_time",
  "metadata": {
    "sku": "PRO-001",
    "internal_id": "tier_3"
  },
  "form_schema": null,
  "shipping_options": null,
  "active": true,
  "created_at": "2026-02-27T10:00:00Z",
  "updated_at": "2026-02-27T10:00:00Z"
}

Retrieve a product

id
string
required
The product ID (e.g., prod_abc123).
curl -X GET "https://platform-api.anyspend.com/api/v1/products/prod_abc123" \
  -H "Authorization: Bearer asp_xxx"
Returns the full Product object.

Update a product

Update an existing product. Only the fields you include in the request body will be updated.
id
string
required
The product ID.
All body parameters from the create endpoint are accepted. Additionally:
active
boolean
Set to false to deactivate the product.
Updating a product does not retroactively update payment links that were created from it. Each payment link maintains its own configuration.
curl -X PATCH "https://platform-api.anyspend.com/api/v1/products/prod_abc123" \
  -H "Authorization: Bearer asp_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Plan (Annual)",
    "amount": "500000000",
    "description": "Professional tier - annual billing"
  }'
Returns the updated Product object.

Delete a product

Soft-delete a product. The product will be marked as inactive and will no longer appear in list results by default. Existing payment links using this product will continue to function.
id
string
required
The product ID.
Deleting a product is a soft delete. The product data is preserved for historical reference in existing transactions and payment links.
curl -X DELETE "https://platform-api.anyspend.com/api/v1/products/prod_abc123" \
  -H "Authorization: Bearer asp_xxx"
{
  "id": "prod_abc123",
  "deleted": true
}

Automatically create a payment link pre-configured with the product’s settings. This is a convenience method that creates a new payment link using the product’s name, amount, token_address, chain_id, recipient_address, description, image_url, form_schema, and shipping_options.
id
string
required
The product ID.
name
string
Override the payment link name. Defaults to the product name.
return_url
string
URL to redirect customers after payment.
max_uses
number
Maximum number of uses for the generated link.
expires_at
string
ISO 8601 expiration timestamp for the generated link.
Any additional payment link fields can be passed as overrides.
curl -X POST "https://platform-api.anyspend.com/api/v1/products/prod_abc123/generate-link" \
  -H "Authorization: Bearer asp_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "return_url": "https://example.com/thank-you",
    "max_uses": 100,
    "expires_at": "2026-12-31T23:59:59Z"
  }'
Returns a new Payment Link object with product_id set to the source product.
{
  "id": "pl_newlink789",
  "name": "Pro Plan",
  "url": "https://pay.anyspend.com/pl_newlink789",
  "short_url": "https://as.pay/newlink789",
  "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "chain_id": 1,
  "recipient_address": "0x1234567890abcdef1234567890abcdef12345678",
  "amount": "50000000",
  "description": "Professional tier with unlimited access",
  "product_id": "prod_abc123",
  "image_url": "https://example.com/pro.png",
  "max_uses": 100,
  "uses": 0,
  "expires_at": "2026-12-31T23:59:59Z",
  "active": true,
  "return_url": "https://example.com/thank-you",
  "created_at": "2026-02-27T10:15:00Z",
  "updated_at": "2026-02-27T10:15:00Z"
}