Links a payment card to a subprofile (authorized user) within a business customer account.
Attach Payment Card to Authorized User
This endpoint links a payment card to an authorized user (subprofile) associated with a business customer account. Once attached, the authorized user can use the assigned payment card to conduct transactions and access card-related features as permitted by the primary account holder. The operation validates the caller's permissions against the subprofile's defined access level before completing the attachment.
Endpoint
POST /api/subProfiles/attachToPaymentCard
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 after creating a subprofile for a business customer and issuing a payment card that the authorized user should have access to. This is typically called during onboarding of a new authorized user or when expanding an existing authorized user's card access. Optionally trigger email or push notifications to inform the authorized user that a card has been assigned to them.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PaymentCardId | string | Yes | The unique identifier of the payment card to attach |
| SubProfileId | integer (int32) | Yes | The unique identifier of the authorized user (subprofile) to attach the card to |
| IsEmailNotify | boolean | No | When true, sends an email notification to the authorized user upon successful attachment |
| IsPushNotify | boolean | No | When true, sends a push notification to the authorized user upon successful attachment |
Response
200 OK
A 200 status confirms the payment card has been successfully linked to the authorized user profile. No additional response body fields are returned.
{}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required query parameters (PaymentCardId or SubProfileId) or validation error |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions — caller lacks authority to modify the specified subprofile |
| 404 | Payment card or subprofile not found |
| 500 | Internal server error |
Common Mistakes
- Passing a
PaymentCardIdthat belongs to a different customer than the one who owns the subprofile — the card and subprofile must belong to the same business account. - Omitting
SubProfileIdor supplying a non-integer value —SubProfileIdis required and must be a 32-bit integer. - Attempting to attach a card to a subprofile that already has that card linked, which may return a 400 validation error.
- Using a token issued for a personal customer — subprofiles and card attachment are available for business customers only.
Related Endpoints
POST /api/subProfiles— Create a new authorized user (subprofile) for a business customerGET /api/subProfiles— Retrieve all subprofiles associated with a business customerDELETE /api/subProfiles/detachFromPaymentCard— Remove a payment card from an authorized userGET /api/paymentCards— List available payment cards for a customer
Example
curl -X POST "https://api.banking.netevia.dev/api/subProfiles/attachToPaymentCard?PaymentCardId=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&SubProfileId=4521&IsEmailNotify=true&IsPushNotify=false" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" 200Success
