Set Card PIN
const options = {
method: 'POST',
headers: {
'X-Eip712-Signature': '<x-eip712-signature>',
'X-Eip712-Nonce': '<x-eip712-nonce>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
encryptedKey: '<string>',
encryptedPin: '<string>',
iv: '<string>',
keyId: '<string>'
})
};
fetch('https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Eip712-Nonce: <x-eip712-nonce>' \
--header 'X-Eip712-Signature: <x-eip712-signature>' \
--data '
{
"encryptedKey": "<string>",
"encryptedPin": "<string>",
"iv": "<string>",
"keyId": "<string>"
}
'import requests
url = "https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin"
payload = {
"encryptedKey": "<string>",
"encryptedPin": "<string>",
"iv": "<string>",
"keyId": "<string>"
}
headers = {
"X-Eip712-Signature": "<x-eip712-signature>",
"X-Eip712-Nonce": "<x-eip712-nonce>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin"
payload := strings.NewReader("{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<string>\",\n \"keyId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eip712-Signature", "<x-eip712-signature>")
req.Header.Add("X-Eip712-Nonce", "<x-eip712-nonce>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin")
.header("X-Eip712-Signature", "<x-eip712-signature>")
.header("X-Eip712-Nonce", "<x-eip712-nonce>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<string>\",\n \"keyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eip712-Signature"] = '<x-eip712-signature>'
request["X-Eip712-Nonce"] = '<x-eip712-nonce>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<string>\",\n \"keyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}PCI
Set Card PIN
Sets the card PIN. The caller encrypts the new PIN (in PIN Block 2 format)
with an AES session key, then RSA-OAEP encrypts the session key with the PCI
public key. The EIP-712 signature over a prior change-pin challenge is
passed via the X-Eip712-Signature / X-Eip712-Nonce headers.
POST
/
pci
/
cards
/
{cardId}
/
pin
Set Card PIN
const options = {
method: 'POST',
headers: {
'X-Eip712-Signature': '<x-eip712-signature>',
'X-Eip712-Nonce': '<x-eip712-nonce>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
encryptedKey: '<string>',
encryptedPin: '<string>',
iv: '<string>',
keyId: '<string>'
})
};
fetch('https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Eip712-Nonce: <x-eip712-nonce>' \
--header 'X-Eip712-Signature: <x-eip712-signature>' \
--data '
{
"encryptedKey": "<string>",
"encryptedPin": "<string>",
"iv": "<string>",
"keyId": "<string>"
}
'import requests
url = "https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin"
payload = {
"encryptedKey": "<string>",
"encryptedPin": "<string>",
"iv": "<string>",
"keyId": "<string>"
}
headers = {
"X-Eip712-Signature": "<x-eip712-signature>",
"X-Eip712-Nonce": "<x-eip712-nonce>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin"
payload := strings.NewReader("{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<string>\",\n \"keyId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eip712-Signature", "<x-eip712-signature>")
req.Header.Add("X-Eip712-Nonce", "<x-eip712-nonce>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin")
.header("X-Eip712-Signature", "<x-eip712-signature>")
.header("X-Eip712-Nonce", "<x-eip712-nonce>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<string>\",\n \"keyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/user-api/pci/cards/{cardId}/pin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eip712-Signature"] = '<x-eip712-signature>'
request["X-Eip712-Nonce"] = '<x-eip712-nonce>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<string>\",\n \"keyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Headers
EIP-712 signature over the change-pin challenge.
Nonce of the challenge that was signed.
Path Parameters
Body
application/json
Base64-encoded RSA-OAEP encrypted AES-256 session key.
AES-GCM encrypted PIN in PIN Block 2 format, Base64-encoded.
Base64-encoded AES-GCM initialization vector.
Id of the encryptionKeys entry that wrapped encryptedKey.
Response
There is no content to send for this request, but the headers may be useful.