Tokenizing Cards
There are two ways to tokenize a payment card, as described in the table below.| Source | Compliance | Description |
|---|---|---|
session | Min. SAQ-A+ | Use the Hellgate SDK to capture cardholder data and send it encrypted to the API. |
pan | Min. SAQ-D+ | Import full card data in exchange for a token when you have the required compliance. |
Using tokenized cards
The cards are stored securely in the Guardian vault. You cannot access the raw card data, but can use the token with other compliant third parties. A typical use-case is to send the card data to a payment service provider (e.g. an Acquirer) for processing.Injection of sensitive data
The endpoint to forward the card data isPOST /api/pci/tokens/{id}/forward (see Forward card data for more details)..
This feature forwards your request to the third party and will inject the sensitive data on the fly. You define where to put the data using
placeholders.
The following table shows the available options:
| Placeholder | Description |
|---|---|
{{ account_number }} | The actual full account number of the stored card. |
{{ cardholder_name }} | The name of the cardholder. |
{{ expiry_year }} | Four digit year of the expiry date. |
{{ expiry_month }} | Two digit month of the expiry date. |
{{ security_code }} | The security code of the card in case it is present. |
Unwrapping data
All injected data will be represented as a string in the payload. If a specific data type is required, such as a numeric representation of the expiry month, the data can be unwrapped and converted back to its original type as needed:{{ expiry_month | unwrap }}
HTTP Headers
Guardian forwards all headers from the request, except those it uses internally (e.g.x-api-key). To override these internal headers,
you can provide a key-value pair that replaces the original header with your custom value.
The following example demonstrates this situation. The call to Guardian requires the API key in the header, but the destination requires
a another API key, which uses the same header key. In this case you can use the x-own-header-name and x-own-header-value headers to override
the original header.
x-api-key: 123456... will be set, replacing Guardian’s internal x-api-key header.