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.

Info

Products support three pricing types: one_time for single purchases, subscription for recurring payments, and variable for customer-chosen amounts.

The Product object

idstring

Unique identifier for the product (e.g., prod_abc123).

namestring

Product name displayed to customers.

amountstring | null

Price in the token's smallest unit. Null for variable product types.

Contract address of the token for pricing.

chain_idnumber

Chain ID for the pricing token.

descriptionstring | null

Product description.

image_urlstring | null

Product image URL.

Default wallet address that receives payments for this product.

product_typestring

Pricing type: one_time, subscription, or variable.

metadataobject | null

Arbitrary key-value pairs for your own use. Not displayed to customers.

form_schemaobject | null

Custom form fields to collect during checkout. Same structure as Payment Links form_schema.

shipping_optionsarray | null

Shipping options for physical goods. Same structure as Payment Links shipping_options.

activeboolean

Whether the product is active. Inactive products cannot be used in new payment links.

created_atstring

ISO 8601 creation timestamp.

updated_atstring

ISO 8601 last update timestamp.


List products

Retrieve a paginated list of your products.

pagenumberquerydefault: 1

Page number for pagination.

limitnumberquerydefault: 20

Number of results per page (max 100).

activebooleanquery

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"
json
{ "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

namestringrequiredbody

Product name.

token_addressstringrequiredbody

Contract address of the token for pricing.

chain_idnumberrequiredbody

Chain ID for the pricing token.

recipient_addressstringrequiredbody

Default wallet address that receives payments.

product_typestringrequiredbody

Pricing type. One of: one_time, subscription, variable.

amountstringbody

Price in the token's smallest unit. Required for one_time and subscription types.

descriptionstringbody

Product description.

image_urlstringbody

Product image URL.

metadataobjectbody

Arbitrary key-value pairs (e.g., {"sku": "PRO-001"}). Up to 50 keys, 500 character values.

form_schemaobjectbody

Custom form fields to collect during checkout.

shipping_optionsarraybody

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"
    }
  }'
json
{ "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

idstringrequiredpath

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.

idstringrequiredpath

The product ID.

All body parameters from the create endpoint are accepted. Additionally:

activebooleanbody

Set to false to deactivate the product.

Warning

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.

idstringrequiredpath

The product ID.

Tip

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"
json
{ "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.

idstringrequiredpath

The product ID.

namestringbody

Override the payment link name. Defaults to the product name.

return_urlstringbody

URL to redirect customers after payment.

max_usesnumberbody

Maximum number of uses for the generated link.

expires_atstringbody

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.

json
{ "id": "pl_newlink789", "name": "Pro Plan", "url": "https://anyspend.com/pay/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"}
Ask a question... ⌘I