How a Bitcoin payment works
A Bitcoin payment in CryptoLike goes through four steps and three statuses: new, pending and paid. The payment page, the API and the webhooks show the same status string, so your order logic reads one field. The payer needs no account with CryptoLike, only a Bitcoin wallet that can send to a bc1 address.
- You create the payment with
POST /v1/invoices, the WooCommerce plugin, the Magento 2 module or a payment link. Status:new. - The payer sees what to send: the exact BTC amount, the network (Bitcoin), the address with a QR code and the time left.
- The transfer is detected. Status:
pending, "Payment detected. Waiting for confirmation." - The payment is confirmed. After 3 confirmations the status is
paid, the funds are on your balance and a signedinvoice.paidwebhook arrives.
What the payer should know about Bitcoin
CryptoLike gives every Bitcoin payment its own native SegWit address that starts with bc1q. The payer's wallet adds the Bitcoin network fee in BTC on top of the amount, and the amount on the payment page must arrive in full. Only native BTC on the Bitcoin network reaches the payment.
- Address. Lowercase, starts with
bc1q, used for this payment only. - Network fee. Set by the sender's wallet and paid in BTC. A higher fee usually gets the transfer into a block sooner.
- Exact amount. If a wallet or exchange deducts its fee from the amount, the payment arrives short and becomes
underpaid. Send the difference to the same address before the time runs out. - Late transfers. A transfer confirmed after the payment expired is still credited to your balance, marked
late_payment: true, with aninvoice.late_paymentwebhook. Decide with the customer whether to fulfil or refund. - Network. Send native BTC on the Bitcoin network only. Bitcoin-pegged tokens on other networks never reach the payment and cannot be recovered.
Create a Bitcoin payment
To create a Bitcoin payment in CryptoLike, take the id of the asset with ticker BTC and network btc from GET /v1/currencies and pass it as coin_id to POST /v1/invoices. Price it in BTC, as in the example, or in USD or EUR: then CryptoLike converts at the current rate and locks the rate for the payment's time limit.
COIN_ID=$(curl -s https://api.cryptolike.net/v1/currencies \
| jq -r '.currencies[] | select(.ticker=="BTC" and .network=="btc") | .id')
BODY='{"amount":"0.0015","currency":"BTC","coin_id":"'"$COIN_ID"'","order_id":"A-1003"}'
curl -s https://api.cryptolike.net/v1/invoices \
-H "Content-Type: application/json" -H "Idempotency-Key: order-A-1003" \
-H "X-API-Key: $KEY_ID" -H "X-Timestamp: $TS" -H "X-Signature: $SIG" -d "$BODY"The response carries address, payer_amount and checkout_url: send the payer there. Signing: API authentication; every field: API reference.
FAQ
How many confirmations does a Bitcoin payment need?
CryptoLike credits BTC after 3 confirmations of the Bitcoin network. The threshold is set per asset, returned in GET /v1/currencies and shown to the payer as progress. More on confirmations.
What if the payer sends BTC on another network?
Only native BTC on the Bitcoin network reaches the payment. Bitcoin-pegged tokens on other networks do not, and cannot be recovered. If the payer holds stablecoins instead, create a payment for USDT on TRON or USDT on Ethereum.
Can I price in USD?
Yes. Send currency: "USD" with the BTC coin_id: CryptoLike converts at the current rate and locks it for the payment's time limit. If no fresh rate is available, the API answers 503: retry, or price the payment in BTC.
What if the payer sends too little?
The payment becomes underpaid and remaining_amount shows what is missing. A top-up to the same address before the time runs out completes it; a small shortfall within your account's tolerance still counts as paid. See underpaid payments.
How do Bitcoin payouts work?
POST /v1/withdrawals with coin_id, amount, to_address and your payout_id, or a CSV of up to 1,000 rows in the cabinet (mass payouts). Destinations may start with 1, 3, bc1q or bc1p. POST /v1/withdrawals/estimate first shows the platform fee, the reserved network fee and the total debit. Payouts require a verified account; fees are on the pricing page.
Other networks
Accept it in your shop
Learn more
- How many confirmations a crypto payment needs, and why it differs by networkWhat a blockchain confirmation is, why a crypto payment waits for several, why the threshold differs for Bitcoin, Litecoin, Ethereum and TRON, and where to see it.
- How to accept crypto payments on a website: 4 ways comparedFour ways to accept crypto payments with CryptoLike: a CMS plugin, the API or an SDK with a widget, a payment link, the Хорошоп connector. Steps and comparison.
- How to accept Bitcoin payments on a websiteAccept BTC with CryptoLike step by step: price in BTC or USD, set a deadline that fits Bitcoin's block time, handle slow and replaced transfers, and pay out.
Terms used here
Start with a test payment
Create an account, ask support for the test environment and see a payment go from pending to paid on a test network.