Removes the association between a payment card and an authorized user (subProfile) on a business account.
Detach Payment Card from Authorized User
This endpoint removes a payment card from a specific authorized user (subProfile) on a business account. Once detached, the authorized user can no longer initiate transactions using that card. Use this endpoint to revoke card access without deleting the subProfile or the card itself.
Endpoint
POST /api/subProfiles/detachFromPaymentCard
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 an authorized user should no longer have access to a specific payment card — for example, when an employee's role changes, when a card is reassigned to a different subProfile, or when access needs to be revoked immediately. This does not close the card or remove the subProfile from the account.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| SubProfileId | integer (int32) | Yes | The unique numeric ID of the authorized user (subProfile) from whom the card will be detached |
| PaymentCardId | string | Yes | The unique identifier of the payment card to detach from the authorized user |
Response
200 OK
A 200 status code confirms the payment card was successfully detached from the authorized user. No response body fields are returned.
{}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required query parameters or invalid parameter values |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to manage subProfiles on this account |
| 404 | SubProfileId or PaymentCardId not found |
| 500 | Internal server error |
Common Mistakes
- Providing a
SubProfileIdthat belongs to a personal customer — subProfiles are only available for business customers - Omitting either
SubProfileIdorPaymentCardId— both query parameters are required - Attempting to detach a card that is not currently attached to the specified subProfile
- Using a
PaymentCardIdformatted as a raw card number — always use the internal card ID, never a PAN (XXXX-XXXX-XXXX-XXXX)
Related Endpoints
POST /api/subProfiles/attachToPaymentCard— Attach a payment card to an authorized userPOST /api/subProfiles— Create a new authorized user (subProfile) for a business accountGET /api/subProfiles— Retrieve authorized users associated with a business accountDELETE /api/subProfiles/{subProfileId}— Remove an authorized user from a business account
Example
curl -X POST "https://api.banking.netevia.dev/api/subProfiles/detachFromPaymentCard?SubProfileId=1042&PaymentCardId=pc_9a8b7c6d5e4f3a2b" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" 200Success
