Encrypt Data

This endpoint encrypts card details before they are submitted to LedgerBlock for card collection. Use the returned card_data value in the subsequent card payment request.

Request

POST {{base_url}}/test-card-encrypt

Request Body

ParameterRequiredDescriptionExample
card_noYesCard number to encrypt.5061240000000000000
cvvYesCard verification value.123
expiry_monthYesCard expiry month in MM format.08
expiry_yearYesCard expiry year in YY format.28
pinYesCard PIN used for the payment flow, where required.1234

Example Request

{
  "card_no": "5061240000000000000",
  "cvv": "123",
  "expiry_month": "10",
  "expiry_year": "29",
  "pin": "1234"
}

Example Response

{
  "message": "encrypted",
  "card_data": "{{encrypted_card_data}}"
}

Response Parameters

FieldDescription
messageIndicates the result of the encryption operation.
card_dataEncrypted card details to use in the subsequent card payment request.

Notes

  • Submit card details over a secure connection.
  • Use the returned card_data in the card collection request instead of sending the raw card details.
  • The response example uses a placeholder for the encrypted value. Encrypted output will vary depending on the card data and encryption process.

Did this page help you?