Close Payment Card
This endpoint permanently closes a payment card on the Netevia Banking platform. Once a card is closed, it can no longer be used for transactions and the action is irreversible. An optional notes field allows partners to record the reason for closure.
Endpoint
POST /netevia/paymentCard/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 when a cardholder requests cancellation of their payment card, when a card is reported lost or stolen and must be permanently deactivated, or as part of an account offboarding workflow. This endpoint applies to Physical, Virtual, and Burner card types. For temporary suspension rather than permanent closure, use the suspend card endpoint instead.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| paymentCardId | string | Yes | Unique identifier of the payment card to close. Minimum length: 1 character. |
| notes | string | No | Optional reason or notes for the closure. Maximum length: 600 characters. |
| last4 | string | No | Last 4 digits of the card number as an additional verification check. |
{
"paymentCardId": "pcard_a1b2c3d4e5f6g7h8i9j0",
"notes": "Customer requested card closure due to account upgrade.",
"last4": "4242"
}Response
200 OK
The response returns one of two schemas depending on the operation context:
BoardingResponse
| Field | Type | Description |
|---|---|---|
| profileId | integer (int32) | The profile ID associated with the closed card. |
| errors | string | null | Error message if the operation encountered issues; null on success. |
| success | boolean | Indicates whether the card was successfully closed. |
| changeLog | array | null | Array of change log entries recording the operations performed. |
ChangeLog entry
| Field | Type | Description |
|---|---|---|
| requestType | integer (int32) | Numeric code representing the type of banking request performed. |
| changes | string | null | Description of the changes applied in this log entry. |
{
"profileId": 10482,
"errors": null,
"success": true,
"changeLog": [
{
"requestType": 7,
"changes": "Payment card closed successfully."
}
]
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required paymentCardId field, or field fails minimum length validation |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to close the specified card |
| 404 | Payment card not found for the given paymentCardId |
| 500 | Internal server error |
Common Mistakes
- Omitting
paymentCardId— this is the only required field and the request will fail with a 400 if it is missing or empty. - Attempting to close a card that is already closed — check card status before calling this endpoint to avoid redundant requests.
- Confusing
paymentCardIdwith the card number —paymentCardIdis the platform-assigned identifier, not the 16-digit card number. - Providing an incorrect
last4value — while optional, if provided it must match the last 4 digits of the card on record.
Related Endpoints
POST /netevia/paymentCard/suspendPaymentCard— Temporarily suspend a payment card without permanently closing itPOST /netevia/paymentCard/activatePaymentCard— Activate a newly issued payment cardPOST /netevia/paymentCard/reissuePaymentCard— Reissue a replacement payment cardGET /netevia/paymentCard/getPaymentCards— Retrieve all payment cards associated with a customer profile
Example
curl -X POST https://api.banking.netevia.dev/netevia/paymentCard/closePaymentCard \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paymentCardId": "pcard_a1b2c3d4e5f6g7h8i9j0",
"notes": "Customer requested card closure due to account upgrade.",
"last4": "4242"
}'