Skip to main content

Get Public Key For Encryption

Name: Retrieve RSA Public Key for Payload Encryption

Method : GET

Url : {{BASE_URL}}/api/v1/payload-encryption-public-key?merchantAccountId={{your_account_no}}

Username : App Key

Password : Secret Key

{
"success": true,
"message": "Public key retrieved successfully",
"data": {
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvK7X+z5T6O... (truncated) ...\n-----END PUBLIC KEY-----",
"key_id": "key_20240101_001",
"algorithm": "RSA-OAEP-256"
}
}
warning

Note: This public key is used to encrypt sensitive data (like card numbers and CVV) before sending it to the Hosted Fields or S2S APIs. Ensure you use the RSA-OAEP-256 padding scheme for encryption.