Close Payment Card
The Close Payment Card endpoint permanently deactivates an active payment card associated with a customer's account. Once closed, the card cannot be used for any further transactions, effectively removing it from the card lifecycle. This operation is irreversible and should be used when a card is lost, stolen, compromised, or otherwise no longer needed.
Endpoint
POST /api/paymentCards/closePaymentCard
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint to permanently close a payment card when it is no longer needed, has been reported lost or stolen, or is suspected to be compromised. This endpoint supports closing Physical, Virtual, and Burner cards by their unique paymentCardId. Partners should call this endpoint as part of card lifecycle management workflows to maintain account security and prevent unauthorized transactions.
Request Body
The request body accepts paymentCardId as the minimum required field. Only the base paymentCardRequest schema is relevant for closing a card.
| Field | Type | Required | Description |
|---|---|---|---|
paymentCardId | string | Yes | The unique identifier of the payment card to close. Must be non-empty. |
{
"paymentCardId": "pcd_a1b2c3d4e5f6g7h8i9j0"
}Response
200 OK
A successful request returns a confirmation that the payment card has been closed. The card is immediately deactivated and cannot be used for transactions.
| Field | Type | Description |
|---|---|---|
message | string | Confirmation message indicating the payment card has been successfully closed. |
{
"message": "Payment card has been successfully closed."
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields, invalid paymentCardId format, or the card is already closed |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to close this card |
| 404 | Payment card not found for the given paymentCardId |
| 405 | HTTP method not allowed (endpoint only accepts POST) |
| 500 | Internal server error |
Common Mistakes
- Providing an empty or null
paymentCardId— this field is required and must be a non-empty string. - Attempting to close a card that is already closed or suspended — verify the card's current status before calling this endpoint.
- Using the wrong token scope — ensure the Bearer token corresponds to the account that owns the card being closed.
- Confusing
paymentCardIdwith a card number —paymentCardIdis the platform-assigned unique identifier, not the 16-digit card number.
Related Endpoints
POST /api/paymentCards/suspendPaymentCard— Temporarily suspend a payment card without permanently closing itPOST /api/paymentCards/activatePaymentCard— Activate a newly issued payment cardPOST /api/paymentCards/reIssuePaymentCard— Reissue a replacement card (e.g., for lost or damaged cards)GET /api/paymentCards/getPaymentCards— Retrieve all payment cards associated with a customer
Example
curl -X POST https://api.banking.netevia.dev/api/paymentCards/closePaymentCard \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paymentCardId": "pcd_a1b2c3d4e5f6g7h8i9j0"
}'