Card Status Change
Goal: freeze or unfreeze cards and confirm the new provider status.
Review the encrypted request rules in Overview before starting.
Workflow steps
Freeze or unfreeze
Provide
card_idandexternal_user_id.Track order and card status
Poll order status and then verify the card state.
API Endpoints
- POST
/api/v1/cards/freezeFreeze an active card. - POST
/api/v1/cards/unfreezeUnfreeze a frozen card. - POST
/api/v1/orders/checkTrack the status change order. - POST
/api/v1/cards/getConfirm the updated card status.
Schemas
OrderBase
| Field | Type | Required | Description |
|---|---|---|---|
order_id | string | Required | Order identifier. |
order_type | string | Required | Order type (card_issue, card_topup, etc.). |
status | string | Required | Overall order status. Enum: new, activating, processing, completed, failed |
card_id | string | Optional | Related card identifier, if applicable. |
balance_before | string | Optional | Project balance before this order (decimal string). |
balance_after | string | Optional | Project balance after this order (decimal string). |
last_error | string | Optional | Last error message when status is failed. |
last_error_slug | string | Optional | Machine-readable error code. |
data | object | Required | Order-specific data payload. |
created_at | string | Required | Order creation time (ISO 8601). |
completed_at | string | Optional | Completion time (ISO 8601). |
failed_at | string | Optional | Failure time (ISO 8601). |
CardStatus
| Field | Type | Required | Description |
|---|---|---|---|
card_id | string | Required | Card identifier. |
status | string | Required | Current card status. Enum: pending_order, paid, pending_activation, wait_for_topup_activation_by_user, active, frozen, closed |
Error table
These error slugs are common when changing card status.
| Error Slug | Description |
|---|---|
external_user_id_required | external_user_id is required. |
invalid_card_id | Card identifier is invalid. |
card_not_found | Card not found. |
cardholder_not_found | Cardholder not found. |
card_issue_not_completed | Card issue order is not completed yet. |
invalid_card_status | Card status does not allow the requested action. |
provider_invalid_card_status | Provider reported an unexpected status. |
provider_error | Provider-specific failure. |