Before you start
Before Step 1, make sure these 4 items are ready (see First Steps):- API Key / Secret Key issued.
- Egress IP provided to DCS (the API uses an IP allowlist).
- Webhook callback URL configured: the results of card issuance, deposits and purchases all arrive by Webhook.
- Request signing working: every request carries
X-DAPI-API-KEY/X-DAPI-TIMESTAMP/X-DAPI-NONCE/X-DAPI-SIGN; see the Authentication Guide.
The sandbox base URL ishttps://api.thedecard-sandbox.com(production:https://api.thedecard.com). The examples below omit the authentication headers, and all sample values are masked placeholders. Every response has the shape{code, message, messageDetail, data}, andcode = SYS_SUCCESSmeans success. Each step below lists only the fields you need fromdata.
📄 Guide
Steps at a glance
1. Sign-up
Step 1: Send the SMS code
Send a registration code to the cardholder’s mobile number.data is an empty string; the code is sent to the cardholder’s phone by SMS.
Notes:
- Set
behavioraltoREGISTER; a new user has noexternalUserIdyet, so leave it empty. mobileCodeis the country code (ISO 2-letter, such asSG);mobilehas no dialing prefix.
Step 2: Register the user
Complete registration with the code the cardholder received.data is the externalUserId (for example "4dc3e854-xxxx-xxxx-xxxx-91a98b3d832c"). Every later endpoint identifies the user by it, so store it.
Notes:
mobileCode,mobileandsmsCodemust all be provided.- You can also register by email (
email+emailCode), but not together with a mobile number; see User Sign-up.
2. Card issuance
Step 3: Get the card-application guidance link
KYC and card application both happen on the DCS-hosted page; the cardholder’s documents and selfie go straight to DCS and never pass through your backend.data is a one-time hosted-page link; have the cardholder open it in a browser.
Notes:
- The link is valid for 5 minutes. Generate it and redirect immediately while the cardholder is online; do not send it asynchronously, for example by email.
- If the user’s KYC is already
PASSorPENDING, the call returnsOPERATION_UNSUPPORTEDand cannot be repeated.
Step 4: Receive the card-application result
Once the cardholder submits on the hosted page, DCS pushes the result to you as the WebhookCARD_APPLY.
Key response (inside data):
Notes:
- Return a
2xxwithin 2 seconds of receiving the Webhook; store it first and process it asynchronously, or it will be treated as a timeout and redelivered. - When
status = PENDINGandneedExtraInfo = true, the cardholder must upload extra documents; see below.
applyId and hand it to the cardholder; once they finish, DCS pushes CARD_APPLY again.
3. Card management
Step 5: Query card detail
cardStatus (NORMAL / FROZEN / BLOCKED / CANCELLED), cardNo (masked card number), physicalCardStatus (physical card status).
Notes:
cardIdis optional; without it, all of the user’s cards are returned.BLOCKEDis an issuer-side block the cardholder cannot lift themselves; the reason is instatusReason. See Managing Cards.
Step 6: Show card details
The full card number, CVV and expiry are never returned to your backend through the API; the cardholder views them directly on the DCS-hosted page.data is a one-time hosted-page link for the cardholder to open.
Notes: cardId is required.
Step 7: Freeze / unfreeze
data is a boolean; true means the operation succeeded.
Notes: block = true freezes and false unfreezes. Unfreezing also needs smsCode or emailCode; send the code first with the Step 1 endpoint using behavioral = CARD_UNFROZEN.
Physical card and PIN (optional): these also use POST /redirect/v2/guidance-link, with the same request body as Step 6 and only action changed.
See Issuing Cards and Managing a Card’s PIN.
4. Deposits and simulated purchases
Step 8: Get the deposit address
address (the deposit address) and status (PENDING being allocated / SUCCESS allocated / FAILED allocation failed).
Notes:
- On first request the address may still be allocating (
PENDING); poll untilSUCCESSbefore using it. - The sandbox supports only
TRON+USDTandEthereum+USDC; for the chains and tokens supported in production, see Crypto Deposit.
Step 9: Deposit
In the sandbox, a simulator endpoint fakes an on-chain arrival; in production the cardholder transfers on-chain to the address from Step 8.data.txHash (the hash of the simulated arrival). Once credited, the Webhook ORDER_STATUS is pushed (transStatus = SUCCESS).
Notes: to show the cardholder their balance, use GET /user-asset/v1/balance; see User Balance.
Step 10: Purchase
In the sandbox, a simulator endpoint starts a card authorization; in production it is triggered by the cardholder spending with the card.data.approved (whether it was approved). Every purchase pushes the Webhook CARD_TRANSACTION: response = A means approved and D declined, with the decline reason in rejectReason.
Notes: authType can also be REFUND (return) or REVERSAL (reversal); see Simulating Transactions.
5. Queries and reconciliation
Step 11: Query deposit records
debitCreditIndcator (C credit / D debit), transactionAmount, and transferDetails (on-chain deposit details, including txHash).
Step 12: Query statements
statementId (needed in Step 13) and statementDateStart / statementDateEnd (the billing period).
Step 13: Query statement detail
transactionType (R purchase / C cash / P repayment / Q memo), debitCreditIndcator (debit or credit), and postIndicator (1 posted / 0 not posted).
For the full fields and pagination rules, see Managing Transactions · Overview.
Your first card is now issued, funded and has completed a purchase, and you can query the matching deposit records and statements.
Next steps
- Full KYC flow and state machine → Compliance
- All guidance-page actions and parameters → H5 KYC / Card Onboarding Guidance Page
- The full card lifecycle (physical cards, replacement, PIN) → Managing Cards
- Crypto deposits → Crypto Deposit
- Every simulated transaction type in the sandbox → Simulating Transactions
- Signing and authentication → Authentication Guide
- Data structures of every push event → Webhook & WebSocket

