Payment links automatically handle token routing, gas abstraction, and cross-chain swaps via the AnySpend protocol.
The Payment Link object
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
List payment links
string
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).
- Response
Create a payment link
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.
- Response
Retrieve a payment link
Fetch a single payment link by ID, including its line items.string
required
The payment link ID (e.g.,
pl_abc123).- Response
Returns the full Payment Link object including
items.Update a payment link
Update an existing payment link. Only the fields you include in the request body will be updated.string
required
The payment link ID.
boolean
Set to
false to deactivate the link.- Response
Returns the updated Payment Link object.
Delete a payment link
Permanently delete a payment link. This cannot be undone. Active checkout sessions for this link will fail.string
required
The payment link ID.
- Response
Get payment link stats
Retrieve analytics and conversion metrics for a specific payment link.string
required
The payment link ID.
- Response
List payment link sessions
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).
- Response
List payment link visitors
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).
- Response
Duplicate a payment link
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}".- Response
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.
- Response
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.
- Response
Remove a line item
Remove a line item from a payment link.string
required
The payment link ID.
string
required
The line item ID.
- Response
HypeDuel