Ir al contenido
CoinsSendDesarrolladores
Documentación de Payments

CoinsSend API Examples

Ver MarkdownConfigurar agente

Esta página aún no está disponible en tu idioma.

These examples implement the verified public contract from openapi.json.

  1. Build the request object using strings for monetary values.
  2. Encode it with the PHP-compatible canonical JSON rules documented in Authentication.
  3. Sign base64(canonical_body).
  4. Send the same canonical string as the HTTP request body.
  5. Use legacy MD5 only when no timestamp header is sent.
  6. For withdrawals, send Timestamp and use timestamped HMAC-SHA256.

Run client implementations against signature-test-vectors.json. Keep merchant API keys in backend secrets; none of these examples belongs in browser code.

The public API does not accept a general Idempotency-Key request header. Invoice order_id uniqueness rejects a duplicate with 409, but does not replay the first response. Withdrawals and static-wallet creation must not be blindly retried after an unknown outcome. Provider-card creation only reuses an already-active order.

Error bodies are not universal: authentication errors return {"error":"..."}; endpoint errors normally return status and message; validation returns errors, status, and message.