Terminate subscription

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

FieldTypeRequiredDescription
tokenstringYesAuthentication token for the request. Minimum length: 1.
paymentCardIdstringYesUnique identifier of the payment card linked to the subscription to be terminated. Minimum length: 1.
{
  "token": "abc123def456",
  "paymentCardId": "card789xyz"
}

Response

200 OK

FieldTypeDescription
idstringUnique identifier of the digital wallet token record associated with the terminated subscription.
statusstringCurrent status of the digital wallet token after termination.
createdAtstringTimestamp indicating when the digital wallet token record was originally created.
updatedAtstringTimestamp indicating when the digital wallet token record was last updated (e.g., at termination).
requesterNamestringName 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

CodeWhen it happens
400Missing required fields (token or paymentCardId) or validation error (empty string values)
401Bearer token missing, expired, or invalid
403Insufficient permissions to terminate the subscription
404No active subscription found for the given paymentCardId
500Internal server error

Common Mistakes

  • Passing an empty string for token or paymentCardId — 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 Authorization header) with the token field 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 card
  • GET /subscriptions — Retrieve a list of active subscriptions associated with a customer's account
  • POST /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"
  }'
Body Params
string
required
length ≥ 1
string
required
length ≥ 1
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json