LOGPAY Token API (1.0)

Getting started

This reference is key for your comprehensive understanding of LOGPAY Token Service.

LOGPAY's APIs make use of RESTful conventions when possible and where it makes sense. All calls use the standard HTTP verbs to express access semantics, like GET, POST, PATCH, and DELETE. Other related conventions for our API can be found in the section below.

JSON Conventions

  • Resources are addressable by a UUIDv4 id property.
  • Property names are always in snake_case.
  • The API does not support empty strings. To unset a string value, use an explicit null value instead.
  • Temporal data is encoded in ISO 8601 strings.

Authentication

API keys are supported to authenticate requests.

The keys are passed in via the HTTP header x-api-key.

curl --header 'X-API-Key: <SECRET>' \
  --request POST 'https://test.token.logpay.de/...'

The keys must be handled with care and kept secure. Never hardcode the API keys in your source code, but keep them solely on your backend systems.

API Use

Pagination

Endpoints that return lists of objects support cursor-based pagination requests. By default, the API returns up to 50 objects per API call. If the number of objects in a response from a support endpoint exceeds the default, then an integration can use pagination to request a specific set of the results and/or to limit the number of returned objects.

If an endpoint supports pagination, the response body follows this structure:

{
  "current_page": 1,
  "page_size": 50,
  "total_items": 200,
  "total_pages": 4,
  "data": [...]
}

The single pages can be requested with query parameters:

ParameterTypeDescription
limitintegerThe maximum amount of objects to be returned on a page.
pageintegerThe requested number of the page to return.

Request Errors

The API uses the standard errors to indicate the client errors on the service level.

The response payload for processing errors follows a standard format.

{
  "status": "the HTTP status code",
  "classifier": "the classifer of the error",
  "message": "interesting for humans..."
}

Business Errors

The processing errors refer to the primary functions of the LOGPAY Token Service and not necessarily to the related business logic. For example, a failed authorization due to insufficient funds will result in a 200 response, as the payment layer could successfully process the request (even though the business result is negative).

Download OpenAPI description
Overview
Languages
Servers
Sandbox

https://test.token.logpay.de/

PAYONE

Operations

Create LOGPAY Tokens

LOGPAY Tokens are powerful instrument to manage card holder data in a PCI/DSS compliant way.

Compliance as a Service

Achieve PCI / DSS compliance in almost no time using our certified managed compliance service.

No Acquirer Lock-In

Transparently use the cardholder data across all connected processors to implement a non lock-in acquiring setup.

Network Tokens

For every card which is tokenized, network-tokens can be automatically provisioned. This allows for more secure transactions, better conversion, and ultimately lower processing cost.

Operations

Token Management

All cards stored with LOGPAY can be managed via the endpoints in this section.

The CVC2 security code is only kept in an ephemeral cache for a few minutes. The API allows to manage this resource with these endpoints:

  • check if the CVC2 is still availble
  • request a new session to renew the CVC2 with our SDK
  • consume the token after a successful authorization on an external processor
Operations

Network Tokens

LOGPAY supports Network Tokens with major card schemes.

The lifecycle of network tokens is automatically managed. When activated a network token is automatically provisioned and maintained through its life-cycle.

The use of Network Tokens requires prior activation by your account manager.

Operations

Request a cryptogram

Request

Request a TAVV cryptogram for a LOGPAY token.

Path
idstring(uuid)required

The ID of the LOGPAY token

Bodyapplication/json
amountinteger>= 0required

The amount given in minor units (e.g. use 700 for 7€). Some currencies do not support minor units (e.g. Japanese Yen). In this case send in the full value, .i.e. 100 for 100 JPY.

currency_codestringrequired

The three letter currency code. See: ISO-4217

merchant_idstring(uuid)

The ID of the merchant for whom the authentication is requested

Example: "00000000-0000-0000-0000-000000000000"
referencestringrequired

A reference to the payment

Example: "1234567890"
curl -i -X POST \
  'https://test.token.logpay.de/tokens/{id}/payment-data' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "amount": 10000,
    "currency_code": "EUR",
    "merchant_id": "00000000-0000-0000-0000-000000000000",
    "reference": "1234567890"
  }'

Responses

Success response

Bodyapplication/json
idstring(uuid)required

The id of the requested payment data

amountinteger>= 0required

The amount given in minor units (e.g. use 700 for 7€). Some currencies do not support minor units (e.g. Japanese Yen). In this case send in the full value, .i.e. 100 for 100 JPY.

currency_codestringrequired

The three letter currency code. See: ISO-4217

created_atstring(date-time)

The date-time the payment-data was created (following ISO 8601)

encrypted_authentication_datastring

JWE encrypted JSON string containing authentication data.

Encrypted in a symmetric way with the shared encryption key using "alg"=A256GCMKW and "enc"="A256GCM". For decryption make sure the shared secret is hashed with a sha256 digest.

The decrypted JSON has the following format:

{
    network_token: {
      token: "token_value",
      expiry_year: 2023,
      expiry_month: 12
    },
    cryptogram: "cryptogram_value",
    eci: "eci_value"
}
  • The field network_token contains the value of the token, the year of expiry and the month of expiry of the token and is always included.
  • The field cryptogram contains the value of the cryptogram and is always included.
  • The field eci can instead have a value if there was an Electronic Commerce Indicator assigned, or it can be null if no information was provided.
failure_detailsArray of objects

The reasons why the processing failed. There are two categories of errors that can happen in this context (the source field indicates the category):

  1. Scheme errors: errors that are returned by the scheme.
  2. Configuration errors: errors that are caused by the configuration with respect to the scheme.
merchant_idstring(uuid)required

The ID of the merchant for whom the authentication is requested

referencestringrequired

Reference in calling system

successbooleanrequired

The result of the processing of the request. If true, the processing was successfully completed. In case it is false, the processing failed and the failure_details field contains more information about the failure.

token_idstring(uuid)required

The ID of the token on LOGPAY

Response
application/json
{ "id": "00000000-0000-0000-0000-000000000000", "amount": 10000, "currency_code": "EUR", "created_at": "2023-10-01T00:00:00Z", "encrypted_authentication_data": "eyJhbGc...", "merchant_id": "00000000-0000-0000-0000-000000000000", "reference": "1234567890", "success": true, "token_id": "00000000-0000-0000-0000-000000000000" }

Get cryptograms

Request

List all cryptograms requested by the Token

Path
idstring(uuid)required

The ID of the LOGPAY token

Query
limitinteger[ 1 .. 500 ]

The desired amount of records per page. The parameter defaults to 50 if it is omitted and has a maximum of 500.

pageinteger>= 1

The desired number of the page to return.

sortstring

It allows sorting the result by created_at. e.g sort=created_at+asc or sort=created_at+desc

curl -i -X GET \
  'https://test.token.logpay.de/tokens/{id}/payment-data?limit=1&page=1&sort=string' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Success response

Bodyapplication/json
dataArray of objects
paginationobject

The meta-data describing lists of data from the LOGPAY API. The pages are indexed from 1 up to the total_pages.

Example: {"current_page":1,"page_size":1,"total_items":1,"total_pages":1}
Response
application/json
{ "data": [ {} ], "pagination": { "current_page": 1, "page_size": 1, "total_items": 1, "total_pages": 1 } }

Update a network token

Request

If the provisioning of a network token status is failed or not_available for any reason, this endpoint can be used to provision a network token.

Path
idstring(uuid)required

The ID of the LOGPAY token

curl -i -X POST \
  'https://test.token.logpay.de/tokens/{id}/provisions' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Success response

Bodyapplication/json
idstring(uuid)required

The ID of the LOGPAY Token

Example: "5d6b2c9a-9b0b-4b0c-8c7d-9e9d5d7e9d5d"
cardholder_namestring

The name of the owner of the card

Example: "John Doe"
card_art_urlstring

The url linking to the card art endpoint

Example: "https://test.token.logpay.de/tokens/card-art/374c911a-8125-40eb-acb8-a26efd25f02b"
created_atstring(date-time)required

The date-time the payment-method was created (following ISO 8601)

Example: "2023-10-01T00:00:00Z"
expiry_monthintegerrequired

The number of month in a year (e.g. April is 4)

Example: 4
expiry_yearintegerrequired

The year given as four digit number (e.g. 2023)

Example: 2033
expires_atstring(date-time)

The date-time when the token will expire. Applicable only for ephemeral tokens.

Example: "2023-10-07T00:00:00Z"
invalidated_atstring(date-time)

The time the LOGPAY Token was invalidated, because the underlying payment instrument was invalidated by the scheme.

issuer_identification_numberstringrequired

The issuer idenfication number (IIN) - also known as BIN

Example: "424242"
account_number_last_fourstring

Last four digits of the card number

account_number_lengthinteger

The total number of digits in the card number

masked_account_numberstringrequired

The full lenght of the card number, but masked to conform to PCI/DSS requirments

Example: "424242******4242"
bank_namestring

Issuer bank name

segmentstring

Card segment

Enum"business""consumer""commercial""other"
statusstring

The status of this LOGPAY token.

Enum"active""invalid"
typestring

Card type

Enum"credit""debit"
country_codestring

A two letter country code. ISO 3166-1 alpha-2

network_token_statusstring

The status of the associated network token.

StatusDescription
activeThe network token is active and can be used.
inactiveThe network token is inactive, which prevents using it. The reason can be for example suspended network token.
pendingA network token is currently being provisioned. As soon as this is available, the status is changed to active.
failedA network token failed to be provisioned.
deletedThe network token is deleted and cannot be used again. It is also not possible to activate the network token again.
not_availableA network token can not be provisioned with the current configuration.
Enum"active""inactive""pending""deleted""failed""not_available"
network_token_status_reasonobject
schemestringrequired

The scheme in which the card was issued

Enum"VISA""Mastercard""American Express""Discover""Diners Club""JCB""UnionPay""Unknown"
identity_and_verificationstring

The type of ID&V submitted during the creation of the LOGPAY token..

Enum"none""checked""skipped"
authentication_dataobject
supports_device_bindingboolean
business_keystring

This attribute holds the original business key under which the cardholder data was stored on the system from which it was imported to Logpay.

It can be used for reconciliation or reference purposes.

import_providerstring

The source from which the cardholder data was imported from.

The business_key attribute will refer to the original ID at this provider.

Response
application/json
{ "id": "5d6b2c9a-9b0b-4b0c-8c7d-9e9d5d7e9d5d", "cardholder_name": "John Doe", "card_art_url": "https://test.token.logpay.de/tokens/card-art/374c911a-8125-40eb-acb8-a26efd25f02b", "created_at": "2023-10-01T00:00:00Z", "expiry_month": 4, "expiry_year": 2033, "expires_at": "2023-10-07T00:00:00Z", "issuer_identification_number": "424242", "masked_account_number": "424242******4242", "network_token_status": "active", "scheme": "VISA" }