> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a payment link



## OpenAPI

````yaml /openapi/anyspend-platform.json post /payment-links
openapi: 3.1.0
info:
  title: AnySpend Platform API
  description: >-
    A Stripe-quality REST API for managing crypto payment links, products,
    customers, transactions, webhooks, and more. Built for developers, AI
    agents, and LLMs.
  version: 1.0.0
  contact:
    name: AnySpend Support
    url: https://anyspend.com
servers:
  - url: https://platform-api.anyspend.com/api/v1
    description: Current server
security:
  - apiKeyBearer: []
  - apiKeyHeader: []
tags:
  - name: Quick Pay
    description: Create payment links without authentication
  - name: Payment Links
    description: Manage payment links with items, forms, and shipping
  - name: Products
    description: Manage products and generate payment links from them
  - name: Checkout Sessions
    description: Server-side checkout session management
  - name: Transactions
    description: View and export transaction history
  - name: Customers
    description: Manage customer records
  - name: Webhooks
    description: Configure webhook endpoints and manage deliveries
  - name: Discount Codes
    description: Create and validate discount codes
  - name: Notifications
    description: Email and Telegram notification settings
  - name: Widgets
    description: Embeddable widget configurations
  - name: Organization
    description: Organization settings and defaults
  - name: Uploads
    description: Image upload management
  - name: API Keys
    description: API key self-management
  - name: Analytics
    description: Revenue and conversion analytics
  - name: Events
    description: API audit trail
paths:
  /payment-links:
    post:
      tags:
        - Payment Links
      summary: Create a payment link
      operationId: createPaymentLink
      parameters:
        - $ref: '#/components/parameters/idempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - token_address
                - chain_id
                - recipient_address
              properties:
                name:
                  type: string
                  maxLength: 100
                description:
                  type: string
                  maxLength: 500
                amount:
                  type: string
                token_address:
                  type: string
                chain_id:
                  type: integer
                recipient_address:
                  type: string
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      amount:
                        type: string
                      quantity:
                        type: integer
                form_schema:
                  type: object
                shipping_options:
                  type: array
                branding:
                  type: object
                max_uses:
                  type: integer
                expires_at:
                  type: integer
                return_url:
                  type: string
                fee_on_top:
                  type: boolean
      responses:
        '201':
          description: Payment link created
components:
  parameters:
    idempotencyKey:
      name: Idempotency-Key
      in: header
      schema:
        type: string
      description: Unique key for idempotent requests (24h TTL)
  securitySchemes:
    apiKeyBearer:
      type: http
      scheme: bearer
      description: API key passed as Bearer token. Keys start with `asp_`.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key passed via X-API-Key header.

````