Skip to content

Bitcoin Checkout API Integration Guide for E-Commerce and SaaS

If you are searching for a Bitcoin checkout API, you are probably not looking for a generic "accept crypto" widget.

You are usually trying to solve a more specific problem:

  • create a payment request from your app
  • show the buyer a proper website checkout page
  • know when the payment is seen
  • know when it is confirmed
  • keep settlement under your control
  • keep your checkout, billing platform, shopping cart, and order management flow in sync

That narrows the market quickly.

Some providers optimize for conversion and bank settlement. Some optimize for running your own stack. If you are a small SaaS team or technical merchant, the practical requirement often sits in the middle:

you want API-driven Bitcoin checkout with direct wallet settlement, but you do not want to run payment infrastructure full time

That is the job this integration guide is about.

This Is A Checkout Integration Problem, Not A Treasury Article

The buyer does not care that your team can technically receive Bitcoin.

The buyer cares that checkout works:

  • the invoice matches the order
  • the payment page is clear
  • the order status updates correctly
  • your billing system knows when to fulfill
  • your shopping cart and merchant system keep the same state
  • support can see what happened

That is why this topic should be framed as checkout infrastructure for merchants, not as a generic crypto or treasury topic.

Bitcoin Checkout Integration Checklist

Before you compare providers, define the checkout system you actually need.

For most e-commerce and SaaS teams, a workable Bitcoin checkout integration needs:

  • invoice creation from the backend
  • a hosted checkout page or payment page
  • a checkout URL you can redirect the buyer to
  • an order ID or merchant reference on the invoice
  • a webhook endpoint for payment lifecycle events
  • order management updates for pending, confirmed, expired, and underpaid states
  • support visibility into what happened during checkout

If one of those pieces is missing, the problem usually comes back later as support load, broken fulfillment, or order reconciliation work.

Choose The Operating Model First

The phrase "crypto payment API" hides very different operating models.

Some products optimize for conversion and fiat settlement. Some optimize for self-hosting and infrastructure ownership. Some optimize for a hosted checkout integration that still settles to the merchant wallet.

If you are integrating Bitcoin into an online store, SaaS billing page, or merchant website checkout, the third option is usually the closest match.

The target outcome is:

  • invoices created from an API
  • hosted checkout page for the buyer
  • webhook events for your app and merchant system
  • Bitcoin settlement to your wallet
  • no self-hosting burden
  • a clean merchant checkout flow on your storefront or app

What A Serious Bitcoin Checkout API Must Do

If a checkout API is actually usable in production, it needs more than a payment address.

1. Create a real invoice object

A real invoice is not just an amount and an address.

It should define:

  • fiat amount
  • quoted BTC amount
  • invoice expiry
  • product or merchant reference fields
  • customer reference fields
  • the payment option selected for that invoice

Without that object, reconciliation gets weak immediately. Without that object, billing, support, and order fulfillment all get weaker too.

For an e-commerce integration, the invoice should also map cleanly to:

  • order ID
  • cart ID or checkout session
  • customer ID or email
  • product or plan reference
  • current checkout status

2. Give each invoice a clean payment destination

If you are self-custodial, this usually means deriving a unique address per invoice from an extended public key such as an xpub, ypub, or zpub.

That matters because it gives you:

  • direct wallet settlement
  • per-invoice reconciliation
  • no need to share or reuse one static receive address
  • a safer path for merchant order matching

3. Expose a payer-facing payment page

Even technical teams usually do not want to build the entire first version of the checkout UI themselves.

A usable hosted payment page should include:

  • the quoted BTC amount
  • the destination address
  • QR code
  • expiry countdown
  • live payment status
  • obvious buyer context such as product or order reference

For an e-commerce store or SaaS website checkout, that page also needs to behave like real checkout infrastructure, not like a bare crypto address screen.

4. Separate payment states properly

"Paid" is not enough.

A Bitcoin checkout flow usually needs to distinguish between:

  • no payment yet
  • payment detected
  • payment confirmed
  • invoice expired
  • invoice underpaid
  • invoice paid late or otherwise exceptional

If your API collapses all of that into one boolean, your application logic gets brittle. It also makes merchant support and checkout recovery harder than it should be.

5. Deliver webhooks you can trust

The event layer is what turns checkout into software instead of manual finance ops.

At minimum, you usually want webhook events for:

  • payment received
  • payment confirmed
  • invoice expired
  • invoice underpaid

You also want signature verification and retry behavior so your backend can consume those events safely. That is what lets a merchant checkout flow update the order system without manual intervention.

What An E-Commerce Bitcoin Checkout Integration Actually Needs

If you are wiring Bitcoin into a real store, billing platform, or merchant website checkout, the integration usually touches the same systems every other payment method touches:

  • shopping cart or pricing page
  • invoice creation on the backend
  • hosted checkout or payment page
  • order management or fulfillment logic
  • billing platform or subscription system
  • webhook endpoint in your application
  • support tooling for payment status questions

That is why a Bitcoin checkout API should be evaluated like a payment gateway integration, not like a crypto wallet feature.

The implementation question is not "can we receive Bitcoin?"

The real question is "can this checkout system keep our website checkout, merchant system, and order lifecycle accurate from invoice creation to confirmation?"

How The Systems Connect

In a normal e-commerce deployment, the Bitcoin checkout integration connects several systems:

  • storefront or pricing page
  • checkout session or cart record
  • invoice service
  • hosted payment page
  • webhook endpoint
  • order management system
  • fulfillment or subscription system
  • merchant dashboard and support workflow

If the data flow between those systems is loose, the customer experience degrades quickly.

What Your Backend Should Store

When your application creates a Bitcoin invoice, the backend should usually persist the fields that make the integration operable:

  • invoice ID
  • order ID
  • cart ID or checkout session ID
  • checkout URL
  • invoice status
  • quoted BTC amount
  • invoice expiry time
  • payment method or rail
  • customer identifier

That data model is what lets the checkout integration behave like the rest of your payment gateway integrations.

Order State Mapping

Before going live, define how Bitcoin payment states map into store or billing states.

A practical mapping looks like this:

  • invoice created -> checkout pending
  • payment detected -> awaiting confirmation
  • payment confirmed -> fulfill order or activate subscription
  • invoice expired -> release cart or mark checkout expired
  • invoice underpaid -> hold fulfillment and route to support

That mapping is what makes a Bitcoin checkout integration predictable for store admins, support, and customer success.

The Minimal Bitcoin Checkout Flow

For most SaaS teams and merchants, a serious checkout integration is surprisingly small once the primitives are right.

Step 1: Configure a Bitcoin payment method

In FinCobra Checkout, the Bitcoin rail uses an extended public key based payment method. You configure a Bitcoin payment method with your xpub, and the checkout system derives a unique receive address per invoice.

That keeps the merchant self-custodial while avoiding manual address management.

Step 2: Create an API key

Your application creates invoices through the checkout API using an API key. That keeps the integration boundary simple and lets you separate dashboard access from server-to-server invoice creation.

Step 3: Create the invoice

Your backend creates an invoice with the USD amount and whatever merchant context it needs.

In a typical e-commerce or SaaS flow, this happens after the buyer submits the shopping cart, subscription choice, or order form.

bash
curl -X POST \
  -H "X-Api-Key: fc_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amountUsd": 49.99,
    "productName": "Pro Plan - Monthly",
    "merchantReference": "order_123",
    "customerEmail": "buyer@example.com",
    "metadata": { "orderId": "order_123" }
  }' \
  https://fincobra.com/api/checkout/invoices

The invoice response is the important interface. It carries the checkout state your application can reason about:

  • invoice ID
  • status
  • TTL and expiry
  • payment summary
  • selected payment option
  • destination address and QR data for address-based rails
  • merchant-facing order and customer context

That response is what lets your billing platform, merchant system, or order management flow stay aligned with the payment state.

Step 4: Redirect the customer to the hosted payment page

Once you have the invoice ID, you can send the customer to:

text
https://fincobra.com/pay/:id

That page handles the payer-facing flow:

  • amount
  • address
  • QR code
  • countdown
  • status polling
  • the buyer-facing checkout experience

This is the part many teams underestimate. A payment API is not enough by itself unless you also want to own the checkout UI surface.

For many merchants, this hosted step is the fastest way to add Bitcoin to an existing website checkout without rebuilding the buyer-facing payment screen from scratch.

Step 5: Consume webhook events in your backend

Your app then reacts to invoice events instead of polling block explorers and hand-writing state transitions.

In practice, the webhook endpoint is what connects the checkout system to your merchant system.

FinCobra's current webhook events are:

  • payment_received
  • payment_confirmed
  • invoice_expired
  • invoice_underpaid

Webhook requests are signed with X-Checkout-Signature using HMAC-SHA256, and failed deliveries are retried automatically.

That gives you a clean flow for order fulfillment:

  • mark order as payment-seen when payment_received arrives
  • unlock the product on payment_confirmed
  • release reserved inventory on invoice_expired
  • send the case to ops or buyer support on invoice_underpaid

That is the difference between a demo and a production checkout integration.

Step 6: Update the order management system

The webhook handler should write back into the same order management or billing system your other payment methods use.

At minimum, the integration should let you:

  • mark checkout as pending when the invoice is created
  • show payment detected without prematurely fulfilling
  • fulfill only after confirmed payment
  • expire the order cleanly if the invoice times out
  • route exceptions to support or manual review

That is what makes Bitcoin checkout behave like a real e-commerce payment integration instead of a side channel.

Step 7: Make support and recovery easy

Your support team should be able to answer basic checkout questions without reading the blockchain.

That usually means showing:

  • invoice status
  • order reference
  • amount due
  • amount received
  • expiry time
  • checkout URL
  • timestamps for payment detection and confirmation

Webhook Endpoint Checklist

Before the integration is production-ready, your webhook endpoint should handle:

  • signature verification
  • idempotent event processing
  • retries without duplicate fulfillment
  • order lookup by invoice ID or merchant reference
  • safe status transitions
  • logging for support and merchant operations

This is routine payment gateway work, but it is also the difference between a reliable merchant checkout and a brittle one.

What Builders Usually Get Wrong

Most failed Bitcoin checkout implementations break on one of four assumptions.

1. "A wallet address is basically enough"

It is enough only if you are comfortable doing reconciliation by hand.

Once two buyers pay the same address, or one buyer sends a partial amount, the shortcut starts failing. That becomes a checkout problem immediately, not just an accounting problem.

2. "We can just mark invoices as paid"

You usually need at least a paid state and a confirmed state, plus exception handling for expiry and underpayment.

If your app sells access, subscriptions, or digital delivery, that distinction matters. It also matters for merchant operations when a buyer asks why an order is still pending.

3. "We will build the webhook logic later"

If the product flow depends on payment events, webhook design is core architecture, not cleanup work.

Event names, signature verification, retries, and idempotency all belong in the first serious version. This is especially true when the webhook endpoint is driving order management or a billing platform.

4. "Self-custodial means self-hosted"

It can mean that, but it does not have to.

That is one of the main gaps in this market.

You can keep the settlement destination under merchant control without forcing every software team to operate a payments stack.

Where FinCobra Fits

FinCobra Checkout is built for the narrower use case:

  • Bitcoin is the live rail today
  • the merchant config stores an xpub, ypub, or zpub
  • the system derives a unique address per invoice
  • invoices can be created through the API
  • customers can be sent to a hosted payment page
  • merchant systems can react through signed webhooks
  • website checkout and app checkout flows can stay tied to invoice state
  • order management can stay synchronized through invoice and webhook status changes
  • storefront checkout and merchant operations can use the same invoice lifecycle

That makes it a better fit than a conversion-first processor if the key requirement is direct wallet settlement.

It also makes it a better fit than self-hosting if your real goal is shipping Bitcoin checkout into your product rather than becoming a payment infrastructure operator.

Who This Is For

This article is really for one kind of buyer:

  • small SaaS teams
  • agencies building billing flows
  • online merchants
  • technical founders
  • software products adding Bitcoin as one payment option

If you want API-first Bitcoin checkout that settles to your wallet without taking on self-hosting, this is the lane to optimize for.

FAQ

What is the difference between a Bitcoin payment API and a Bitcoin checkout API?

A payment API may only help you create a payment request. A checkout API should also give you invoice lifecycle, a payer-facing flow, and event delivery your app, billing platform, or merchant system can consume.

Can a Bitcoin checkout API be self-custodial?

Yes. A self-custodial setup can derive receive addresses from an extended public key while the merchant keeps spending keys elsewhere.

Do I need a hosted payment page?

Not strictly. But most teams should use one at first. It removes a surprisingly large amount of UI and state-management work from the integration and makes it easier to launch a working website checkout flow.

Why are webhooks necessary?

Because your app needs machine-readable events for fulfillment. Payment detection, confirmation, expiry, and underpayment should not depend on manual chain checks.

When should I choose BTCPay instead?

Choose BTCPay when you explicitly want self-hosting, open-source control, and deeper infrastructure ownership.

Final Word

The best Bitcoin checkout API is not the one with the biggest list of supported coins.

It is the one that matches your operating model.

If you want:

  • direct wallet settlement
  • invoice creation
  • hosted payment pages
  • webhook-driven order updates
  • a checkout integration that fits an e-commerce store, SaaS billing flow, or merchant website checkout

then optimize for a self-custodial checkout flow rather than a generic crypto gateway.

If that is your use case, start with the FinCobra Checkout docs.