Aller au contenu
CoinsSendDéveloppeurs
Ressources pour les agents

Développer avec votre agent

Voir le MarkdownConfigurer un agent

Connectez votre assistant de programmation à la documentation ou commencez avec un prompt adapté à votre tâche.

Ajoutez cette URL Streamable HTTP dans un client MCP compatible. Le serveur fournit la documentation publique et les schémas API ; aucune clé API marchand n’est requise.

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

Lire le guide de configuration

Consultez un prompt, copiez-le dans votre agent de programmation ou téléchargez un ensemble de documents adapté. Les prompts et le contrat API détaillé sont actuellement en anglais.

Langue du prompt : anglais

Voir le 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.

Utilisez OpenAPI pour les champs et les schémas, les guides pour les parcours et les vecteurs de signature pour l’interopérabilité. Conservez les identifiants dans votre environnement serveur.