# CoinsPay API > The CoinsPay API accepts cryptocurrency on your website: invoices with a payment page, receiving addresses, payments, payouts to your wallets and webhooks on every event. - Base URL: `https://coinspay.app/api/v1`. All requests and responses are UTF-8 JSON. - Auth: `Authorization: Bearer cpk_…`, a key from the dashboard (shop → API keys). An invoices-only key covers invoices, `GET /shop`, `/chains` and `/currencies`; addresses, payments, balances and payouts need a full-access key. - Test keys `cpk_test_…` create test invoices: the payment page pays them with a button, and events come with `test: true`. - Amounts are decimal strings, e.g. `"49.9"`. - Webhooks are signed: `x-cpay-signature: t=,v1=`, HMAC-SHA256 of `${t}.${body}` with the webhook secret. Re-read the object through the API before you deliver an order. - Machine-readable: OpenAPI 3.1.0 at `https://coinspay.app/api/openapi.json`. ## Guide - [Quick start](https://coinspay.app/docs/quickstart.md): API key, first invoice, payment page and the paid webhook in five steps - [SDK](https://coinspay.app/docs/sdk.md): official libraries for Node.js, PHP, Python and Go - [AI assistants (MCP)](https://coinspay.app/docs/mcp.md): connect the shop to Claude, ChatGPT or a code editor over MCP: sign-in, permissions, payouts confirmed by a person - [API key](https://coinspay.app/docs/api-key.md): the Authorization header, invoices-only and full-access keys, IP allowlist - [Test mode](https://coinspay.app/docs/test-mode.md): test keys `cpk_test_…`: test invoices paid with a button, events with `test: true` - [Formats](https://coinspay.app/docs/formats.md): amounts as decimal strings, base units, UTC time, UUID ids, null fields - [Errors](https://coinspay.app/docs/errors.md): the error envelope, HTTP statuses and error codes - [Idempotency](https://coinspay.app/docs/idempotency.md): the `Idempotency-Key` header: safe retries without duplicates - [Pagination](https://coinspay.app/docs/pagination.md): cursor pagination with `next_cursor` and `limit` - [Limits](https://coinspay.app/docs/limits.md): request rate limits per IP and per shop - [Webhooks](https://coinspay.app/docs/webhooks.md): the event envelope, signature check, retries and handling rules - [States](https://coinspay.app/docs/states.md): statuses of invoices, payments and payouts and how they change ## API reference - [Invoices](https://coinspay.app/docs/invoices.md): An invoice is the simplest way to accept payment; methods: `POST /invoices`, `GET /invoices`, `GET /invoices/{id}`, `POST /invoices/{id}/cancel` - [Addresses](https://coinspay.app/docs/addresses.md): A receiving address in the chosen network; methods: `POST /addresses`, `GET /addresses`, `GET /addresses/{id}` - [Payments](https://coinspay.app/docs/deposits.md): Payments to the shop addresses and balances by asset; methods: `GET /deposits`, `GET /deposits/{id}`, `GET /balances` - [Payouts](https://coinspay.app/docs/payouts.md): Withdrawal from a shop address to your wallets; methods: `POST /payouts/quote`, `POST /payouts`, `GET /payouts`, `GET /payouts/{id}` - [Shop](https://coinspay.app/docs/shop.md): Key check; methods: `GET /shop` - [Reference data](https://coinspay.app/docs/chains.md): Values of request parameters; methods: `GET /chains`, `GET /currencies` - [Webhook events](https://coinspay.app/docs/events.md): every event type, its headers and body - [Objects](https://coinspay.app/docs/objects.md): fields of the objects in responses and events: Invoice, Deposit, Payout, Address, Balance, PayoutQuote, Shop, Chain ## Optional - [The whole documentation in one file](https://coinspay.app/llms-full.txt) - [MCP server of these docs](https://coinspay.app/mcp): Streamable HTTP, no key; tools `search_docs`, `list_docs` and `get_doc` - [OpenAPI 3.1.0 document](https://coinspay.app/api/openapi.json) - [Node.js SDK](https://github.com/coinspayapp/coinspay-node): `npm install coinspay`, Node.js 18+ - [PHP SDK](https://github.com/coinspayapp/coinspay-php): `composer require coinspay/coinspay-php`, PHP 7.0–8.5 - [Python SDK](https://github.com/coinspayapp/coinspay-python): `pip install coinspay`, Python 3.8+ - [Go SDK](https://github.com/coinspayapp/coinspay-go): `go get github.com/coinspayapp/coinspay-go`, Go 1.21+ - [Ready-made plugins for CMS, billing systems, forums and game servers](https://coinspay.app/plugins) - [The same documentation for people](https://coinspay.app/docs)