Freeze Card
Freezes an active virtual card. Once frozen the card cannot be used for any payment/authorization until you unfreeze it.
- The freeze is recorded as a user-initiated freeze and can be reversed by the Unfreeze Card endpoint.
- Only cards owned by the current
AppIDaccount and of a virtual card type are accepted. - No money moves — freezing/unfreezing has no fee and does not touch the card balance or your wallet.
- A successful freeze also emits a
card.status_changedwebhook (active → frozen).
Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /api/v1/openapi/card/freeze |
| Auth | HMAC |
| Idempotency | Not required |
No Idempotency-Key needed
Freeze is protected by the card state machine: retrying on an already-frozen card returns 40000 card_already_frozen rather than double-applying. There is no monetary effect to protect against, so no Idempotency-Key header is required.
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
card_id | string | ✅ | card_<id> — must belong to your account and be a virtual card |
reason | string | optional | Free-text reason recorded with the freeze. At most 500 characters are kept — longer text is truncated before the provider is called |
Example Request
json
{
"card_id": "card_12345",
"reason": "suspected fraud on merchant side"
}Response Fields
| Field | Type | Description |
|---|---|---|
card_id | string | Echo of the card ID |
status | int | Card status after the operation — always 6 (frozen) on success |
status_desc | string | English status description — frozen |
success | bool | true on success |
Example Response
json
{
"code": 0,
"message": "Success",
"data": {
"card_id": "card_12345",
"status": 6,
"status_desc": "frozen",
"success": true
}
}Preconditions & Rules
- Ownership —
card_idmust belong to the authenticated account, else404 card_not_found(no distinction from "not found", to prevent enumeration). - Card type — only virtual cards (
virtual_l/virtual_p/virtual_v/virtual_r/virtual_g/virtual_a/virtual_s921) may be operated via OpenAPI. - State — only
status=2 (active)cards may be frozen. An already-frozencard returnscard_already_frozen; apending/failed/closing/closedcard returnscard_status_cannot_freeze.
Common Errors
Business errors come back with HTTP 200 and a non-zero code — always check code (0 = success) and branch on error_key, never on the localized message.
| HTTP | code | error_key | Description |
|---|---|---|---|
| 200 | 40001 | validation_failed | Request body cannot be parsed |
| 200 | 40000 | openapi_invalid_card_id | card_id missing or malformed (expected card_<number>) |
| 200 | 40000 | openapi_card_type_not_supported | Card is not a virtual card type |
| 200 | 40000 | card_already_frozen | Card is already frozen — treat as "already in the desired state" (before v1.5 this case returned card_status_cannot_freeze) |
| 200 | 40000 | card_status_cannot_freeze | Card is not active (pending / failed / closing / closed); cannot be frozen |
| 200 | 40000 | operation_not_supported | This provider / card type does not support freeze |
| 200 | 40000 | card_type_mismatch | Card-type data inconsistency (platform side) |
| 401 | 40100 | openapi_invalid_credentials | Auth failure |
| 404 | 40400 | card_not_found | Card not found / not owned |
| 429 | 42900 | too_many_requests | Rate limited — honor Retry-After |
| 200 | 50000 | openapi_freeze_card_failed | Server error or provider call failed — check /card/info before retrying |
Notes
- After a successful freeze,
/card/inforeportsstatus=6, and acard.status_changedwebhook (from_status: "active",to_status: "frozen") is delivered. - To reverse, call Unfreeze Card. Only user-initiated freezes (this endpoint) are reversible by you; freezes applied by risk control / admin / the system are not.
- Freezes applied by the platform (admin, risk control, system) or pushed by the card provider are also notified via
card.status_changed— subscribe to it to keep your card state in sync.
Integration pitfalls & best practices
Read before integrating
These are the failure modes most likely to leave your system's card-state / bookkeeping out of sync with reality.
- Synchronous, provider-bound call — allow up to ~60 s. Freeze calls the upstream card provider inline. Latency is usually a few seconds but can reach 10–15 s, and the server permits up to 60 s. Set your HTTP client timeout to ≥ 60 s for this endpoint. A short timeout (10–30 s) invites the next problem.
- A client-side timeout does NOT mean the freeze failed. If your client times out (or the connection drops) after the provider already froze the card, you get an error but the card is frozen. Never record a timeout as "not frozen". On any timeout / network error, reconcile via
/card/info(or wait forcard.status_changed):status=6→ freeze succeeded (proceed);status=2→ not applied (safe to retry). - The response is the primary signal;
card.status_changedconfirms it. Since v1.5 every successful freeze also emits acard.status_changedwebhook after the change is committed (before v1.5 freeze/unfreeze produced no webhook). Use the synchronous response for the immediate result and the webhook for reconciliation — deduplicate onWebhook-Idas for every webhook. - No
Idempotency-Key, but safe to retry. Retries are not deduplicated (each one hits the provider), but the card state machine protects you: re-freezing an already-frozen card returns40000 card_already_frozen. Treatcard_already_frozenas "already in the desired state", not a hard error. Prefer the reconcile-via-/card/infopattern over blind retry loops. - Freeze only blocks new payments. It does not reverse authorizations already approved before the freeze, and moves no money (no fee, balance untouched).