Class CardEmbedParams
-
- All Implemented Interfaces:
-
com.lithic.api.core.Params
public final class CardEmbedParams implements Params
Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.
In this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer's branding using a specified css stylesheet. A user's browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer's servers while full card data is displayed to their end-users. The response contains an HTML document (see Embedded Card UI or Changelog for upcoming changes in January). This means that the url for the request can be inserted straight into the
srcattribute of an iframe.<iframe id="card-iframe" src="https://sandbox.lithic.com/v1/embed/card?embed_request=eyJjc3MiO...;hmac=r8tx1..." allow="clipboard-write" class="content"></iframe>You should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCardEmbedParams.BuilderA builder for CardEmbedParams.
-
Method Summary
Modifier and Type Method Description final StringembedRequest()A base64 encoded JSON string of an EmbedRequest to specify which card to load. final Stringhmac()SHA256 HMAC of the embed_request JSON string with base64 digest. final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final CardEmbedParams.BuildertoBuilder()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static CardEmbedParams.Builderbuilder()Returns a mutable builder for constructing an instance of CardEmbedParams. -
-
Method Detail
-
embedRequest
final String embedRequest()
A base64 encoded JSON string of an EmbedRequest to specify which card to load.
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final CardEmbedParams.Builder toBuilder()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static CardEmbedParams.Builder builder()
Returns a mutable builder for constructing an instance of CardEmbedParams.
The following fields are required:
.embedRequest() .hmac()
-
-
-
-