CreditClawCreditClawDocs
    View as Markdown

    Sales

    Query incoming sales and payments received through your checkout pages.

    List sales

    Retrieve all sales associated with your bot's wallet, with optional filters.

    MethodGET
    Path/api/v1/bot/sales
    AuthAPI key (Authorization: Bearer cck_live_...)

    Query parameters

    ParameterTypeRequiredDescription
    checkout_page_idstringNoFilter by checkout page ID
    statusstringNoFilter by sale status (e.g. confirmed, pending)
    payment_methodstringNoFilter by payment method (e.g. base_pay, stripe_onramp, qr_pay)
    limitintegerNoMaximum number of sales to return

    Response

    {
      "sales": [
        {
          "sale_id": "sale_abc123",
          "checkout_page_id": "cp_xyz789",
          "amount_usd": 25.00,
          "payment_method": "base_pay",
          "status": "confirmed",
          "buyer_type": "wallet",
          "buyer_identifier": "0x1234...abcd",
          "buyer_email": "buyer@example.com",
          "tx_hash": "0xdeadbeef...",
          "checkout_title": "Premium Bot Access",
          "confirmed_at": "2025-01-15T10:30:00.000Z",
          "created_at": "2025-01-15T10:29:45.000Z"
        }
      ]
    }
    

    Response fields

    FieldTypeDescription
    sale_idstringUnique sale identifier
    checkout_page_idstringID of the checkout page that generated this sale
    amount_usdnumberSale amount in USD
    payment_methodstringPayment method used by the buyer
    statusstringSale status (confirmed, pending, etc.)
    buyer_typestringType of buyer (e.g. wallet, email)
    buyer_identifierstringBuyer's wallet address or other identifier
    buyer_emailstring | nullBuyer's email if provided
    tx_hashstring | nullOn-chain transaction hash if applicable
    checkout_titlestringTitle of the checkout page
    confirmed_atstring | nullISO 8601 timestamp when the sale was confirmed
    created_atstringISO 8601 timestamp when the sale was created

    If the bot has no linked wallet, the response returns an empty array: { "sales": [] }.

    Example request

    # List all confirmed sales
    curl -H "Authorization: Bearer cck_live_your_api_key" \
      "https://creditclaw.com/api/v1/bot/sales?status=confirmed"
    
    # List sales from a specific checkout page, limited to 10
    curl -H "Authorization: Bearer cck_live_your_api_key" \
      "https://creditclaw.com/api/v1/bot/sales?checkout_page_id=cp_xyz789&limit=10"
    
    # Filter by payment method
    curl -H "Authorization: Bearer cck_live_your_api_key" \
      "https://creditclaw.com/api/v1/bot/sales?payment_method=base_pay"
    

    Error responses

    StatusErrorDescription
    401unauthorizedMissing or invalid API key
    500internal_errorUnexpected server error

    Related

    • Checkout Pages — create the checkout pages that generate sales
    • Webhooks — listen for wallet.payment.received events instead of polling
    • Authentication — set up your bot's API key