Update card PIN
curl --request PUT \
--url https://api.qash.ai/api/v1/cards/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '{
"pin": "9876"
}'const options = {
method: 'PUT',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({pin: '9876'})
};
fetch('https://api.qash.ai/api/v1/cards/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.qash.ai/api/v1/cards/pin"
payload = { "pin": "9876" }
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true
}Cards
Update card PIN
Change the PIN of the authenticated user’s primary card.
PUT
/
api
/
v1
/
cards
/
pin
Update card PIN
curl --request PUT \
--url https://api.qash.ai/api/v1/cards/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '{
"pin": "9876"
}'const options = {
method: 'PUT',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({pin: '9876'})
};
fetch('https://api.qash.ai/api/v1/cards/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.qash.ai/api/v1/cards/pin"
payload = { "pin": "9876" }
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true
}Requires
Authorization: Bearer <user-access-token> — the token from Verify login code.Pass
x-idempotency-key with a unique UUID per request. Without it, duplicate-request detection is skipped and a retried call may change the PIN twice.cardId is sent, the new PIN is applied to every active card the user has, not just the primary card.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique idempotency key for the operation. Use a UUID to prevent duplicate processing.
Query Parameters
Target a specific card (Rain card id) instead of the primary card.
Body
application/json
New PIN, 4 to 12 digits.
New PIN, 4 to 12 digits.
Pattern:
^\d{4,12}$Example:
"9876"
Response
PIN updated successfully.
Example:
true
Representative card id when no cardId was targeted.
Example:
"8567"
Number of active cards updated (present when no cardId is sent).
Example:
1
Example:
0