Security Public Key

Retrieve Vixzz's active RSA-2048 public key to encrypt transaction PINs for B2C payouts and float transfers. Protects business balances from compromised API keys.

GET/v1/security/public-keyLive & Sandbox

Request Headers

HeaderTypeStatusDescription
AuthorizationstringRequiredBearer vxz_tok_* (OAuth 2.0 Scoped Bearer Token)
Content-TypestringRequiredapplication/json

Encryption Specifications

AttributeSpecificationNotes
AlgorithmRSA-OAEP2048-bit key size
Hash DigestSHA-256OAEP padding with SHA-256
EncodingBase64Standard Base64 output string

Request Code Snippets (cURL, Node, Python, PHP, Go)

Public Key Request
curl -X GET https://developer.vixzz.com/v1/security/public-key \
  -H "Authorization: Bearer vxz_tok_b2c_0a5l1n3m8x2z"

JSON Return Response Body (200 OK)

Public Key Response
{
  "success": true,
  "keyId": "key_rsa_2026_pub",
  "algorithm": "RSA-OAEP-256",
  "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0k9...\n-----END PUBLIC KEY-----",
  "fingerprint": "SHA256:7m8N9x2K1vL5q8...",
  "expiresAt": "2027-01-01T00:00:00Z"
}
Node.js PIN Encryption Helper
import crypto from 'crypto';

export function encryptTransactionPin(pin, publicKeyPem) {
  const buffer = Buffer.from(pin, 'utf8');
  const encrypted = crypto.publicEncrypt(
    {
      key: publicKeyPem,
      padding: crypto.constants.RSA_PKCS1_OAEP_PADDING,
      oaepHash: 'sha256'
    },
    buffer
  );
  return encrypted.toString('base64');
}