Copperx Docs
LoginGet Started
  • 🏠 Getting Started
    • Introduction to Copperx
    • Use Cases: How You Can Use Copperx
    • Key Concepts & Terminology
  • 🔑Setup & Configuration
    • Setup an account
      • Payment Configuration
      • Business Details
      • Apply your Branding
      • Manage Promo Codes
    • Environments (Testnet vs Mainnet)
    • How to Generate an API Key
  • 💳 Integrate Payments
    • Accept One-Time Crypto Payments
    • Accept Crypto Subscriptions
    • Create Invoices
    • Create a Recurring Invoices
    • Webhooks & Events
  • Error Handling & Troubleshooting
  • 📚API & Reference
    • Checkout Session API
    • Invoice API
    • Webhook Events
    • Authentication & Security
  • API Reference
  • 🔗No-Code Tools
    • Payment Link
    • Recurring Subscription
    • Recurring Invoice
    • Crypto Invoice
  • 🔌Integrations
    • WooCommerce
    • Zapier
    • Stripe
    • BigCommerce
    • Magento
  • ⚙️Support
    • Clear Your Stuck Payments
Powered by GitBook
On this page
  1. Integrate Payments

Accept One-Time Crypto Payments

One-time payments let customers pay using crypto, similar to a standard checkout experience.

How it Works:

  1. Create a Checkout Session using the API.

  2. Redirect the customer to the hosted checkout page (url from API response).

  3. Copperx handles on-chain payment tracking.

  4. Copperx redirects the customer to successUrl or cancelUrl based on payment completion.

  5. Optionally, receive payment status updates through webhooks.

Example API Call:

curl --request POST \
  --url https://api.copperx.dev/api/v1/checkout/sessions \
  --header 'Authorization: Bearer {API_KEY}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "successUrl": "https://example.com/success",
    "cancelUrl": "https://example.com/cancel",
    "lineItems": {
      "data": [
        {
          "priceData": {
            "currency": "usdc",
            "unitAmount": "100000000",
            "productData": {
              "name": "Pro Plan",
              "description": "One-time access"
            }
          }
        }
      ]
    }
  }'

Best Practices:

  • Validate the session’s status using API or webhooks.

  • Use test mode and Copperx’s faucet for testing.

PreviousHow to Generate an API KeyNextAccept Crypto Subscriptions

Last updated 6 days ago

💳