Getnet DocsGetnet Docs

Generate Cryptogram

POST/dpm/tsp/v1/tokenization/crypt

__Generate Cryptogram__<br><br>This endpoint requests a cryptogram from the card brand's Token Service Provider (TSP) for a previously generated network token. Send the cryptogram in the `tokenization` object of the payment request.<br><br>**Usage Scenarios:**<br>- Obtaining the cryptogram required to authorize a payment made with a network token.<br><br>**Notes:**<br>- The `network_token_id` sent here must come from [Generate Network Token](#tag/network-token/post/dpm/tsp/v1/tokenization/token).<br>- The token and cryptogram must come from the same TSP; Getnet cannot process a token and cryptogram issued by different providers.

Body application/json

network_token_idstringrequired

Value of the `network_token_id` returned by Generate Network Token.

transaction_typestringrequired

Indicates whether the transaction was initiated by the customer or by the merchant.

cryptogram_typestringrequired

Brand-specific cryptogram type requested from the TSP.

amountintegerrequired

Transaction amount, in cents, that the cryptogram is generated for.

customer_idstring

Buyer identifier. Application-defined information that consumes the Digital Platform API.

emailstring

Buyer's email address.

card_brandstringrequired

Card brand of the network token the cryptogram is generated for.

currency_codestringrequired

ISO 4217 numeric currency code for the transaction the cryptogram is generated for.

Response

Cryptogram generated successfully.

cryptogramstring

Cryptogram value generated by the TSP for the given network token and transaction. Send it in the payment request's `tokenization.cryptogram` field.

token_pan_cardstring

Network token PAN issued by the card brand's Token Service Provider (TSP). Use it in the payment request's `card.number` field in place of the raw PAN.

token_expiration_monthstring

Two-digit expiration month of the network token.

token_expiration_yearstring

Four-digit expiration year of the network token.

token_statusstring

Status of the network token.

Invalid request.

messagestring

Detailed error message.

namestring

Name of the module or service that returned the error.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Network tokenization error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Short description of the error.

description_detailstring

Specific reason the network token or cryptogram request failed, naming the invalid field or the token service provider's denial reason.

Invalid Authentication.

messagestring

Detailed error message.

namestring

Name of the module or service that returned the error.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Network tokenization error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Short description of the error.

description_detailstring

Specific reason the network token or cryptogram request failed, naming the invalid field or the token service provider's denial reason.

Unprocessable Entity

messagestring

Detailed error message.

namestring

Name of the module or service that returned the error.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Network tokenization error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Short description of the error.

description_detailstring

Specific reason the network token or cryptogram request failed, naming the invalid field or the token service provider's denial reason.

Internal server or service error.

messagestring

Detailed error message.

namestring

Name of the module or service that returned the error.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Network tokenization error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Short description of the error.

description_detailstring

Specific reason the network token or cryptogram request failed, naming the invalid field or the token service provider's denial reason.

Request
curl -X POST "https://api.pre.globalgetnet.com/dpm/tsp/v1/tokenization/crypt" \
  -H "Content-Type: application/json" \
  -d '{
  "network_token_id": "e2f8d96768a84a02b82f7ba1d079b05c",
  "transaction_type": "CIT",
  "cryptogram_type": "VISA_TAVV",
  "amount": 9000,
  "customer_id": "088442880012",
  "email": "[email protected]",
  "card_brand": "visa",
  "currency_code": "968"
}'
Response
{
  "cryptogram": "MF5GJksAAJU1ASH4Eo7gAAADFAM=",
  "token_pan_card": "5204731618934544",
  "token_expiration_month": "12",
  "token_expiration_year": "2030",
  "token_status": "ACTIVE"
}