📄 Guide
Under the DeCard-Managed model, the user comes before the card: an end user must register first to obtain anexternalUserId, which then identifies that user across every subsequent endpoint — KYC, card issuance, top-ups, spending, balance queries, and so on. As a licensed issuer with its own BINs, DCS creates a dedicated account for each cardholder, and registration is completed with a phone number or email address plus a one-time passcode (OTP).
Registration is a two-step flow: request the verification code, then register with it.
behavioral=REGISTER marks this code request as a registration scenario (see step 1 for the field description).
DCS creates a dedicated account for each cardholder, with its own available and frozen balances. For account status and asset management, see Managing Users; this is the entry point to the DeCard-Managed, dedicated-account model.
Prerequisites
- Your Enterprise account is active and you hold your
ApiKey/SecretKey. If you do not have them yet, see First Steps and the authentication guide. - Every request must carry the signature headers described in the authentication guide. The examples on this page omit those headers and show business fields only.
Step 1 · Send the verification code
Call one of the two code-sending endpoints, depending on the registration method. For both endpoints the only required field isbehavioral, and for registration it is always REGISTER.
Sending an SMS code
Sending an email code
A successful response from a code-sending endpoint (the envelope is the site-wide
{code, message, messageDetail, data}, with no success boolean; the success code is code = SYS_SUCCESS):
messageDetailis a display-oriented structure (message/title/type/icon/action/linkTitle/linkUrl) and is usuallynull. The envelope is documented in full in the authentication guide.
Step 2 · Register the user
Call the registration endpoint with the verification code received in step 1. Note that theregister endpoint does not take behavioral — that field belongs to the code-sending endpoints only, so do not mix them.
Either/or rule: phone registration usesThemobileCode + mobile + smsCode; email registration usesemail + emailCode. Send eithersmsCodeoremailCode, matching the registration method you chose.
data field of a successful response is the externalUserId generated by the system, which identifies the user in every subsequent endpoint:
Encrypting the phone number or email address (optional)
Themobile and email fields can be sent AES-encrypted or in plaintext; choose whichever suits your integration. To send them encrypted:
- Encrypt the plaintext phone number or email address with AES (symmetric encryption) to get the encrypted byte array.
- Base64-encode the result into a string.
- Put that Base64 string in the
mobileoremailfield of the request.
The phone number, email address and key in the example are placeholders or masked values. Never put real end-user PII or real keys into requests or logs.
Error handling and resends
- Judging success: use
code == SYS_SUCCESSin the response envelope to decide whether the request was accepted; for any other value, readmessageandmessageDetailto find out why. - Typical error response: on failure,
codecarries the specific business error code for that failure (there is no generic failure code), and the specific reason appears inmessage. When the verification code has expired or was entered incorrectly, the response looks roughly like this (the envelope is unchanged):The
codeandmessageabove are illustrative placeholders; the actual values returned by the endpoint take precedence. The envelope is always{code, message, messageDetail, data}, with the error text inmessage. - Expired or mistyped code: verification codes are time-limited, and an expired or wrong code makes
registerfail. Call the matching code-sending endpoint again (behavioral=REGISTER) for a fresh code, then retry. - Consistent method: the registration method must match the way the code was sent. A code sent by SMS can only be used for phone registration (
smsCode), and the same applies to email (emailCode). - Idempotency: registering the same phone number or email address twice fails. If you are unsure whether a user already exists, query their status from Managing Users.
Next steps
- Once registration returns an
externalUserId, the usual next step is completing KYC for that user; see Compliance · Overview. - To manage account status and review a user’s assets, see Managing Users.
- To walk the shortest path from registration to card issuance, funding and spending in one pass, see Quickstart.

