Skip to content
CoinsSendDevelopers
Agent resources

Build with your agent

View MarkdownAgent setup

Connect your coding assistant to the docs or start with a task prompt.

Add this Streamable HTTP URL in a compatible MCP client. The server provides public documentation and API schemas; it does not require a merchant API key.

https://api.coinssend.com/v1/docs/mcp

Read the client setup guide

Preview a prompt, copy it into your own coding agent, or download a focused documentation bundle. Prompts and the detailed API contract are currently in English.

Prompt language: English

Preview prompt
# Full checkout integration prompt

You are helping me add a CoinsSend full checkout integration to my application.

Use the canonical CoinsSend docs as the source of truth:
- https://docs.coinssend.com/getting-started.md
- https://docs.coinssend.com/QUICKSTART.md
- https://docs.coinssend.com/authentication.md
- https://docs.coinssend.com/invoices.md
- https://docs.coinssend.com/webhooks.md
- https://docs.coinssend.com/error-handling.md
- https://docs.coinssend.com/rate-limits.md
- https://docs.coinssend.com/openapi.json
- https://docs.coinssend.com/signature-test-vectors.json

Implement a server-side checkout flow using these values only after I replace them:
- Base API URL: {BASE_URL}
- Merchant ID: {MERCHANT_ID}
- API key environment variable name: {API_KEY_ENV}
- Order ID: {ORDER_ID}
- Amount: {AMOUNT}
- Success redirect URL: {SUCCESS_URL}
- Cancel redirect URL: {CANCEL_URL}
- Webhook URL: {WEBHOOK_URL}

Requirements:
1. Keep the merchant API key in environment variables or server secrets only. Never put it in frontend code, public code, logs, build output, or browser storage.
2. Create the invoice from server-side code. The frontend may ask my server to start checkout, but it must not sign merchant API requests.
3. Generate the PHP-compatible canonical JSON body from https://docs.coinssend.com/authentication.md, sign exactly md5(base64(canonical_body) + API_KEY), and send that same canonical string as the HTTP body. Verify the implementation against https://docs.coinssend.com/signature-test-vectors.json.
4. Send the required merchant authentication headers from the server request.
5. Include the order ID, amount, success URL, and cancel URL according to the invoice docs. Configure the merchant webhook callback in merchant settings; webhook_url is not an invoice-creation field.
6. Return or redirect the buyer to the invoice payment URL from the invoice creation response.
7. Treat success and cancel redirect URLs as UX signals only. Do not mark the order paid from a redirect. Payment confirmation must come from verified webhooks and persisted invoice status.
8. Persist the local order, CoinsSend invoice ID or code, payment URL, current status, and timestamps needed for reconciliation.
9. Handle invoice.paid as terminal success. Handle invoice.expired and aml.rejected.invoice as terminal failure states. Handle partial as not complete and keep the order awaiting full payment unless my business rules say otherwise.
10. Add a local uniqueness guard for repeated checkout starts. The API returns 409 for a duplicate order_id but does not replay the original response. Separately make webhook processing idempotent.
11. Add user-project tests and checks for signing, invoice creation, redirect URL behavior, status persistence, partial payment handling, expired handling, AML rejection handling, and the rule that frontend code never sees merchant secrets.
12. Run the relevant lint, type, unit, integration, and build checks available in my project, then report the exact commands and results.

Do not duplicate whole endpoint references in my code comments or docs. Link back to the canonical CoinsSend docs instead.

## Authoritative documentation

- https://docs.coinssend.com/QUICKSTART.md
- https://docs.coinssend.com/authentication.md
- https://docs.coinssend.com/invoices.md
- https://docs.coinssend.com/webhooks.md
- https://docs.coinssend.com/error-handling.md
- https://docs.coinssend.com/rate-limits.md
- https://docs.coinssend.com/openapi.json
- https://docs.coinssend.com/signature-test-vectors.json

If a documentation MCP client is already configured, use https://api.coinssend.com/v1/docs/mcp to search and read the public docs and OpenAPI. Otherwise retrieve the canonical URLs above. Documentation access does not authorize production actions. Do not request, paste, log, or embed real merchant secrets.

Use OpenAPI for fields and schemas, the guides for workflow, and signature test vectors for interoperability. Keep credentials in your own server environment.