Skip to main content
POST
/
payment-links
Create a payment link
curl --request POST \
  --url https://platform-api.anyspend.com/api/v1/payment-links \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "token_address": "<string>",
  "chain_id": 123,
  "recipient_address": "<string>",
  "description": "<string>",
  "amount": "<string>",
  "items": [
    {
      "name": "<string>",
      "amount": "<string>",
      "quantity": 123
    }
  ],
  "form_schema": {},
  "shipping_options": "<array>",
  "branding": {},
  "max_uses": 123,
  "expires_at": 123,
  "return_url": "<string>",
  "fee_on_top": true
}
'

Authorizations

Authorization
string
header
required

API key passed as Bearer token. Keys start with asp_.

Headers

Idempotency-Key
string

Unique key for idempotent requests (24h TTL)

Body

application/json
name
string
required
Maximum string length: 100
token_address
string
required
chain_id
integer
required
recipient_address
string
required
description
string
Maximum string length: 500
amount
string
items
object[]
form_schema
object
shipping_options
array
branding
object
max_uses
integer
expires_at
integer
return_url
string
fee_on_top
boolean

Response

201

Payment link created