Corporate cards: create, issue and share
This guide describes how to create a corporation, create its balance, issue a virtual corporate card and share that card with an existing end user.
At a glance
Follow the five steps in order. The corporation remains the owner of the balance and card throughout the process.
UML sequence diagram
actor Integrator
participant "User Lifecycle API" as Lifecycle
participant "Card Issuing API" as Issuing
Integrator -> Lifecycle: POST /lifecycle/v1/corporations
Lifecycle --> Integrator: dcCorporationId
Integrator -> Issuing: POST /secure/balances (dcCorporationId)
Issuing --> Integrator: balanceId
Integrator -> Issuing: POST /secure/cards/virtual
Issuing --> Integrator: cardId
Integrator -> Lifecycle: POST /lifecycle/v1/corporations/{id}/users (dcUserId)
Integrator -> Issuing: PATCH /secure/cards/{cardId}/shares (dcUserId)
Issuing --> Integrator: 204 No Content
@enduml
What you will build
At the end of this flow, a corporation owns a balance and a virtual card. A corporate member can access and use the card after it has been shared with their dcUserId.
Before you start
- Use the server-to-server API channel. Secure endpoints are protected with an x509 client certificate.
- Have a configured card programme and the required card configuration ID.
- Ensure that each end user already exists in DataCore and has a
dcUserId. - Complete KYB where it is required by your programme before enabling financial operations.
Basic flow
Labels are optional. Use this flow when all users in the corporation require the same access level.
- Create the corporation.
CallPOST /lifecycle/v1/corporations. Store the returneddcCorporationId. - Create a corporate balance.
CallPOST /secure/balanceswithdcCorporationId. Do not usedcUserIdas the balance owner. - Issue a virtual corporate card.
CallPOST /secure/cards/virtualwith the balance ID,dcCorporationIdand the card configuration ID. - Add the end user to the corporation.
CallPOST /lifecycle/v1/corporations/{corporationId}/userswith the user’sdcUserId. - Share the card with the corporate member.
CallPATCH /secure/cards/{cardId}/shareswith the member’sdcUserId. The user must be a member first.
Ownership and access
The card is issued to the corporation. Sharing grants a corporation member access without changing ownership.
UML class diagram
title Corporate card ownership and access
rectangle "Company" as company
rectangle "Corporate budget" as budget
rectangle "Corporate card" as card
actor "Employee" as employee
company --> budget : owns
budget --> card : funds
company --> employee : adds as member
card --> employee : shares access
note right of employee
The employee can use the card
after access is shared.
The company remains the owner.
end note
@enduml
Key identifiers
| Identifier | Purpose |
|---|---|
dcCorporationId |
Identifies the corporation. |
balanceId |
Identifies the corporate balance. |
cardId |
Identifies the issued card when creating a share. |
dcUserId |
Identifies the end user to add and to receive the card share. |
Optional role-based visibility
For different visibility levels, retrieve labels with GET /lifecycle/v1/labels and assign the appropriate label while adding a user to the corporation. For example, a HEAD user can receive extended visibility according to programme authorisation rules.
Implementation notes
- The card remains owned by the corporation; sharing does not transfer ownership.
- Create corporation membership before calling the share endpoint.
- Use
dcCorporationIdwith the corporatebalanceId; do not substitute the member’sdcUserId.
API reference
- User Lifecycle and Card Management API — corporation, membership and labels endpoints.
- Card Issuing and Core Banking technical documentation — secure balance, virtual-card and card-share endpoints.