---
title: "Simulate Blocking a Card"
source_url: https://docs.rapyd.net/en/simulate-blocking-a-card.html
lang: en
---

# Simulate Blocking a Card

Simulate a third-party stop notice for an issued card.

Relevant to the sandbox.

Rapyd sets the card status to **BLO** (blocked) and sends you the [Card Issuing Blocked Webhook](https://docs.rapyd.net/en/card-issuing-blocked-webhook.md "Card Issuing Blocked Webhook").

To unblock the card, see [Update Card Status](https://docs.rapyd.net/en/update-card-status.md "Update Card Status").

> **Note:**
>
> - The code samples include successful requests (200) and bad requests (400).
>
>   - For error messages that appear due to bad requests (400), see:
>
>     - [General Errors](https://docs.rapyd.net/en/general-errors.md "General Errors")
>     - [Issued Card Errors](https://docs.rapyd.net/en/issued-card-errors.md "Issued Card Errors")
>   - For information about unauthorized request (401) and other authentication errors, see [Troubleshooting Authentication and Authorization Errors](https://docs.rapyd.net/en/troubleshooting-authentication-and-authorization-errors.md "Troubleshooting Authentication and Authorization Errors").

**Prerequisites:**

- [Issue Card](https://docs.rapyd.net/en/issue-card.md "Issue Card")
- [Activate Issued Card Using API](https://docs.rapyd.net/en/activate-issued-card-using-api.md "Activate Issued Card Using API")

### Parameters

### Request Body Parameters

- - blocked_reason
  - Reason for blocking the card.
- - card_id
  - ID of the card. String starting with **card_**.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - idempotency
  - A unique key that prevents the platform from creating the same object twice.

    See [Idempotency](https://docs.rapyd.net/en/idempotency.md "Idempotency").
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- - activated_at
  - Time that the card was activated, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - assigned_at
  - Time that the card was assigned to a cardholder, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - bin
  - [Bank Identifier Number](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_bin "Bank Identification Number") for the institution issuing the card.
- - blocked_reason
  - Reason for blocking the card. One of the following:

    - **blocked_reversible**
    - **canceled**
    - **compliance**
    - **locked_incorrect_pin**
    - **migrated**
    - **none**
    - **other**
    - **reissued**
    - **suspected_fraud**

    none
- - blocked_reason_code
  - Three letter code for the reason for blocking the card. One of the following values:

    - **CAN** - Canceled
    - **COM** - Compliance
    - **LOC** - Locked due to incorrect PIN
    - **LOS** - Lost
    - **MIG** - Migrated
    - **OTH** - Other
    - **REI** - Reissued
    - **SFR** - Suspected fraud
    - **STO** - Stolen
- - card_id
  - ID of the card. String starting with **card_**.
- - card_number
  - Actual card number.
- - card_program
  - ID of the card program that the card is issued from. String starting with **cardprog_**.
- - card_status_initiator
  - The initiator that asked for the card status update. One of the following three letter codes:

    - **CAH** - Cardholder
    - **COM** -Compliance operation
    - **DET** - Detect
    - **IGW** - Issuing gateway
    - **ISM** - Issuing merchant
    - **RSK** - Risk operation
    - **PRO** - Protect
- - card_tracking_id
  - Reserved.
- - country_iso_alpha_2
  - The country where the card is issued. Two-letter ISO 3166-1 ALPHA-2 code.
- - created_at
  - Time of creation of the issued card object, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - cvv
  - Card security code.
- - expiration_month
  - Expiration month of the card. Two digits. Relevant when the card issuer supports it for the country.
- - expiration_year
  - Expiration year of the card. Two digits. Relevant when the card issuer supports it for the country.
- - ewallet_contact
  - Describes the wallet contact that the card is assigned to. String starting with **cont_**. For details about the fields in the 'contact' object, see [Add Contact to Wallet](https://docs.rapyd.net/en/add-contact-to-wallet.md "Add Contact to Wallet").
- - id
  - ID of the issued card object. String starting with **ci_**.
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - public_details
  - Status of the card. One of the following:

    - `bin` - Bank ID number (BIN).
    - `last4` - Last 4 digits of the card.
    - `sub_bin` - Sub-BIN.
    - `expiration` - Expiration date as 4 digits.

    Relevant to [Issue Card](https://docs.rapyd.net/en/issue-card.md "Issue Card") and [List Issued Cards](https://docs.rapyd.net/en/list-issued-cards.md "List Issued Cards").
- - status
  - Status of the card. One of the following:

    - **ACT** - Active.
    - **BLO** - Blocked.
    - **IMP** - Imported in bulk, but not yet personalized.
    - **INA** - Inactive.
- - sub_bin
  - Two-digit code.

- /v1/issuing/cards/simulate_block

- Block Card
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/issuing/cards/simulate_block' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "card_id": "card_bca4712d954a8a1d8673e3eab5db4afd",
      "blocked_reason": "canceled"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "fc16597a-c3db-4e6f-a873-dfa7576aeed4"
      },
      "data": {
          "id": "ci_95844411d26acdce273bcdd2fab28fe0",
          "ewallet_contact": {
              "id": "cont_cb60ec28c2f0bdfc621cfc21270c20ce",
              "first_name": "John",
              "last_name": "Doe",
              "middle_name": "",
              "second_last_name": "",
              "gender": "not_applicable",
              "marital_status": "not_applicable",
              "house_type": "",
              "contact_type": "personal",
              "phone_number": "+14155551237",
              "email": "",
              "identification_type": "",
              "identification_number": "",
              "issued_card_data": {
                  "preferred_name": "",
                  "transaction_permissions": "",
                  "role_in_company": ""
              },
              "date_of_birth": "2000-12-15",
              "country": "NG",
              "nationality": null,
              "address": {
                  "id": "address_8dc883799f2fcb5adb92bf77b6bc85b7",
                  "name": "John Doe",
                  "line_1": "123 Main Street",
                  "line_2": "",
                  "line_3": "",
                  "city": "Anytown",
                  "state": "",
                  "country": "",
                  "zip": "",
                  "phone_number": "",
                  "metadata": {},
                  "canton": "",
                  "district": "",
                  "created_at": 1755679320
              },
              "ewallet": "ewallet_3801e782955b29955445586a2405a5db",
              "created_at": 1612104554,
              "metadata": {},
              "business_details": null,
              "compliance_profile": 0,
              "verification_status": "not verified",
              "send_notifications": false,
              "mothers_name": ""
          },
          "status": "BLO",
          "card_id": "card_bca4712d954a8a1d8673e3eab5db4afd",
          "assigned_at": 1763996148,
          "activated_at": 1763996177,
          "metadata": {},
          "country_iso_alpha_2": "BR",
          "created_at": 1763996149,
          "blocked_reason": "canceled",
          "card_tracking_id": null,
          "card_program": "cardprog_b027c85a66ebebb2e094bca626d5ae97",
          "public_details": {
              "bin": "517413",
              "last4": "3157",
              "sub_bin": "76",
              "expiration": "1128"
          },
          "card_number": "5174137762773157",
          "cvv": "339",
          "expiration_month": "11",
          "expiration_year": "28",
          "bin": "517413",
          "sub_bin": "76"
      }
  }
  ```

- Bad Request - Card Already Blocked
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/issuing/cards/simulate_block' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "card_id": "card_0393b8437d759c5fb491d427b0000322",
      "blocked_reason": "canceled"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "INVALID_ISSUED_CARD_CHANGE_STATUS",
          "status": "ERROR",
          "message": "The request tried to change the status of a card, but the card was not active or the card is already in the indicated status. The request was rejected. Corrective action: To change the status from 'ACT' (active) to 'BLO' (blocked), set 'status' to 'block'. To change the status from 'BLO' (blocked) to 'ACT' (active), set 'status' to 'unblock'.",
          "response_code": "INVALID_ISSUED_CARD_CHANGE_STATUS",
          "operation_id": "0d0f7842-4385-4a76-b369-2d6b16e2ccdd"
      }
  }
  ```

- Bad Request - Card Not Found
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/issuing/cards/simulate_block' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "card_id": "card_0393b8437d759c5fb491d427b000032",
      "blocked_reason": "canceled"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_CARD_NOT_FOUND",
          "status": "ERROR",
          "message": "The request attempted to retrieve data on a non-existent card or a card that is not linked to your account. The request was rejected. Corrective action: Check the card token and rerun the request with the correct card details.",
          "response_code": "ERROR_CARD_NOT_FOUND",
          "operation_id": "bd732710-fab3-41c2-98f5-bed176e55d9b"
      }
  }
  ```
