Blog

How to migrate from Coinbase Commerce to CoinStack

CoinStackUpdated 11 min read
Comparisons

To migrate from Coinbase Commerce to CoinStack, replace each charge with a checkout. POST /checkouts returns a url where Commerce returned a hosted_url, and the checkout.completed webhook takes the place of charge:confirmed. Payments still settle as USDC in a wallet you control, at 0.8% where Commerce charged 1%. The change your customers will see is that they pay by sending to an address, from any wallet or exchange, on 11 networks.

What stays the same and what changes?

The Commerce column below quotes Coinbase's own pages: its developer FAQ and welcome page from July 2025, and the comparison table in its help article on the transition from March 2026.

Coinbase CommerceCoinStack
Fee"Coinbase Commerce applies a 1% fee to all transactions."0.8% of each payment
Settlement"Automatically settle payments in USDC"USDC for every payment, on the network and to the address you choose
Who holds the money"Self-custodial"A wallet created for your account at sign-up, which you control, or another address you name
Networks"Ethereum, Polygon, Base"11, including Bitcoin, Solana, TRON and BNB Smart Chain
Bitcoin"Bitcoin and UTXO payments from self-custodial wallets or other exchanges are not supported"On-chain BTC from any wallet or exchange
Wrong amounts"charges cannot be underpaid or overpaid"Handled with an allowance you set (0.5% by default), statuses and flags

On $10,000 of monthly sales, Commerce took $100. At 0.8% the fee is $80.

The row that needs the most thought is "Wrong amounts". A Commerce payment was made on Coinbase's page, from a Coinbase account or from a wallet that signed the transaction there, for an amount the page set. A CoinStack customer pays by sending to an address from their own wallet or exchange, so the amount that arrives is the amount they sent. Short, over and late payments are each recorded with a status or flag that your code can act on, as listed in the underpayments guide and explained in underpaid crypto payments. What you gain is the customer who pays from an exchange, or from a wallet that cannot connect to a website. That trade is covered in wallet-connect checkouts vs pay-by-address checkouts.

How do charges map to checkouts?

A Commerce charge and a CoinStack checkout are the same idea: a request for one payment, with a hosted page and a status. The fields line up closely. Commerce names are from the archived Charges API page.

Coinbase CommerceCoinStackNotes
POST https://api.commerce.coinbase.com/charges/POST https://coinstack.net/api/v1/checkoutsServer side only
X-CC-Api-Key headerAuthorization: Bearer sk_...Create a key with read and write access
local_price.amount, local_price.currencyamount, currencyamount is a string. 146 currencies are accepted
name, descriptiondescriptionShown to the customer on the checkout page
redirect_url, cancel_urlsuccess_url, cancel_urlLinks on the page, not redirects
metadatametadataUp to 50 pairs, and values must be strings
id, codecheckout_idPut your own order number in reference
hosted_urlurlSend the customer here
expires_atexpires_atYou can set it: 10 minutes to 365 days ahead, 24 hours by default

The new create call looks like this:

curl https://coinstack.net/api/v1/checkouts \
  -H "Authorization: Bearer $COINSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "49.00",
    "currency": "USD",
    "reference": "order-1042",
    "description": "Order #1042",
    "success_url": "https://example.com/orders/1042/thanks",
    "cancel_url": "https://example.com/cart",
    "metadata": { "order_id": "1042" }
  }'

The response is {"success": true, "response": {"checkout": {...}}}. Save response.checkout.checkout_id with the order and send the customer to response.checkout.url. Because success_url is a link the customer may never click, confirm payment from the webhook and not from their return. The checkouts guide has the rules for each field.

How do statuses and webhook events map?

Commerce tracked a charge through a timeline array. A checkout has one status field and 3 flags.

Commerce statusCoinStack statusWhat to do
NEWpendingNothing has been paid
SIGNEDNoneThere is no wallet signature step
PENDINGconfirmingA payment was detected. Do not fulfil yet
COMPLETEDcompletedFulfil the order
EXPIREDexpiredClosed unpaid, or part-paid if underpaid is true
NonepartialPart of the amount arrived and the checkout is still open
NoneresolvedYou accepted an underpayment. Treat it as paid

One habit must change. Coinbase's payment status page told merchants they "can choose to deliver goods when orders are PENDING". The nearest CoinStack status, confirming, means only that a transfer was seen. Deliver on completed. The flags underpaid, overpaid and late add detail: overpaid is set when the customer sent more than 2% over, and late when the payment that completed the checkout arrived after expires_at.

Commerce webhookCoinStack webhook
charge:createdNone. Events start after pending
charge:pendingcheckout.confirming
charge:confirmedcheckout.completed
charge:failedcheckout.expired is the nearest
X-CC-Webhook-Signature headerCoinStack-Signature header
event.type and event.data in the bodykind and data.checkout, plus an event_id

Renaming the header is not enough, because the signed string is different. Commerce signed the raw body with HMAC-SHA256 and your shared secret. The new header carries 2 values, t=...,v1=.... You join t, a full stop and the raw body, compute the HMAC-SHA256 of that string with the signing secret (the whole string, including its whsec_ prefix), compare the result with v1, and reject anything where t is more than 5 minutes old. Working code in Node.js, Python and PHP is in the webhooks guide, and how to verify payment webhooks explains each step.

Retries are shorter too. Commerce retried "with an exponential backoff for up to three days". CoinStack makes 8 attempts over about a day and expects a 2xx answer within 10 seconds. If your endpoint was down for longer than that, resend the missed events from Recent events in the dashboard. The same event can arrive twice, so record each event_id you have handled.

Migration steps for an API integration

  1. Create an account with Sign in, using an email code or Google. A merchant account and its wallet are created at that point. Turn on two-factor authentication.
  2. Open Settings and choose which tokens and networks to offer, who covers network cost on each network, and the underpayment allowance (0.5% of the total by default).
  3. Open Developers, select New API key and set Access to Read and write. The key starts with sk_ and is shown once.
  4. Replace the charge call with the checkout call above, and store checkout_id next to the order.
  5. In Developers, select Add webhook and enter an https:// URL. Copy the signing secret, which is also shown once. Handle checkout.completed, and add checkout.expired if you release stock when an order goes unpaid.
  6. Use Send test on the webhook to confirm your server accepts a signed event.
  7. Create a real checkout for $1 and pay it with USDC on Base. It is the same check Commerce's own FAQ recommended, "creating a $1 charge on Base with USDC", because it did not support testnet transactions.
  8. Switch your pay button to the new flow, then remove the Commerce key, webhook secret and any commerce.coinbase.com links from your code and templates.

The developer-level detail, with code before and after, is in migrating code from the Coinbase Commerce API. To see the page your customers will get before you write anything, open the demo checkout.

Swapping the WooCommerce plugin

Coinbase's plugin has been closed on WordPress.org since October 5, 2026, and the API it called no longer works. The CoinStack plugin needs WordPress 6.5 or newer, WooCommerce 8.3 or newer, PHP 7.4 or newer and a site address that starts with https://. It works with the block checkout and the classic checkout.

  1. Create an API key with Read and write access under Developers in the CoinStack dashboard.
  2. Add CoinStack for WooCommerce from the WordPress.org plugin directory: under Plugins > Add New Plugin, search for the plugin's name, then install and activate it. The WooCommerce page of the docs lists the same steps.
  3. Under WooCommerce > Settings > Payments > CoinStack, tick Enable CoinStack and paste the API key. After you save, the settings page shows Connected.
  4. Switch the Coinbase Commerce payment method off, then deactivate its plugin.
  5. Place a real order for a small amount and pay it.

Coinbase's setup page had a step to "Paste Coinbase API key and copy WooCommerce webhook URL". The second half of that step is gone, because the CoinStack plugin sets up its own webhook and you copy nothing.

During confirmation the order sits on hold, with a note recording the payment. When the checkout completes, the order is marked paid and moves to Processing, as it does with any other payment method. If an unpaid order is cancelled, the plugin closes its checkout. Removing the old plugin cleanly is covered in replacing the Coinbase Commerce WooCommerce plugin.

Coinbase did not publish an official WHMCS module, so hosts used community-built ones. There is an official CoinStack gateway module for WHMCS 8 and 9, set up as described in the WHMCS page of the docs, and the swap is described in replacing a Coinbase Commerce module in WHMCS.

What happens to history and open invoices?

Nothing carries over. Coinbase's help article said history would not transfer even to its own successor, because Commerce and Coinbase Business "are separate systems", and it told merchants to export before March 31, 2026. If you missed that, your order system and the on-chain transfers into your wallet are the record you have. More on what was lost is in what happened to Coinbase Commerce.

Set up the new records so that you never depend on an export again. Every payment lists a deposit_tx_hash, the transaction the customer sent, and a fill_tx_hash, the one that delivered USDC to your wallet. A read-only API key can list checkouts and payments, so a nightly job can copy them into your own database:

curl "https://coinstack.net/api/v1/payments?limit=100" \
  -H "Authorization: Bearer $COINSTACK_READ_ONLY_KEY"

Each response includes a cursor for the next page. Matching those rows to orders is the subject of how to reconcile crypto payments with your orders.

Open invoices need a manual pass. An unpaid Commerce charge can no longer be paid, so list every invoice or quote that still carries a Commerce link. For each one, create a checkout for the outstanding amount, either through the API or by hand in the dashboard (amount, currency, and optionally the customer's email, a reference and a description), and send the new link. A checkout made in the dashboard stays open for the default 24 hours, so set expires_at through the API, from 10 minutes to 365 days ahead, to create long-dated ones: a net-30 invoice needs an expiry 30 days ahead. Tell those customers what will look different: they choose a token and a network, then send the exact amount to the address shown.

What does Coinbase Business offer former Commerce merchants?

Coinbase Business is the product Coinbase pointed Commerce merchants to. In March 2026, Coinbase's help article described Coinbase Business as custodial and said it was "currently only available to businesses with a legal entity in the United States or Singapore". Its changelog entry of October 26, 2026 lists USDC payments on Ethereum, Base, Polygon, Optimism, Arbitrum and Solana, and USDT on Ethereum, settling in USDC to the Coinbase Business account. The differences in custody, eligibility and coverage are set out in CoinStack vs Coinbase Business.

Frequently asked questions

Can I import my Coinbase Commerce history into CoinStack?

No, history does not transfer between the two. Keep whatever export you made before March 31, 2026 with your accounting records, because Coinbase's portal is no longer reachable to export from. New payments are listed in the dashboard and through the API, each with the customer's transaction hash and the hash of the USDC transfer to your wallet.

What replaces charge:confirmed in CoinStack?

checkout.completed. It is sent when a checkout has been paid in full, or short by no more than your underpayment allowance. If you used to fulfil on charge:pending, do not move that logic to checkout.confirming, which only reports that a payment was detected. Treat checkout.resolved as paid as well if you accept underpayments by hand.

Can my customers still pay from a Coinbase account?

Yes, as a withdrawal. The customer picks a token and network on the checkout page, then sends the exact amount from Coinbase to the address shown, the same as from any exchange that supports that token on that network. Any withdrawal fee Coinbase charges is paid by the customer.

How do I test the migration before switching?

In 3 steps. Open the public demo checkout to see the page your customers will use. Use Send test on your webhook in the dashboard to check signature handling. Then create a $1 checkout and pay it with a stablecoin on a low-cost network.

Do I need to change the currency I price in?

No. A checkout takes an amount in any of 146 currencies, much as Commerce's local_price took an amount and a currency. CoinStack converts it to US dollars once, when the checkout is created, and that value does not move. The customer then sees the amount to send in the token they choose, and you receive USDC whatever they paid with.

More posts