Skip to main content
POST
/
api
/
v1
/
cards
/
{serial}
/
block
curl -X POST "https://olive-gateway-a6ba.onrender.com/api/v1/cards/OLIV0001/block" \
  -H "Authorization: Bearer olive_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Lost card - customer reported",
    "pin": "1234"
  }'
{
  "success": true,
  "message": "Card blocked successfully",
  "card": {
    "serial": "OLIV0001",
    "status": "BLOCKED",
    "blocked_at": "2025-01-20T14:45:00Z",
    "blocked_by": "admin@olive.sl",
    "block_reason": "Lost card - customer reported"
  }
}
Blocking a card prevents all transactions. Use for lost cards, suspected fraud, or at customer request.

Request

Authorization
string
required
Bearer olive_live_xxx or Bearer eyJ... (JWT)

Path Parameters

serial
string
required
Card serial number (e.g., OLIV0001)

Body Parameters

reason
string
required
Reason for blocking (logged for audit)
pin
string
Subscriber’s PIN (required for self-service blocking)

Response

success
boolean
Whether block succeeded
message
string
Result message

Examples

curl -X POST "https://olive-gateway-a6ba.onrender.com/api/v1/cards/OLIV0001/block" \
  -H "Authorization: Bearer olive_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Lost card - customer reported",
    "pin": "1234"
  }'
{
  "success": true,
  "message": "Card blocked successfully",
  "card": {
    "serial": "OLIV0001",
    "status": "BLOCKED",
    "blocked_at": "2025-01-20T14:45:00Z",
    "blocked_by": "admin@olive.sl",
    "block_reason": "Lost card - customer reported"
  }
}

Block Reasons

ReasonDescriptionReversible
LostCustomer lost cardNo (issue new card)
StolenCard reported stolenNo
FraudSuspected fraudYes (after investigation)
RequestCustomer requestedYes
DamagedPhysical damageNo (issue new card)

Effects

Transactions Blocked

  • POS payments rejected
  • NFC tap disabled
  • PIN verification fails

Child Cards

  • If parent blocked, child cards still work
  • Block child cards separately if needed

Errors

StatusCodeDescription
400MISSING_REASONReason is required
400INVALID_PINPIN verification failed
401UNAUTHORIZEDInvalid API key
404CARD_NOT_FOUNDCard serial not found
409ALREADY_BLOCKEDCard already blocked
500INTERNAL_ERRORServer error

Unblock Card

Restore a blocked card