Migration
Corp API v1 → OnPremise API v2
Data migration schema and integration changes
Overview
Users and cards have been migrated automatically. Re-registration and card re-issuance are not required.
- Users with cards:
external_user_idremains the same (token fromexternal_key) - Users without cards: migrated with
external_user_id= UUID from the old database - Cards with undetermined status (not active/frozen/closed) are skipped and require manual review
What stayed the same
| Description | |
|---|---|
| User ID | Token from external_key (e.g. LIAjeeoSKRR2LSULK90XiSs) → now field external_user_id, same value |
| Card number | Last 4 digits (label) — unchanged |
| Cards | Migrated with preserved statuses (active, frozen, closed). Cards with undetermined status were skipped |
What changed
Authentication
| Before | After |
|---|---|
partner_id + secret in request body | API-KEY header + payload encryption via SAYFER_WEB |
| No encryption (plain JSON) | All requests and responses are encrypted |
| No timestamp | request_timestamp required (microseconds, ±30 sec window) |
You will receive:
API_KEY, API_SECRET, and the sayfer_web library. Card IDs
| Before | After |
|---|---|
UUID (a22aa137-51fd-5f4c-...) | ObjectId (69bd4ab7ead3bd5ffc0d18cd) |
After migration, retrieve new
card_id values via cards/find. Match by external_user_id + label (last 4 digits). Card status
| Before | After |
|---|---|
is_active: true / is_frozen: true / is_closed: true | status: "active" / "frozen" / "closed" |
Single string field instead of three booleans.
Balance
| Before | After |
|---|---|
| Included in card response | Separate endpoint POST /api/v2/cards/balance |
Idempotency
Card creation and topup now require an Idempotency-Key header (prevents duplicate operations on retries, key valid for 7 days).
Card products
Card types have been migrated under new codes (product_code). Full list with pricing and limits: POST /api/v2/cards/products.
Endpoint mapping
| Action | Old API | New API |
|---|---|---|
| Get user | — | POST /api/v2/users/get |
| List users | — | POST /api/v2/users/find |
| Create user | — | POST /api/v2/users/create |
| List cards | GET /api/v1/cards/list | POST /api/v2/cards/find |
| Card details | GET /api/v1/cards/{id} | POST /api/v2/cards/get |
| Card balance | (in card response) | POST /api/v2/cards/balance |
| Card data (PAN, CVV) | — | POST /api/v2/cards/details |
| Topup | POST /api/v1/cards/topup | POST /api/v2/cards/topup |
| Freeze | POST /api/v1/cards/freeze | POST /api/v2/cards/freeze |
| Unfreeze | POST /api/v1/cards/unfreeze | POST /api/v2/cards/unfreeze |
| Transactions | — | POST /api/v2/cards/txs |
| Issue card | POST /api/v1/cards/create | POST /api/v2/cards/create |
| Products | — | POST /api/v2/cards/products |
What is NOT migrated
| Data | Reason |
|---|---|
| Transaction history | Remains in the old database; new system writes transactions from scratch |
| Balances | Fetched live from the provider |
| TRON deposit addresses | Old addresses are not transferred. Deposit address is tied to the project, not the user |