Skip to main content
PATCH
/
chipi-wallets
/
update-encryption-details
curl -X PATCH "https://api.chipipay.com/v1/chipi-wallets/update-encryption-details" \
  -H "Authorization: Bearer sk_prod_xxxx" \
  -H "x-api-key: pk_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "externalUserId": "user_123",
    "newEncryptedPrivateKey": "U2FsdGVkX1+newEncryptedKey..."
  }'
{
  "success": true
}
curl -X PATCH "https://api.chipipay.com/v1/chipi-wallets/update-encryption-details" \
  -H "Authorization: Bearer sk_prod_xxxx" \
  -H "x-api-key: pk_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "externalUserId": "user_123",
    "newEncryptedPrivateKey": "U2FsdGVkX1+newEncryptedKey..."
  }'
{
  "success": true
}
After calling this endpoint, the previous passkey or PIN used to encrypt the private key will no longer work. Make sure the new encryption is persisted before discarding the old key material.

Authorizations

Authorization
string
header
required

Bearer token — use your secret key (sk_prod_xxx) for server-side calls, or the user's JWT for client-side calls

x-api-key
string
header
required

Your Chipi public API key (pk_xxx)

Body

application/json
externalUserId
string
required

Your application's user identifier

newEncryptedPrivateKey
string
required

The private key re-encrypted with the new passkey or PIN

publicKey
string

Wallet public key (required when the user has multiple wallets)

Response

Encryption updated

success
boolean

Whether the update succeeded