Skip to main content
Payment links are shareable URLs that allow your customers to pay with any token on any supported chain. Each link can be customized with branding, forms, shipping options, and more.
Payment links automatically handle token routing, gas abstraction, and cross-chain swaps via the AnySpend protocol.
string
Unique identifier for the payment link (e.g., pl_abc123).
string
Display name shown to the customer during checkout.
string
The shareable checkout URL (e.g., https://anyspend.com/pay/pl_abc123).
string
Shortened URL for sharing (e.g., https://as.pay/abc123).
string
The token contract address you want to receive payment in.
number
The chain ID where you want to receive payment.
string
The wallet address that receives the payment.
string | null
Fixed payment amount in the token’s smallest unit. Null for variable-amount links.
string | null
Minimum allowed amount for variable-amount links.
string | null
Maximum allowed amount for variable-amount links.
string | null
Pre-filled suggested amount for variable-amount links.
string | null
Description shown on the checkout page.
string | null
Associated product ID, if linked to a product.
string | null
Image displayed on the checkout page.
string | null
Hex color code for checkout page branding (e.g., #6366f1).
string | null
Custom text for the pay button (default: "Pay").
number | null
Maximum number of completed payments allowed. Null for unlimited.
number
Number of completed payments so far.
string | null
ISO 8601 expiration timestamp. Null for no expiration.
boolean
Whether the link is currently accepting payments.
object | null
Custom form fields to collect from the customer during checkout.
array | null
Available shipping options for physical goods.
boolean
Whether to collect a shipping address during checkout.
string | null
URL to redirect the customer to after payment.
string | null
Label for the return button (e.g., "Back to Store").
object | null
Custom branding configuration.
boolean
Whether the platform fee is added on top of the payment amount (true) or absorbed by the merchant (false).
array
Line items attached to this payment link.
string
ISO 8601 creation timestamp.
string
ISO 8601 last update timestamp.

URL parameters

When sharing a payment link URL, you can append query parameters to pre-fill session data, track attribution, and associate payments with your customers.

Metadata limits

  • Maximum 50 keys per session
  • Key length: up to 40 characters
  • Value length: up to 500 characters

Example: associating payments with your customers

All parameters are passed through to webhooks, so you can reconcile payments on your backend.
For enterprise integrations that need full control, use the Checkout Sessions API to create sessions server-side with customer_email, customer_name, metadata, and client_reference_id, then redirect using the returned url or append ?session_id= to your payment link.

Search payment links by name or description.
boolean
Filter by active status. Omit to return all links.
string
default:"created_at"
Sort field. One of: created_at, updated_at, name, uses.
string
default:"desc"
Sort order. One of: asc, desc.
number
default:1
Page number for pagination.
number
default:20
Number of results per page (max 100).

Create a new payment link with customizable checkout experience.
string
required
Display name for the payment link.
string
required
Contract address of the token you want to receive.
number
required
Chain ID where you want to receive the token.
string
required
Wallet address that receives the payment.
string
Description displayed on the checkout page.
string
Fixed payment amount in the token’s smallest unit. Omit for variable-amount links.
string
Minimum amount for variable-amount links.
string
Maximum amount for variable-amount links.
string
Pre-filled amount for variable-amount links.
string
Link to an existing product.
string
URL of the image to display on the checkout page.
string
Hex color code for checkout branding (e.g., "#6366f1").
string
Custom pay button text.
number
Maximum number of completed payments. Omit for unlimited.
string
ISO 8601 expiration timestamp.
object
Custom form fields to collect during checkout. See the Payment Link object above for structure.
array
Shipping options for physical goods. See the Payment Link object above for structure.
boolean
default:false
Whether to collect a shipping address.
string
URL to redirect the customer after payment.
string
Label for the return button.
object
Custom branding configuration. See the Payment Link object above for structure.
boolean
default:false
Add platform fee on top of the payment amount.
array
Line items to display on checkout.

Fetch a single payment link by ID, including its line items.
string
required
The payment link ID (e.g., pl_abc123).
Returns the full Payment Link object including items.

Update an existing payment link. Only the fields you include in the request body will be updated.
string
required
The payment link ID.
All body parameters from the create endpoint are accepted. Additionally:
boolean
Set to false to deactivate the link.
Changing token_address, chain_id, or recipient_address on a link that has existing sessions may cause inconsistencies. Create a new link instead if you need to change payment routing.
Returns the updated Payment Link object.

Permanently delete a payment link. This cannot be undone. Active checkout sessions for this link will fail.
string
required
The payment link ID.

Retrieve analytics and conversion metrics for a specific payment link.
string
required
The payment link ID.

Retrieve checkout sessions associated with a specific payment link.
string
required
The payment link ID.
string
Filter by session status: open, processing, completed, expired, failed.
number
default:1
Page number.
number
default:20
Results per page (max 100).

Retrieve visitor analytics for a specific payment link, including referrer and geographic data.
string
required
The payment link ID.
number
default:1
Page number.
number
default:20
Results per page (max 100).

Create a copy of an existing payment link with optional field overrides.
string
required
The payment link ID to duplicate.
string
Override the name of the duplicated link. Defaults to "Copy of {original name}".
Any other fields from the create endpoint can be passed as overrides.
Returns a new Payment Link object with a new ID.

List line items

Retrieve all line items attached to a payment link.
string
required
The payment link ID.

Add a line item

Add a new line item to an existing payment link.
string
required
The payment link ID.
string
required
Item name.
string
required
Item price in the token’s smallest unit.
number
required
Quantity.
string
Item image URL.

Remove a line item

Remove a line item from a payment link.
string
required
The payment link ID.
string
required
The line item ID.