Skip to main content
Whether you are an exchange, a wallet or a platform, once DCS has issued you a key pair you can call every DeCard-Managed API with a single, uniform signing rule. This page gets authentication working in one pass. As a licensed issuer with its own BINs, DCS requires a verifiable request origin and replay protection on every API call.
Naming note: this documentation set covers the DeCard-Managed integration model, previously called the standard-authorization model. In this model DCS maintains a dedicated fiat / digital-asset account and balance for each user, and no on-chain collateral is involved.

What is in this group

Integration Resources brings together every technical asset and security credential you need, from integration development through to production go-live:

1. Credentials and Request Headers

What DCS gives you

The apiKey is a globally unique identifier that supports identification and analytics. To stop anyone else from issuing requests under your apiKey, it must be paired with the secretKey: you generate a signature according to the agreed rules and submit it alongside the request for DCS to verify. DCS delivers this key pair to you privately, and every API call a partner makes must follow the agreed signing protocol.
For sandbox apiKey/secretKey, contact the DCS team. Production credentials must be obtained through Secure Retrieval of Production Credentials.

Headers required on every request

Every API call from a partner must carry the following HTTP headers:
the secretKey is used only to compute the signature locally. Never transmit it in a request header.
Typical response when Content-Type: application/json is missing:
This success=false comes from the framework-level error response triggered by the missing Content-Type; it does not mean that every business response reliably includes success. In normal integration, always decide success or failure from code and do not depend on the success field.

2. Request Signing (HMAC-SHA256)

Signing rule

Sign the concatenated string using the HmacSHA256 algorithm with the secretKey as the key:
The output is a lowercase hexadecimal string. The segments of the concatenated string:
The signing algorithm is fixed to HmacSHA256. Always use this algorithm.

Replay protection (DCS verifies, the partner generates)

  • TIMESTAMP: must be a 13-digit millisecond timestamp (for example Date.now(), not a 10-digit second timestamp). A malformed value returns DAPI_TIMESTAMP_FORMAT_ERROR. DCS only accepts requests within a 5-second validity window; beyond that it returns DAPI_TIMESTAMP_EXPIRED, so regenerate the timestamp from the current time, recompute the signature, and keep your local clock in sync.
  • NONCE: generate a fresh random number in [10000, 99999] for every request so that each request is valid only once. Do not reuse nonces.
If authentication fails, check the timestamp, the nonce and the string you signed first. For exact error codes, rely on what the API actually returns and on the dictionary DCS provides for this product.

Signing examples

JavaScript (Postman pre-request script)
Java

Full request example (GET)

In this example payload = externalUserId=<externalUserId>&cardId=<cardId>, the GET query string. To validate your implementation before go-live, take the same apiKey/timestamp/nonce/payload set that DCS provides and confirm you reproduce the identical X-DAPI-SIGN.
Every externalUserId, apiKey, X-DAPI-SIGN, TIMESTAMP and NONCE in the examples is a placeholder and must not be treated as a real value. The DeCard-Managed model handles a large volume of end-user personal data, so debug logs must not record real credentials or PII either.

Common response envelope

Every API returns the same envelope:
Treat code == "SYS_SUCCESS" as the sole success condition. The response envelope does not include a success boolean, so do not depend on that field.

3. Secure Retrieval of Production Credentials

To keep production apiKey/secretKey from leaking in transit, production credentials are never sent to you directly. They are collected through a one-time secure retrieval flow.
The sandbox environment does not need this flow; simply contact the DCS team.

The flow (and who does what)

  1. The partner provides: one secure email address plus one source IP for retrieval.
    • The email address receives the retrieval instructions; the IP is added to the credential-retrieval whitelist.
  2. DCS sends: an email to that secure address containing a temporary secure link that is valid for one use only.
  3. The partner retrieves: concatenate extractUrl with extractSecretKey and run it from the machine at the registered IP to receive the apiKey/secretKey.

Fields in the email

Success response
Failure response
Only the failure envelope is shown here. For exact error codes, rely on what the API actually returns and on the dictionary DCS provides for this product; this version does not reuse error-code tables from other products.
If retrieval fails: the link may already have been used inside its validity window, which means the credentials could be compromised. Contact your DCS business contact immediately and repeat the email flow to have them reissued.The retrieval IP does not have to be the same as your day-to-day API calling IP; declare each purpose to DCS separately. For how to submit them, see IP Whitelisting.

With authentication working, go to Quickstart to issue your first card, or start from First Steps to confirm that your account and callbacks are ready. The remaining technical assets in Integration Resources: