Update Card Status
Block or unblock a card that was issued via the Rapyd issuing platform.
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.
Prerequisite:
For a card that was issued via the API, you must activate it. See Activate Issued Card Using API.
For a card that was issued in bulk, you must personalize it. See Personalize Bulk-Issued Card.
Note
Clients with PCI certification can handle personal identifying information for cards, such as card number.
blocked_reason
Reason for blocking the card. Relevant when the value of
status
is block.
card
The card token, which is a string starting with 'card_. If the client is PCI-certified, you can use the actual card number.
status
Status of the card. One of the following values:
block
unblock
Code Samples
.NET
using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { var requestObj = new { card = "card_f8dd3aa099444e1c80cc5a06de38b165", status = "block", }; string request = JsonSerializer.Serialize(requestObj); string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/issuing/cards/status", request); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('../../../../Utilities/JS/utilities').makeRequest; async function main() { try { const body = { card: 'card_f8dd3aa099444e1c80cc5a06de38b165', status: 'block' }; const result = await makeRequest('POST', '/v1/issuing/cards/status', body); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/code_race_2020/Utilities/PHP/utilities.php"; include($path); $body = [ "card" => "card_f8dd3aa099444e1c80cc5a06de38b165", "status" => "block" ]; try { $object = make_request('post', '/v1/issuing/cards/status', $body); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request card = { "card": "card_f8dd3aa099444e1c80cc5a06de38b165", "status": "block" } results = make_request(method='post', path=f'/v1/issuing/cards/status', body=card) pprint(results)
/v1/issuing/cards/status
Update Card Status by Card ID
curl -X post https://sandboxapi.rapyd.net/v1/issuing/cards/status -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' -d '{ "card": "card_f8dd3aa099444e1c80cc5a06de38b165", "status": "unblock" } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "65e9a6d5-e1a7-4280-a5de-43512140a15d" }, "data": { "id": "ci_e2730f4fdfbffbf9d8b8713773093d4e", "ewallet_contact": { "id": "cont_3625cb4fc18d005b12f9ccf0c466755e", "first_name": "John", "last_name": "Doe", "middle_name": "", "second_last_name": "", "gender": "not_applicable", "marital_status": "not_applicable", "house_type": "", "contact_type": "business", "phone_number": "+14155551234", "email": "johndoefourstar@rapyd.net", "identification_type": "PA", "identification_number": "1234567890", "date_of_birth": "2000-11-22", "country": "US", "nationality": "NL", "address": { "id": "address_9706af91b503c70a819605222afabc96", "name": "John Doe - Four Star Professional Services", "line_1": "123 Main Street", "line_2": "", "line_3": "", "city": "Anytown", "state": "NY", "country": "US", "zip": "12345", "phone_number": "+14155551234", "metadata": {}, "canton": "", "district": "", "created_at": 1608023967 }, "ewallet": "ewallet_053d64c44834e1d3057ecb68a34c6b6c", "created_at": 1608023967, "metadata": {}, "business_details": { "id": "busi_9d2952408ec5dec780f5b88a8fc174aa", "name": "Four Star Professional Services", "registration_number": "R24032020000", "entity_type": "company", "industry_category": "company", "industry_sub_category": "home services", "address": { "id": "address_977b39b4b725fadc9040e1ee1e5df795", "name": "John Doe - Four Star Professional Services", "line_1": "1234 Main Street", "line_2": "Suite 1200", "line_3": "", "city": "Anytown", "state": "NY", "country": "US", "zip": "10101", "phone_number": "14155557779", "metadata": { "merchant_defined": true }, "canton": "", "district": "", "created_at": 1608023967 }, "created_at": 1608023967, "annual_revenue": 0, "establishment_date": null, "legal_entity_type": null, "cnae_code": null }, "compliance_profile": 0, "verification_status": "not verified", "send_notifications": false, "mothers_name": "Jane Smith" }, "status": "ACT", "card_id": "card_f8dd3aa099444e1c80cc5a06de38b165", "assigned_at": 1608462707, "activated_at": 1608465913, "metadata": {}, "country_iso_alpha_2": "US", "created_at": 1608462707, "blocked_reason": "none", "card_program": null } }
Update Card Status by Card Number
curl -X post https://sandboxapi.rapyd.net/v1/issuing/cards/status -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' -d '{ "card": "5566790136231827", "status": "block" } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "8d386ada-b3f9-4a84-9ab6-8b51d84c4dc0" }, "data": { "id": "ci_e2730f4fdfbffbf9d8b8713773093d4e", "ewallet_contact": { "id": "cont_3625cb4fc18d005b12f9ccf0c466755e", "first_name": "John", "last_name": "Doe", "middle_name": "", "second_last_name": "", "gender": "not_applicable", "marital_status": "not_applicable", "house_type": "", "contact_type": "business", "phone_number": "+14155551234", "email": "johndoefourstar@rapyd.net", "identification_type": "PA", "identification_number": "1234567890", "date_of_birth": "2000-11-22", "country": "US", "nationality": "NL", "address": { "id": "address_9706af91b503c70a819605222afabc96", "name": "John Doe - Four Star Professional Services", "line_1": "123 Main Street", "line_2": "", "line_3": "", "city": "Anytown", "state": "NY", "country": "US", "zip": "12345", "phone_number": "+14155551234", "metadata": {}, "canton": "", "district": "", "created_at": 1608023967 }, "ewallet": "ewallet_053d64c44834e1d3057ecb68a34c6b6c", "created_at": 1608023967, "metadata": {}, "business_details": { "id": "busi_9d2952408ec5dec780f5b88a8fc174aa", "name": "Four Star Professional Services", "registration_number": "R24032020000", "entity_type": "company", "industry_category": "company", "industry_sub_category": "home services", "address": { "id": "address_977b39b4b725fadc9040e1ee1e5df795", "name": "John Doe - Four Star Professional Services", "line_1": "1234 Main Street", "line_2": "Suite 1200", "line_3": "", "city": "Anytown", "state": "NY", "country": "US", "zip": "10101", "phone_number": "14155557779", "metadata": { "merchant_defined": true }, "canton": "", "district": "", "created_at": 1608023967 }, "created_at": 1608023967, "annual_revenue": 0, "establishment_date": null, "legal_entity_type": null, "cnae_code": null }, "compliance_profile": 0, "verification_status": "not verified", "send_notifications": false, "mothers_name": "Jane Smith" }, "status": "BLO", "card_id": "card_f8dd3aa099444e1c80cc5a06de38b165", "assigned_at": 1608462707, "activated_at": 1608465913, "metadata": {}, "country_iso_alpha_2": "US", "created_at": 1608462707, "blocked_reason": "none", "card_program": null } }