- Get card details —
POST /api/v0/cards/{customerId}/{cardId}/details. - Issue a single-use card — the first
201response includesencryptedCard, once.
Register your public key
You do this once, and again when you rotate your key.1
Create an RSA key pair of at least 2048 bits
Keep the private key on your servers.
2
Send the public key to Endl support
Send
card-details-public.pem (PEM, BEGIN PUBLIC KEY). You can also give a
keyId label of up to 64 characters. Without one, the keyId is the first 16 hex
characters of the SHA-256 hash of the public key (DER).keyId.
Keys are per environment: register one key for sandbox and another for production.
Without a registered key, card details and single-use card creation return
400 ERRCRD_1004.
EncryptedCard object
All binary values are standard Base64 with padding.Decrypt the card details
-
Decrypt
encryptedKeywith your private key, using RSA-OAEP with SHA-256 (and MGF1 with SHA-256). This gives a 32-byte AES key. -
Decrypt
ciphertextwith that key using AES-256-GCM, withiv,tag, and the UTF-8 bytes ofaadas additional authenticated data. -
Check that
aadis the card id you asked for. -
The result is JSON: