Terminate Subscription
This endpoint allows customers to permanently terminate an active subscription associated with their Netevia payment card. Upon successful termination, the subscription is permanently deleted and the card is removed from the service provider's payment system. Once terminated, a subscription cannot be restored — the customer must re-subscribe from the beginning to resume the service.
Endpoint
POST /subscriptions/terminate
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 customer wants to cancel a recurring subscription that was set up using a Netevia payment card. This is appropriate when a customer no longer wants a service provider (such as a streaming platform or software subscription) to retain their card on file. Call this endpoint to ensure both the subscription record and the stored card reference at the provider are removed.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Authentication token for the request. Minimum length: 1. |
paymentCardId | string | Yes | Unique identifier of the payment card linked to the subscription to be terminated. Minimum length: 1. |
{
"token": "abc123def456",
"paymentCardId": "card789xyz"
}Response
200 OK
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the digital wallet token record associated with the terminated subscription. |
status | string | Current status of the digital wallet token after termination. |
createdAt | string | Timestamp indicating when the digital wallet token record was originally created. |
updatedAt | string | Timestamp indicating when the digital wallet token record was last updated (e.g., at termination). |
requesterName | string | Name of the entity or user who requested the termination. |
{
"id": "dwt_a1b2c3d4e5f6",
"status": "TERMINATED",
"createdAt": "2025-03-15T10:22:00Z",
"updatedAt": "2025-11-04T14:35:00Z",
"requesterName": "Jane Smith"
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields (token or paymentCardId) or validation error (empty string values) |
| 401 | Bearer token missing, expired, or invalid |
| 403 | Insufficient permissions to terminate the subscription |
| 404 | No active subscription found for the given paymentCardId |
| 500 | Internal server error |
Common Mistakes
- Passing an empty string for
tokenorpaymentCardId— both fields have a minimum length of 1 and will fail validation. - Attempting to re-terminate an already-terminated subscription — once terminated, the subscription record is permanently deleted and cannot be found again.
- Confusing the Bearer authentication token (passed in the
Authorizationheader) with thetokenfield in the request body — these are separate values. - Expecting to restore a terminated subscription via API — termination is irreversible and the customer must re-subscribe directly with the service provider.
Related Endpoints
POST /subscriptions— Create or register a new subscription linked to a Netevia payment cardGET /subscriptions— Retrieve a list of active subscriptions associated with a customer's accountPOST /api/auth/v2— Obtain a Bearer authentication token
Example
curl -X POST https://api.banking.netevia.dev/subscriptions/terminate \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"token": "abc123def456",
"paymentCardId": "card789xyz"
}'