settlematic
Developers··7 min read·By Keshav Sharma

Crypto Checkout API Integration: Embedding Non-Custodial Payments

Learn how to integrate a non-custodial crypto checkout API, generate dynamic payment links, embed payment components, and handle invoice status callbacks.

Do this next

Create a crypto invoice

  1. Quote the invoice in fiat.
  2. Client pays USDC, USDT, or EURC.
  3. Funds settle to a wallet you already control.

A crypto checkout API lets your backend create payment sessions, return hosted or embeddable checkout URLs, and receive signed webhooks when on-chain payment confirms. Settlematic [Gateway](/products/gateway) derives deposit addresses for each merchant's wallet — no custodial float.

TL;DR

A crypto checkout API enables businesses to generate non-custodial payment sessions programmatically. By issuing RESTful API calls, platforms create dynamic invoice URLs or embed inline checkout modals. Deposit addresses are derived directly from the merchant wallet, ensuring direct on-chain settlement without intermediary custody or take-rate fees.

Settlematic webhook endpoint setup subscribing to invoice and payment events for automation

A crypto checkout API enables businesses to generate non-custodial payment sessions programmatically. By issuing RESTful API calls, platforms create dynamic invoice URLs or embed inline checkout modals. Deposit addresses are derived directly from the merchant wallet, ensuring direct on-chain settlement without intermediary custody or take-rate fees.

As digital commerce scales globally, software platforms and e-commerce merchants increasingly demand frictionless crypto checkout options. Integrating a modern checkout API allows applications to accept stablecoins and major cryptocurrencies cleanly alongside existing card and wire options. Learn how to construct custom checkout flows in our comprehensive developer documentation.

Core architecture of a non-custodial crypto checkout API

Traditional payment APIs act as intermediary ledger controllers: they authorize a card charge, move funds into a holding account, and release payout batches days later. In contrast, a non-custodial crypto checkout API functions as an intelligent state engine and blockchain indexing service.

When your server initiates a checkout request, the API processes the request through four deterministic stages:

  • Session Initiation: Your server passes order metadata, currency choices, and fiat pricing to the API using secure server-to-server credentials.
  • Address Binding: The gateway assigns a unique deposit address derived for that session, cryptographically bound to your configured payout wallet.
  • Price Rate Guarantee: Real-time price aggregators lock the precise crypto equivalent (e.g. USDC, USDT, BTC, ETH) for the designated payment window.
  • State Monitoring: Chain indexers monitor the assigned address, transitioning session states from pending to confirmed upon receiving block finality.

Comparing checkout integration patterns: Redirect, Modal, and Native API

Selecting the right integration pattern depends on your application's user experience requirements, security posture, and engineering resources. For an in-depth walkthrough of user-facing implementation options, review our step-by-step guide on how to accept crypto payments on your website.

Integration MethodImplementation ComplexityUX FlexibilitySecurity & ScopeBest Used For
Hosted Redirect PageLow (Standard REST calls)Hosted by GatewayZero client-side crypto risk; full PCI/AML isolationSaaS subscriptions, email invoices, quick e-commerce links
Embedded Overlay ModalMedium (JS SDK / iFrame)Seamless overlay on merchant siteIsolated iframe container; no parent page script accessE-commerce carts, digital asset marketplaces, in-app billing
Native Custom UI (API-only)High (Full custom frontend)100% custom UI controlMerchant controls UI state; handles QR rendering & timersWeb3 dApps, mobile apps, enterprise platforms requiring white-label UX
Architectural comparison of crypto checkout integration methods for web and mobile applications.

Step-by-step checkout session lifecycle

Understanding the payment session lifecycle ensures robust error handling and smooth user feedback during checkout.

  • 1. Order Creation: The buyer clicks 'Checkout' on your storefront. Your backend makes an authenticated API call specifying the invoice parameters.
  • 2. Response Handling: The API returns a checkout payload containing the checkout session ID, hosted payment URL, deposit address, QR code payload (following standards like BIP-0021 and EIP-681), and expiration timestamp.
  • 3. Buyer Presentation: Your frontend redirects the user or displays the payment modal containing wallet connect buttons, copyable deposit addresses, and live conversion counters.
  • 4. Real-Time Status Updates: The frontend polls the status endpoint or listens to WebSocket signals while your backend awaits signed webhooks, detailed in our crypto payment webhooks reconciliation guide.
  • 5. Finality & Completion: Once confirmed on-chain, the checkout UI updates automatically to show payment success, redirecting the buyer to your custom confirmation URL.

Managing multi-chain asset selection and dynamic pricing

Modern buyers hold crypto across multiple blockchain networks. A flexible checkout API allows buyers to choose their preferred network—such as Polygon, Solana, Arbitrum, or Ethereum—and asset type at payment time.

When a customer selects a specific chain and token, the API updates the active deposit address and rate quote dynamically. For example, a $500 invoice can be settled in USDC on Solana with sub-second finality and micro-cent gas fees, or in native BTC on Bitcoin.

By utilizing non-custodial address binding, merchants receive their chosen settlement token directly without needing to manage multi-chain hot wallets or node infrastructure. Check out our enterprise checkout engine features on Gateway.

Security best practices for API key management and webhook callbacks

Implementing payment APIs requires strict separation of administrative credentials and client-facing tokens. Never expose private API secret keys in client-side JavaScript, mobile application bundles, or public repositories.

Always issue API requests from your backend server using encrypted environment variables. When receiving asynchronous webhook callbacks from the checkout engine, verify HMAC-SHA256 headers using constant-time comparison before modifying database order statuses or dispatching digital goods.

Start building with Settlematic Gateway API

Integrating crypto payments into your checkout stack shouldn't require complex custodial setups or excessive transaction take-rates. Settlematic provides developer-friendly REST APIs, robust webhooks, and direct non-custodial wallet settlement under predictable flat-rate pricing.

Explore sample integration workflows, generate test API keys in our sandbox, or schedule a walkthrough on our live demo.

Sources

Frequently asked questions

What is a crypto checkout API?
A crypto checkout API is a set of programmatic endpoints that allow merchants and platforms to issue invoices, generate dynamic crypto payment links, track transaction states, and integrate non-custodial crypto payments into custom web or mobile applications.
How does dynamic fiat-to-crypto pricing work in the API?
When an API call passes an invoice amount denominated in fiat (such as 100 USD), the checkout engine calculates the real-time cryptocurrency equivalency (such as USDC or BTC) using multi-exchange price feeds, locking the exact crypto amount for a customizable invoice validity window.
Can I embed a crypto checkout UI directly into my website?
Yes. Integrators can choose between redirecting buyers to a hosted payment page, opening an embedded overlay modal, or fetching raw invoice parameters to build a 100% custom native checkout UI.
Are API keys required to initiate checkout sessions?
Yes. Server-side API requests require authenticating with a secret API key to create payment sessions securely. Client-side components only receive restricted session tokens to render UI elements safely without exposing administrative keys.
How does non-custodial API settlement work?
Unlike custodial gateways that generate deposit addresses tied to internal pooled accounts, a non-custodial API generates deposit addresses cryptographically derived from or bound to the merchant's destination wallet. Funds arrive directly in your wallet on-chain.

Continue reading

Start invoicing and accepting crypto payments

Collect and Gateway on one non-custodial platform - funds always sweep to wallets you control.