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
| Parameter | Required | Description | Example |
|---|---|---|---|
card_no | Yes | Card number to encrypt. | 5061240000000000000 |
cvv | Yes | Card verification value. | 123 |
expiry_month | Yes | Card expiry month in MM format. | 08 |
expiry_year | Yes | Card expiry year in YY format. | 28 |
pin | Yes | Card 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
| Field | Description |
|---|---|
message | Indicates the result of the encryption operation. |
card_data | Encrypted card details to use in the subsequent card payment request. |
Notes
- Submit card details over a secure connection.
- Use the returned
card_datain 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.
Updated about 1 month ago
Did this page help you?
