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..."
}'
const response = await fetch(
"https://api.chipipay.com/v1/chipi-wallets/update-encryption-details",
{
method: "PATCH",
headers: {
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
externalUserId: "user_123",
newEncryptedPrivateKey: "U2FsdGVkX1+newEncryptedKey..."
})
}
);
import requests
response = requests.patch(
"https://api.chipipay.com/v1/chipi-wallets/update-encryption-details",
headers={
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
"Content-Type": "application/json"
},
json={
"externalUserId": "user_123",
"newEncryptedPrivateKey": "U2FsdGVkX1+newEncryptedKey..."
}
)
{
"success": true
}
Wallets
Update Wallet Encryption
Replace the stored encrypted private key after a passkey or PIN change
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..."
}'
const response = await fetch(
"https://api.chipipay.com/v1/chipi-wallets/update-encryption-details",
{
method: "PATCH",
headers: {
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
externalUserId: "user_123",
newEncryptedPrivateKey: "U2FsdGVkX1+newEncryptedKey..."
})
}
);
import requests
response = requests.patch(
"https://api.chipipay.com/v1/chipi-wallets/update-encryption-details",
headers={
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
"Content-Type": "application/json"
},
json={
"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..."
}'
const response = await fetch(
"https://api.chipipay.com/v1/chipi-wallets/update-encryption-details",
{
method: "PATCH",
headers: {
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
externalUserId: "user_123",
newEncryptedPrivateKey: "U2FsdGVkX1+newEncryptedKey..."
})
}
);
import requests
response = requests.patch(
"https://api.chipipay.com/v1/chipi-wallets/update-encryption-details",
headers={
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
"Content-Type": "application/json"
},
json={
"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
Bearer token — use your secret key (sk_prod_xxx) for server-side calls, or the user's JWT for client-side calls
Your Chipi public API key (pk_xxx)
Body
application/json
Your application's user identifier
The private key re-encrypted with the new passkey or PIN
Wallet public key (required when the user has multiple wallets)
The passkey that now encrypts the key (after a migration or a recovery). Omit to keep the stored one. A user JWT may change it only for its own user.
Whether that passkey derives the key with PRF. Omit to keep the stored value.
Omit to keep the stored value.
Available options:
passkey, pin, passkey+pin Response
Encryption updated
Whether the update succeeded
Was this page helpful?
⌘I
