Set an encrypted card PIN
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
encrypted_key: '<string>',
encrypted_pin: '<string>',
iv: '<string>',
key_id: '<string>'
})
};
fetch('https://core.prod.gnosispay.com/partner-api/v1/pci/cards/{card_id}/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/partner-api/v1/pci/cards/{card_id}/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"encrypted_key": "<string>",
"encrypted_pin": "<string>",
"iv": "<string>",
"key_id": "<string>"
}
'import requests
url = "https://core.prod.gnosispay.com/partner-api/v1/pci/cards/{card_id}/pin"
payload = {
"encrypted_key": "<string>",
"encrypted_pin": "<string>",
"iv": "<string>",
"key_id": "<string>"
}
headers = {
"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/partner-api/v1/pci/cards/{card_id}/pin"
payload := strings.NewReader("{\n \"encrypted_key\": \"<string>\",\n \"encrypted_pin\": \"<string>\",\n \"iv\": \"<string>\",\n \"key_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/partner-api/v1/pci/cards/{card_id}/pin")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"encrypted_key\": \"<string>\",\n \"encrypted_pin\": \"<string>\",\n \"iv\": \"<string>\",\n \"key_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/partner-api/v1/pci/cards/{card_id}/pin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"encrypted_key\": \"<string>\",\n \"encrypted_pin\": \"<string>\",\n \"iv\": \"<string>\",\n \"key_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"reason": "<string>"
}PCI
Set an encrypted card PIN
Sets a new PIN for a fully provisioned card.
Encode the new PIN as an ISO 9564 format 2 PIN block, encrypt it with a new
AES-256 session key, and wrap that key with one of the RSA-OAEP keys returned
by GET /pci/public-key.
This route is available only to approved PCI integrations. Never send or log the plaintext PIN.
POST
/
v1
/
pci
/
cards
/
{card_id}
/
pin
Set an encrypted card PIN
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
encrypted_key: '<string>',
encrypted_pin: '<string>',
iv: '<string>',
key_id: '<string>'
})
};
fetch('https://core.prod.gnosispay.com/partner-api/v1/pci/cards/{card_id}/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/partner-api/v1/pci/cards/{card_id}/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"encrypted_key": "<string>",
"encrypted_pin": "<string>",
"iv": "<string>",
"key_id": "<string>"
}
'import requests
url = "https://core.prod.gnosispay.com/partner-api/v1/pci/cards/{card_id}/pin"
payload = {
"encrypted_key": "<string>",
"encrypted_pin": "<string>",
"iv": "<string>",
"key_id": "<string>"
}
headers = {
"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/partner-api/v1/pci/cards/{card_id}/pin"
payload := strings.NewReader("{\n \"encrypted_key\": \"<string>\",\n \"encrypted_pin\": \"<string>\",\n \"iv\": \"<string>\",\n \"key_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/partner-api/v1/pci/cards/{card_id}/pin")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"encrypted_key\": \"<string>\",\n \"encrypted_pin\": \"<string>\",\n \"iv\": \"<string>\",\n \"key_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.prod.gnosispay.com/partner-api/v1/pci/cards/{card_id}/pin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"encrypted_key\": \"<string>\",\n \"encrypted_pin\": \"<string>\",\n \"iv\": \"<string>\",\n \"key_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"reason": "<string>"
}Path Parameters
The card ID.
Body
application/json
Encrypted session key and encrypted PIN block.
Base64-encoded RSA-OAEP encrypted AES-256 session key.
AES-GCM encrypted PIN in PIN Block 2 format (Base64-encoded).
Base64-encoded initialization vector used for AES-GCM encryption.
Id of the encryption_keys entry that wrapped encrypted_key.
Response
There is no content to send for this request, but the headers may be useful.