Skip to main content
Solana Agent Kit provides integration with Crossmint for purchasing physical products from Amazon and Shopify using Solana USDC. The integration supports creating orders, managing shipping addresses, and confirming order status.

Key Features

  • Physical Product Purchases: Buy products from Amazon and Shopify
  • Solana USDC Payments: Pay with USDC on Solana blockchain
  • Order Management: Create, track, and confirm orders
  • Shipping Integration: Handle physical addresses and delivery
  • Real-time Status: Monitor order progress and payment status

Basic Usage

Create an Amazon Order

Confirm Order Status

Parameters

Checkout Parameters

Confirm Order Parameters

Example Prompts

Natural Language Prompts

LangChain Tool Prompts

Create Order

Confirm Order

Implementation Details

Order Creation Flow

Order Status Polling

Payment Methods

Supported Currencies

  • USDC: Primary payment method on Solana
  • SOL: Alternative payment option

Payment Flow

  1. Quote Generation: Get pricing in USDC
  2. Transaction Creation: Generate Solana transaction
  3. Transaction Signing: Sign with user wallet
  4. Payment Execution: Submit to Solana network
  5. Order Confirmation: Verify payment completion

Shipping Configuration

Supported Regions

  • United States: Full support with state validation
  • International: Limited support (check with Crossmint)

Address Validation

Error Handling

Best Practices

  1. API Key Management
    • Store API key securely in agent config
    • Use environment variables for production
    • Never expose API keys in client-side code
  2. Address Validation
    • Validate shipping addresses before submission
    • Include all required fields
    • Use standardized country codes
  3. Order Tracking
    • Store order IDs for future reference
    • Implement polling for order confirmation
    • Handle timeout scenarios gracefully
  4. Payment Management
    • Verify USDC balance before ordering
    • Handle transaction failures appropriately
    • Monitor payment status regularly

Common Issues

  1. API Configuration
    • Missing or invalid API key
    • Incorrect API endpoint
    • Authentication failures
  2. Payment Issues
    • Insufficient USDC balance
    • Transaction signing failures
    • Network connectivity problems
  3. Shipping Problems
    • Invalid shipping addresses
    • Unsupported shipping regions
    • Missing required address fields
  4. Order Status
    • Payment confirmation delays
    • Order processing timeouts
    • Status polling failures

Response Formats

Successful Order Creation

Order Confirmation

Error Response

Order Lifecycle

  1. Quote: Initial price calculation
  2. Payment: USDC payment processing
  3. Delivery: Physical product fulfillment
  4. Completed: Order fulfilled and delivered

Configuration

Environment Setup

API Endpoints

Product Locators

Amazon Products

Shopify Products

  • getBalance: Check USDC balance
  • transfer: Transfer tokens
  • trade: Swap tokens for USDC
  • fetchPrice: Get current token prices

Resources