Get All Authorized Users Attached Payment Cards
The GET /api/paymentCards/viewAttachedCards endpoint retrieves a list of payment cards linked to all authorized users (subProfiles) under the authenticated main business account. It provides a comprehensive overview of payment methods associated with each authorized user, enabling the main account holder to maintain financial visibility and control. This endpoint is available to business customers only, as subProfiles are a business-exclusive feature.
Endpoint
GET /api/paymentCards/viewAttachedCards
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 the main account holder needs to review all payment cards assigned to authorized users across the business account. It is useful for financial oversight, monitoring card activity per authorized user, and identifying any cards that may need to be suspended or reviewed for unauthorized usage.
Response
200 OK
| Field | Type | Description |
|---|---|---|
givenName | string (nullable) | First name of the authorized user associated with the card |
familyName | string (nullable) | Last name of the authorized user associated with the card |
isMainCard | boolean | Indicates whether this card belongs to the main account holder rather than an authorized user |
paymentCardId | string (nullable) | Unique identifier of the payment card |
subProfileId | integer (int32) | Identifier of the authorized user (subProfile) to whom the card is attached |
nickName | string (nullable) | Optional display name assigned to the card |
[
{
"givenName": "Jane",
"familyName": "Smith",
"isMainCard": false,
"paymentCardId": "pc_a1b2c3d4e5f6",
"subProfileId": 101,
"nickName": "Jane's Business Card"
},
{
"givenName": "John",
"familyName": "Doe",
"isMainCard": false,
"paymentCardId": "pc_f6e5d4c3b2a1",
"subProfileId": 102,
"nickName": "Operations Card"
},
{
"givenName": null,
"familyName": null,
"isMainCard": true,
"paymentCardId": "pc_z9y8x7w6v5u4",
"subProfileId": 0,
"nickName": "Main Account Card"
}
]Error Codes
| Code | When it happens |
|---|---|
| 401 | Token missing, expired, or invalid |
| 403 | Caller is not a business account or does not have permission to view authorized user cards |
| 500 | Internal server error |
Common Mistakes
- Calling this endpoint from a personal customer account — subProfiles and their attached cards are a business-only feature; the request will be rejected with a 403.
- Expecting a single object in the response — the endpoint always returns an array; handle the case where the array may be empty if no authorized users have been created or no cards have been attached.
- Confusing
subProfileIdof0with an error — a value of0or a null-like value forsubProfileIdon a record whereisMainCardistrueindicates the main account holder's own card, not a missing authorized user. - Using an expired token — tokens are valid for only 10 minutes; refresh via
POST /api/auth/refreshbefore making this call if the token may have expired.
Related Endpoints
GET /api/paymentCards— Retrieve all payment cards associated with the authenticated accountPOST /api/paymentCards/attachCard— Attach a payment card to a specific authorized user (subProfile)GET /api/subProfiles— List all authorized users under the business accountPOST /api/subProfiles— Create a new authorized user for the business account
Example
curl -X GET https://api.banking.netevia.dev/api/paymentCards/viewAttachedCards \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"