Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesBased on the generic functionality other use cases could be applicable.
Loyalty programs that reward and redeem points are a common part of payments between merchants and customers. The identification of a customer is often handled by providing an additional loyalty token like a plastic card during the checkout. This loyalty token (customer reference) could be added to a virtual wallet also. The loyalty account associated with the token is referenced with a number identifying the customer.
Until now, customers required a payment card and a loyalty card. CCV provides a solution where a loyalty card (physical or virtual) is no longer required and becomes fully integrated within the payment for rewarding and redeeming.
CCV provides a solution in which registered customers can be linked to the payment card they use in the shop. Once the link is set up between the loyalty card and payment card, the merchant receives the customer reference within the payment flow for loyalty processing. A merchant can query the customer data using the payment card in the CCV terminal.
All sensitive card data remains within the CCV ecosystem and is never exposed to the merchant. The only data the terminal exposes is the customer reference if a payment card link is found.
To interact with the customer reference data, CCV provides this API which can be used to initially register a customer reference, retrieve the links available, remove any links or remove all data of a customer. The merchant is responsible to comply with privacy and other regulations and manage the OPT-IN/OPT-OUT.
Usage steps:
Usage steps:
The following “how it works” shows how the use case reflects on the various API calls.
The pre-registration is initiated with the API call Add Customer. After the API call, any subsequent payment card transaction which has a provided link reference included will be linked to the customer until the provided timestamp is expired.
During the full customer journey Get Customer can be used to retrieve in every step the latest information and status.
If the customer or merchant wants to change the payment card linking status, it can update the customer with Update Customer to set a new timestamp after which no new payment cards will be linked. The timestamp is a long integer with the number of seconds since the Unix Epoch time. Use the minimum value to disable the linking of any new payment cards and the maximum value to enable the linking of new payment cards until further notice.
After the payment card is linked with the loyalty card the merchant can retrieve the latest information via Get All Payment Cards. A masked PAN is included that could be presented to the customer. Within the payment card data, a CCV internal id is included which can be used to remove a payment card link.
If the customer or merchant would like to remove a single payment card link the Remove Payment Card has to be used with the appropriate card id selected.
Full removal of the customer can be initiated with the Remove Customer which removes the customer including all payment card links.
Multiple payment cards can be linked to a single customer. When a payment card that is already linked to a customer (A) is linked to the customer (B), the link to the customer (A) is removed and the payment card is linked to the new customer (B).
If a customer has multiple cards or devices with the same bank account number, all the cards and devices have to be individually linked. When you get a replacement card, also this replacement card needs to be linked.
The API contains endpoints to manage customers and their linked cards.
Communication with the API is described in the general API documentation
A customer as referenced by the merchant is an entity that can be linked to payment cards. Use cases like loyalty allow multiple people to be referenced as the same customer by linking their payment card to the same customer.
The registration expiration is an optional parameter for how long a registration request may be honored. Card link requests after this time will be ignored.
Name | Type | Size | Format | Description |
---|---|---|---|---|
id | string | UUID Type 4 | The unique UUID assigned by the PSP to the customer | |
externalId | string | max 64 | The unique ID assigned by the merchant to the customer | |
customerReference | string | max 64 | The reference returned when querying the link of payment card | |
registrationExpiration | integer | Unix Epoch Time in milliseconds | The timestamp after which the registration can no longer be valid | |
created | integer | Unix Epoch Time in milliseconds | The server datetime the customer was created | |
lastUpdated | integer | Unix Epoch Time in milliseconds | The server datetime the customer was updated | |
registered | integer | Unix Epoch Time in milliseconds | The server datetime the customers first card was registered | |
linkReferences | array | 25 | Link Reference | The list of link references to identify the customer when creating card links |
A link reference identifies a customer during the card linking process. The difference with the customer reference is its use:
A customer reference can be used as a link reference, but it is not required. If desired, define the customer reference explicitly as a link reference.
!IMPORTANT A link reference must be unique for all customers from a merchant.
Type | Size | Format | Description |
---|---|---|---|
string | max 64 | A reference to link a customer to a payment card |
A paged list of customers.
Name | Type | Description |
---|---|---|
data | array of Customer | A list of customers. The maximum number of customers in this list is defined by the page size. |
page | page | Information about the total amount of customers and the current returned list. |
A page contains information about the current paged list and the total amount of entities over all pages.
Name | Type | Description |
---|---|---|
size | integer | The maximum size of the current page. |
number | integer | The number of the current page. (The first page has number 0) |
totalElements | integer | The total amount of elements over all pages. |
totalPages | integer | The total number of available pages. |
A card represents a physical payment card linked to a customer. The PAN is not stored but can be identified with a merchant specific token. The same PAN for the same customer will never have the same token for different merchants.
Name | Type | Size | Format | Description |
---|---|---|---|---|
id | string | 36 | UUID Type 4 | The unique UUID assigned by the PSP to the card |
maskedPan | string | 13-19 | [\d]{4}[X]{5,11}[\d]{4} |
The masked number of the card PAN |
created | integer | Unix Epoch Time in milliseconds | The server datetime the card was created | |
lastUpdated | integer | Unix Epoch Time in milliseconds | The server datetime the card was updated |
Manage customers with identifiers assigned by CCV.
Add a new customer to the merchant account.
/api/v1/customer
POST
application/json
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Optional | The unique ID assigned by the merchant to the customer | |
customerReference | string | max 64 | Required | The reference to link with payment cards | |
registrationExpiration | integer | Unix Epoch Time in milliseconds | Required | The timestamp after which the registration can no longer be valid | |
linkReferences | array | 25 | Link Reference | Optional | The list of link references to identify the customer when creating card links |
POST /api/v1/customer HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type:application/json
{
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["123456789", "49-LF-LF", "31612345678"]
}
application/json
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
{
"id" : "632785d0-e01b-466d-8048-f5539665444d",
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["123456789", "49-LF-LF", "31612345678"],
"created": 1612195375000,
"lastUpdated" : 1612195375000,
"registered" : null
}
application/json
{
"type" : "input_error",
"message" : "customerReference is invalid",
"reference" : "718ee617",
"field" : "customerReference",
"fields": [
{
"field": "customerReference",
"message": "size must be between 1 and 64"
}
]
}
application/json
{
"type" : "input_error",
"message" : "externalId is not unique",
"reference" : "718ee617",
"field" : "externalId",
"fields": [
{
"field": "externalId",
"message": "the value must be unique"
}
]
}
See Error Handling for other possible error responses.
Retrieve a customer from the merchant account.
/api/v1/customer/{id}
GET
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
id | string | UUID Type 4 | Required | The unique UUID assigned by the PSP to the customer |
GET /api/v1/customer/632785d0-e01b-466d-8048-f5539665444d HTTP/1.1
Host: api.psp.ccv.eu
User-Agent: curl/7.74.0
Accept: application/json
application/json
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "id"
}
See Error Handling for other possible error responses.
Use an update to enable/disable card linking, remove link references, etc.
!IMPORTANT An update must contain the new state of the customer. Partial updates (‘patching’) is not supported. Undefined fields are interpreted as null
and overwrite any value set for those fields.
/api/v1/customer/{id}
PUT
application/json
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
id | string | UUID Type 4 | Required | The unique UUID assigned by the PSP to the customer |
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Optional | The unique ID assigned by the merchant to the customer | |
customerReference | string | max 64 | Required | The reference to link with payment cards | |
registrationExpiration | integer | Unix Epoch Time in milliseconds | Required | The timestamp after which the registration can no longer be valid | |
linkReferences | array | 25 | Link Reference | Optional | The list of link references to identify the customer when creating card links |
PUT /api/v1/customer/632785d0-e01b-466d-8048-f5539665444d HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type: application/json
{
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 0,
"linkReferences" : ["123456789", "49-LF-LF", "31612345678"]
}
Given that the link references of the customer are 123456789, 49-LF-LF, 31612345678
,
when you want to add reference ABCDE
then send a list of the current and new references, 123456789, 49-LF-LF, 31612345678, ABCDE
PUT /api/v1/customer/632785d0-e01b-466d-8048-f5539665444d HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type: application/json
{
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["123456789", "49-LF-LF", "31612345678", "ABCDE"]
}
Given that the link references of the customer are 123456789, 49-LF-LF, 31612345678
,
when you want to remove reference 31612345678
then send a list containing the remaining references, 123456789, 49-LF-LF
.
PUT /api/v1/customer/632785d0-e01b-466d-8048-f5539665444d HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type: application/json
{
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["123456789", "49-LF-LF"]
}
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "id"
}
See Error Handling for other possible error responses.
Remove a customer and their linked cards from the merchant account.
Important: All customer and card data is removed and unrecoverable.
/api/v1/customer/{id}
DELETE
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
id | string | UUID Type 4 | Required | The unique UUID assigned by the PSP to the customer |
DELETE /api/v1/customer/632785d0-e01b-466d-8048-f5539665444d HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
See Error Handling for other possible error responses.
Get all cards from a customer.
/api/v1/customer/{id}/card
GET
application/json
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
id | string | UUID Type 4 | Required | The unique UUID assigned by the PSP to the customer |
GET /api/v1/customer/9bfb4cc4-6555-11eb-ae93-0242ac130002/card HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
application/json
[
{
"id" : "9bfb4cc4-6555-11eb-ae93-0242ac130002",
"maskedPan" : "4111XXXXXXXX1111",
"created" : 1612270671000,
"lastUpdated" : 1612270671000
},
{
"id" : "63ec8459-5e4c-4299-af83-57702241b67f",
"maskedPan" : "5222XXXXXXXX2222",
"created" : 1614327207000,
"lastUpdated" : 1614327207000
}
]
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "id"
}
See Error Handling for other possible error responses.
Remove all cards from a customer.
Important: All card data is removed and unrecoverable.
/api/v1/customer/{id}/card
DELETE
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
id | string | UUID Type 4 | Required | The unique UUID assigned by the PSP to the customer |
DELETE /api/v1/customer/632785d0-e01b-466d-8048-f5539665444d/card HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "id"
}
See Error Handling for possible error responses.
Manage customers with identifiers provided by the merchant. In order to differentiate
between the operations of the Customers endpoint, all paths will start
with /customer/externalId
.
Retrieve a customer from the merchant account.
/api/v1/customer/externalId/{externalId}
GET
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Required | The unique ID assigned by the merchant to the customer |
GET /api/v1/customer/externalId/a2d33fe6 HTTP/1.1
Host: api.psp.ccv.eu
User-Agent: curl/7.74.0
Accept: application/json
application/json
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "externalId"
}
See Error Handling for other possible error responses.
Use an update to enable/disable card linking, remove link references, etc.
!IMPORTANT An update must contain the new state of the customer. Partial updates (‘patching’) is not supported. Undefined fields are interpreted as null
and overwrite any value set for those fields.
/api/v1/customer/externalId/{externalId}
PUT
application/json
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Required | The unique ID assigned by the merchant to the customer |
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Optional | The unique ID assigned by the merchant to the customer | |
customerReference | string | max 64 | Required | The reference to link with payment cards | |
registrationExpiration | integer | Unix Epoch Time in milliseconds | Optional | The timestamp after which the registration can no longer be valid | |
linkReferences | array | 25 | Link Reference | Optional | The list of link references to identify the customer when creating card links |
PUT /api/v1/customer/externalId/a2d33fe6 HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type: application/json
{
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 0,
"linkReferences" : ["123456789", "49-LF-LF", "31612345678"]
}
Given that the link references of the customer are 123456789, 49-LF-LF, 31612345678
,
when you want to add reference ABCDE
then send a list of the current and new references, 123456789, 49-LF-LF, 31612345678, ABCDE
PUT /api/v1/customer/externalId/a2d33fe6 HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type: application/json
{
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["123456789", "49-LF-LF", "31612345678", "ABCDE"]
}
Given that the link references of the customer are 123456789, 49-LF-LF, 31612345678
,
when you want to remove reference 31612345678
then send a list containing the remaining references, 123456789, 49-LF-LF
.
PUT /api/v1/customer/externalId/a2d33fe6 HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type: application/json
{
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["123456789", "49-LF-LF"]
}
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "externalId"
}
See Error Handling for other possible error responses.
Remove a customer and their linked cards from the merchant account.
Important: All customer and card data is removed and unrecoverable.
/api/v1/customer/externalId/{externalId}
DELETE
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Required | The unique ID assigned by the merchant to the customer |
DELETE /api/v1/customer/externalId/a2d33fe6 HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
See Error Handling for other possible error responses.
Get all cards from a customer.
/api/v1/customer/externalId/{externalId}/card
GET
application/json
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Required | The unique ID assigned by the merchant to the customer |
GET /api/v1/customer/externalId/a2d33fe6/card HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
application/json
[
{
"id" : "9bfb4cc4-6555-11eb-ae93-0242ac130002",
"maskedPan" : "4111XXXXXXXX1111",
"created" : 1612270671000,
"lastUpdated" : 1612270671000
},
{
"id" : "63ec8459-5e4c-4299-af83-57702241b67f",
"maskedPan" : "5222XXXXXXXX2222",
"created" : 1614327207000,
"lastUpdated" : 1614327207000
}
]
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "externalId"
}
See Error Handling for other possible error responses.
Remove all cards from a customer.
Important: All card data is removed and unrecoverable.
/api/v1/customer/externalId/{externalId}/card
DELETE
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
externalId | string | max 64 | Required | The unique ID assigned by the merchant to the customer |
DELETE /api/v1/customer/externalId/a2d33fe6/card HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
application/json
{
"type" : "input_error",
"message" : "Customer not found",
"reference" : "718ee617",
"field" : "externalId"
}
See Error Handling for possible error responses.
Manage customers with identifiers provided by the merchant.
Retrieve a customer from the merchant account.
/api/v1/customer?customerReference={customerReference}&page={page}&size={size}
GET
application/json
Name | Type | Size | Inclusion | Description |
---|---|---|---|---|
customerReference | string | max 64 | Required | The reference to link with payment cards |
page | integer | Optional | The page of customers that is requested. First page is 0. (default = 0) | |
size | integer | max 50 | Optional | The number of customers that is requested per page. (default = 10) |
GET /api/v1/customer?customerReference=123456789&page=0&size=10 HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
content-type:application/json
application/json
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
{
"data": [
{
"id" : "632785d0-e01b-466d-8048-f5539665444d",
"externalId" : "a2d33fe6",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["123456789", "49-LF-LF", "31612345678"],
"created": 1612195375000,
"lastUpdated" : 1612195375000,
"registered" : null
},
{
"id" : "812fd81d-8682-4da7-b981-cd0859bcb04a",
"externalId" : "b1cc9f8a",
"customerReference" : "123456789",
"registrationExpiration": 1612194997000,
"linkReferences" : ["LR-001"],
"created": 1612195395000,
"lastUpdated" : 1612195395000,
"registered" : null
}
],
"page" : {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
/api/v1/card/{id}
GET
application/json
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
id | string | UUID Type 4 | Required | The unique UUID assigned by the PSP to the card |
GET /api/v1/card/9bfb4cc4-6555-11eb-ae93-0242ac130002 HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
accept: application/json
application/json
{
"id" : "9bfb4cc4-6555-11eb-ae93-0242ac130002",
"maskedPan" : "4111XXXXXXXX1111",
"created" : 1612270671000,
"lastUpdated" : 1612270671000
}
application/json
{
"type" : "input_error",
"message" : "Card not found",
"reference" : "718ee617",
"field" : "id"
}
See Error Handling for other possible error responses.
Remove a single payment card from a customer.
/api/v1/card/{id}
DELETE
Name | Type | Size | Format | Inclusion | Description |
---|---|---|---|---|---|
id | string | UUID Type 4 | Required | The unique UUID assigned by the PSP to the card |
DELETE /api/v1/card/5b878db4-6556-11eb-ae93-0242ac130002 HTTP/1.1
Host: api.psp.ccv.eu
user-agent: curl/7.74.0
See Error Handling for possible error responses.