Create new card
This method creates a card in the “CONFIRMING” state and, depending on the card technology, transitions it to either “INACTIVE”, “DIGITALLY ACTIVE”, or “ACTIVE” status. Virtual cards utilizing “VIRTUAL” and “VIRTUAL DISPOSABLE” technologies are promptly set to “ACTIVE” status. Physical cards, categorized by “MAGSTRIPE”, “CONTACT CHIP”, or “CONTACTLESS CHIP” technologies, are set to “INACTIVE” status for non-tokenizable cards and to “DIGITALLY ACTIVE” for tokenizable cards.
Each new card request must specify "ACTIVE" CPD "code", if it selected deactivated CPD, CMS automatically retrieves its “ACTIVE” successor. The specified CPD establishes predefined limits, restrictions, card design, and instructions for card production and delivery.
To set a limit for a card, the ID of the limit must be provided along with all the necessary values. All limits included in CPD, which allows modifications must be included in a request for a new card. If a limit has a range of values set by CPD, the CMS will allow only setting limit value in this range. Limits can be configured for daily, weekly, and monthly periods, encompassing both amount and count settings. List of limits can be found here.
To set a restriction for a card, the ID of the restriction must be provided along with all the necessary values. All restrictions included in CPD, which allows modifications must be included in a request for a new card. Restrictions can be established using the logic of a blacklist, whitelist, or a specific flag from transaction data to either restrict or allow specific transaction configurations. List of restrictions can be found here.
Editing limits and restrictions settings is permissible after card creation using PUT/cards/{id}/limits and PUT /cards/{id}/restrictions, subject to the preferences of the owner or cardholder, provided that the settings for the restriction or limit allow such modifications.
As the card number is assigned by the card processor, CMS sends a request to the card processor to assign a card number based on the settings specified in the request when creating a new card. The new card number is then permitted to authorize transactions, adhering to the resulting state in which the new card is provided.
URL test:
URL live:
Method:
POST
Path items:
/cards (Card Service)
Parameters:
Parameter | Location | Type | Example | Description | Required |
---|---|---|---|---|---|
card | body | "object" | - | Card details | Yes |
cpdCode | card | "string" | "94CHBIA4FX31CUPWFMNSHONI" | CPD code | Yes |
expressDelivery | card | "boolean" | true | Enables express delivery | No |
holder | body | "object" | - | Holder details | Yes |
holderExternalId | holder | "string" | "1231354" | External holder ID | Yes |
firstName | holder | "string" | "John" | Yes | |
middleName | holder | "string" | "Michael" | No | |
lastName | holder | "string" | "Doe" | Yes | |
sex | holder | "string" | "MALE" | No | |
birthdate | holder | "string" | "0001-01-01T00:00:00" | Yes | |
phoneNumber | holder | "string" | "701235698" | Yes | |
residenceAddress | holder | "object" | - | Residence address details of holder | Yes |
city | residenceAddress | "string" | "Příbram" | Yes | |
country | residenceAddress | "string" | "CZE" | Yes | |
state | residenceAddress | "string" | "CZE" | No | |
addressLine1 | residenceAddress | "string" | "Barandovská 424" | Yes | |
addressLine2 | residenceAddress | "string" | No | ||
zip | residenceAddress | "string" | "26101" | Yes | |
mailingAddress | holder | "object" | - | Mailing address details of holder | Yes |
city | mailingAddress | "string" | "Příbram" | Yes | |
country | mailingAddress | "string" | "CZE" | Yes | |
state | mailingAddress | "string" | "CZE" | No | |
addressLine1 | mailingAddress | "string" | "Barandovská 424" | Yes | |
addressLine2 | mailingAddress | "string" | No | ||
zip | mailingAddress | "string" | "26101" | Yes | |
accountsInfo | body | "object" | - | Account information | Yes |
accountOwner | accountsInfo | "object" | - | Account owner details | Yes |
holderExternalId | accountOwner | "string" | "6546545654" | External holder ID of account owner | Yes |
firstName | accountOwner | "string" | "John" | Yes | |
middleName | accountOwner | "string" | "Michael" | No | |
lastName | accountOwner | "string" | "Doe" | Yes | |
sex | accountOwner | "string" | "MALE" | No | |
birthdate | accountOwner | "string" | "0001-01-01T00:00:00" | Yes | |
phoneNumber | accountOwner | "string" | "701235698" | Yes | |
residenceAddress | accountOwner | "object" | - | Residence address details of account owner | Yes |
city | residenceAddress | "string" | "Příbram" | Yes | |
country | residenceAddress | "string" | "CZE" | Yes | |
state | residenceAddress | "string" | "CZE" | No | |
addressLine1 | residenceAddress | "string" | "Barandovská 424" | Yes | |
addressLine2 | residenceAddress | "string" | No | ||
zip | residenceAddress | "string" | "26101" | Yes | |
accounts | accountsInfo | "object" | - | Acounts list | Yes |
accountExternalId | accounts | "string" | "12313212" | Yes | |
accountCurrency | accounts | "string" | "CZK" | No | |
delivery | body | "object" | - | Yes | |
deliveryType | delivery | "string" | "POST" | POST/BRANCH/INSTANT | Yes |
deliveryPoint | delivery | "string" | - | ID of Branch | Yes1) |
deliveryAddress | delivery | "string" | - | Delivery address of holder | Yes2) |
city | deliveryAddress | "string" | "Příbram" | Yes2) | |
country | deliveryAddress | "string" | "CZE" | Yes2) | |
state | deliveryAddress | "string" | "CZE" | No | |
addressLine1 | deliveryAddress | "string" | "Barandovská 424" | Yes2) | |
addressLine2 | deliveryAddress | "string" | No | ||
zip | deliveryAddress | "string" | "26101" | Yes2) | |
limits | body | "object" | - | Limits details | Yes |
limitId | limits | "string" | LIM_POS_D | Limit ID specified in CPD | Yes |
limitType | limits | "string" | "AMOUNT" | AMOUNT/COUNT Limit type | No |
limitValue | limits | "integer" | "50000" | Yes | |
name | limits | "string" | "POS DAILY LIMIT" | Limit name | No |
restrictions | body | "object" | - | Resctions details | Yes |
name | restrictions | "string" | "CASH TRANSACTIONS" | Restriction name | No |
restrictionId | restrictions | "string" | "DENYCASH" | Restriction ID specified in CPD | Yes |
restrictionValue | restrictions | "string" | "ENABLED" | ENABLED/DISABLED value for turning ON or OFF the restriction | No |
Info
1) If Delivery type is BRANCH
2) If Delivery type is POST
Example:
curl -X 'POST' \
'https://dev.lightcms.io/cms/v1/cards' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"card": {
"cpdCode": "VISA_DEV_TEST",
"expressDelivery": true
},
"holder": {
"holderExternalId": "1002778",
"firstName": "Benjamin",
"lastName": "Griffiths",
"embossName": "GRIFFITHS BENJAMIN",
"sex": "MALE",
"birthdate": "01-01-1970",
"phoneNumber": "123456789",
"residenceAddress": {
"addressLine1": " 59",
"city": "Černá Voda",
"country": "CZE",
"zip": "79054"
},
"mailingAddress": {
"addressLine1": " 59",
"city": "Černá Voda",
"country": "CZE",
"zip": "79054"
}
},
"accountsInfo": {
"accountOwner": {
"holderExternalId": "1001863",
"firstName": "Duncan",
"lastName": "Clarke",
"sex": "MALE",
"birthdate": "01-01-1970",
"phoneNumber": "123456789",
"residenceAddress": {
"addressLine1": "Boční 300",
"city": "Jablonec nad Nisou",
"country": "CZE",
"zip": "46801"
},
"mailingAddress": {
"addressLine1": "Českomalínská 1037/ 24",
"city": "Praha",
"country": "CZE",
"zip": "16000"
}
},
"accounts": [
{
"accountExternalId": "1000019953",
"accountCurrency": "CZK"
}
]
},
"delivery": {
"deliveryType": "INSTANT"
},
"limits": [
{
"limitId": "LIM_17_POS_AMT_D",
"limitValue": 50000
},
{
"limitId": "LIM_17_ECOM_AMT_D",
"limitValue": 20000
},
{
"limitId": "LIM_17_ATM_AMT_D",
"limitValue": 50000
}
],
"restrictions": [
{
"restrictionId": "TPRF_17_01_2",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TPRF_17_01_3",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TPRF_17_01_4",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TPRF_17_01_5",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TPRF_17_01_7",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TPRF_17_01_9",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TPRF_17_01_8",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TPRF_17_01_6",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TERMINAL_EU_COUNTRIES",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TRANSACTIONS_PERMISSIONS_A",
"restrictionValue": "DISABLED"
},
{
"restrictionId": "TRANSACTIONS_PERMISSIONS_B",
"restrictionValue": "DISABLED"
}
]
}
'
Responses:
201 - Created
Status Code: 201 Created
Parameter | Location | Type | Example | Description |
---|---|---|---|---|
cardId | body | integer | 265 | Internal Card ID |
expiryDate | body | date | "2024-04-10T08:54:30.070Z" | Expiry date of Card |
500 - Internal error
Status Code: 500 Internal error
400 - Incorrect parameters
Status Code: 400 Bad request
{
"accountsInfo.accounts[0].accountExternalId": "must be a valid account external id",
"delivery.validDeliveryPointAllowed": "deliveryPoint is allowed only for BRANCH",
"accountsInfo.accountOwner.residenceAddress.country": "must be a valid alpha3 country code",
"holder.residenceAddress.country": "must be a valid alpha3 country code",
"delivery.deliveryAddress.country": "must be a valid alpha3 country code",
"holder.mailingAddress.country": "must be a valid alpha3 country code"
}
Parameter | Location | Type | Example | Description |
---|---|---|---|---|
incorrect parameter | body | string[] | "must be a valid account external id" | Requested parameters detail |