# blockwallets docs: ways to integrate

> Pick an integration: no-code payment links, POS and embed buttons; the Cryptomus-compatible API or the native REST API; compatible APIs for Cryptomus, NOWPayments and Coinbase Commerce; AI prompts, AGENTS.md and MCP.
>
> HTML: https://blockwallets.io/docs?lang=en · 中文: https://blockwallets.io/docs.md

## Docs

blockwallets lets you accept USDT and USDC, plus BTC, LTC and native coins (credited in US dollars at a locked rate). Every integration below creates the same kind of bill on the same hosted checkout, with the same confirmations, fees and balance; they differ only in how your system talks to us. Pick the one that fits, then follow its page.

### Pick an integration

Grouped by where you are starting from. Each card opens the full guide.

#### No code

Take payments from the merchant dashboard; nothing to install.

- [Payment links](https://blockwallets.io/docs?lang=en#links): Enter an amount (or let the payer type one) and share the link or QR code. Every visit creates a fresh bill.

- [POS for shops](https://blockwallets.io/docs?lang=en#pos): Staff open a POS link on a phone or tablet, type the amount and the customer scans the QR code.

- [Embed button](https://blockwallets.io/docs?lang=en#embed): Paste a “Pay” or “Donate” button into any website: plain HTML, or HTML plus one script tag.

#### New API integration

You are writing the integration from scratch.

- [Native REST API](https://blockwallets.io/docs/api?lang=en): Bearer key, amounts in cents, idempotent `ref`, HMAC-SHA256 webhooks and an events API. Keys are self-serve in the dashboard.

- [Cryptomus-compatible API](https://blockwallets.io/docs/cryptomus?lang=en): POST + JSON with an md5 signature. Credentials are self-serve in the dashboard, every key endpoint has a “Try it” panel.

#### Migrating from another gateway

Keep your code: compatible APIs, so you change the base URL and keys.

- [From Cryptomus](https://blockwallets.io/docs/cryptomus?lang=en#cryptomus): Change `https://api.cryptomus.com` to `https://blockwallets.io` and use a new merchant and API key. Paths, parameters, `sign` and webhooks stay the same.

- [From NOWPayments](https://blockwallets.io/docs/nowpayments?lang=en): Change `https://api.nowpayments.io/v1` to `https://blockwallets.io/nowpayments/v1` and use a new API key and IPN secret. `x-nowpayments-sig` stays the same.

- [From Coinbase Commerce](https://blockwallets.io/docs/coinbase-commerce?lang=en): Pass `https://blockwallets.io/coinbase/` as the SDK base URL and use a new API key and webhook shared secret. `X-CC-Webhook-Signature` stays the same.

#### Let AI integrate it

For people who don’t write code but use an AI coding tool.

- [Prompt generator](https://blockwallets.io/docs/ai?lang=en): Pick your website, payment style and AI tool; copy the prompt it builds for Claude Code, Codex, Cursor or ChatGPT.

- [AGENTS.md](https://blockwallets.io/agents.md): Integration rules, common mistakes and an acceptance checklist; save it in your project root for coding agents.

- [MCP server](https://blockwallets.io/docs/mcp?lang=en): Let an AI tool search these docs and create test bills directly.

#### Tools

Debugging help that runs in your browser.

- [Signature checker](https://blockwallets.io/docs/sign?lang=en): Paste a request or webhook body and see every signing step and where yours differs. The API key never leaves your browser.

### Cryptomus-compatible or native?

Both create the same bills on the same checkout, with the same fees and balance. The difference is the request style, the webhook format and how you get credentials.

|  | Cryptomus-compatible | Native REST |
| --- | --- | --- |
| Credentials | Generate them yourself in the dashboard under “Developers › Integration & keys” (one set for Live, one for Test) | Also self-serve in the dashboard under “Developers › Integration & keys”: a Live and a Test key (`bw_live_…` / `bw_test_…`) plus their webhook signing secrets |
| Requests | Every call is `POST` + JSON, with headers `merchant` and `sign` = `md5(base64(request body) + API key)` | REST (`GET` / `POST`) with `Authorization: Bearer`; the key prefix decides Live or Test |
| Amounts | Decimal strings such as `"42.00"`, in USD, USDT or USDC (all 1:1) | Integers in US cents, such as `4200`; USD only |
| Retries | The same `order_id` returns the existing bill | The same `ref` with the same parameters returns the existing invoice; different parameters return 409 |
| Webhooks | Sent to each bill’s `url_callback`; the signature is the `sign` field in the body | Sent to the webhook URL set in the dashboard; `X-BW-Signature` = HMAC-SHA256 with a timestamp; list and redeliver through `/v1/events` |
| Static addresses | `/v1/wallet`: one network per call | `/v1/deposit-accounts`: every network at once for one customer |
| Tooling | “Try it” panels, the signature checker, AI prompts and the MCP server; existing Cryptomus SDKs and plugins work | This reference and its code samples |

Starting fresh? Use the native REST API: amounts in cents, an idempotent `ref`, timestamped webhook signatures, and keys you generate yourself in the dashboard. Already on Cryptomus, or want to use an existing Cryptomus SDK or plugin? Use the Cryptomus-compatible API.

### Quick start

From nothing to a test payment in five steps (Cryptomus-compatible API; the other APIs follow the same steps with their own credentials).

- Request access on the [home page](https://blockwallets.io/?lang=en#join). Once approved, sign in to the [merchant dashboard](https://blockwallets.io/dashboard).

- Open “Developers › Integration & keys” in the dashboard, generate a merchant and API key in the Test column and add your website domains.

- Your server creates a bill with `POST /v1/payment` and redirects the customer to `result.url`.

- Pay it with “Simulate payment” on the checkout, then check that your webhook handler verifies `sign` and credits by `payment_amount_usd`.

- Switch to the credentials in the Live column and pay a small real amount once (“Try a payment” on the dashboard home page).

```http
POST https://blockwallets.io/v1/payment
merchant: <merchant>
sign: md5(base64(body) + API key)
Content-Type: application/json

{
  "amount": "42.00",
  "currency": "USD",
  "order_id": "order_1042",
  "url_callback": "https://shop.example/webhooks/crypto",
  "url_return": "https://shop.example/cart",
  "url_success": "https://shop.example/thanks?order=1042"
}
```

Code in Node.js, PHP and Python for every step is in the [Cryptomus-compatible API](https://blockwallets.io/docs/cryptomus?lang=en#api) docs; if you would rather have an AI do it, start with the [prompt generator](https://blockwallets.io/docs/ai?lang=en).

### Payment links (no code)

Merchant dashboard → “Payments › Payment links” → enter a description and amount (fix a network or let the customer choose) → create. Each link has a URL and a QR code.

- Every time someone opens the link a new bill is created, so one link can be reused (e.g. “Membership $99”).

- Every payment shows up under “Payments › Transactions”; withdraw it to your wallet from “Funds › Balance & withdrawals”.

- If you have created credentials and a webhook URL under “Developers › Integration & keys”, payments through links are notified too, in the [Cryptomus-compatible webhook format](https://blockwallets.io/docs/cryptomus?lang=en#webhooks).

- To stop accepting, click “Disable” and the link stops working immediately.

### POS for shops

For counters and stalls: the merchant dashboard → “Payments › POS” → open a terminal and get a POS link. Staff open it on a phone or tablet, type an amount and a payment QR code appears; when the customer pays, the screen shows “Paid”.

- A POS bill is valid for 30 minutes. Payments go to your balance and show up under “Payments › Transactions”, and you are notified at your webhook URL just like payment links.

- A POS link can only take payments: it can’t see your balance, withdrawals, other orders, settings or credentials.

- Lost a device, or a staff member left? Revoke that terminal in the dashboard and its link stops working immediately.

### Embed button

Merchant dashboard → “Payments › Payment links” → “Embed button”: pick the text, colour, size and shape and copy the snippet. Clicking the button opens that payment link’s checkout.

- Plain HTML: one styled link with no script, so it works anywhere you can paste HTML (site builders, forums, email signatures).

- With the script: add `data-blockwallets` and one `/embed.js` tag; on desktop the checkout opens in a small centred window, on phones it opens normally.

- The script sends no requests, sets no cookies and adds no iframe. If the page blocks it, the button is still an ordinary link that works.

In the snippets below, replace `/l/pl_…` with the address of your own payment link.

#### Plain HTML

```html
<a href="https://blockwallets.io/l/pl_…" target="_blank" rel="noopener nofollow"
   style="display:inline-flex;align-items:center;height:44px;padding:0 22px;border-radius:999px;background:#1f5a3d;color:#ffffff;font:600 16px/1 sans-serif;text-decoration:none">Pay with crypto</a>
```

#### HTML + script

```html
<a href="https://blockwallets.io/l/pl_…" target="_blank" rel="noopener nofollow"
   data-blockwallets data-color="green" data-size="m" data-shape="pill">Pay with crypto</a>
<script src="https://blockwallets.io/embed.js" async></script>
```
