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>'})
};
fetch('https://api.example.com/pci/cards/{cardId}/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.example.com/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>"
}
'import requests
url = "https://api.example.com/pci/cards/{cardId}/pin"
payload = {
"encryptedKey": "<string>",
"encryptedPin": "<string>",
"iv": "<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://api.example.com/pci/cards/{cardId}/pin"
payload := strings.NewReader("{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<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://api.example.com/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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/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}"
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. Proxied to
partner-api over HTTP.
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>'})
};
fetch('https://api.example.com/pci/cards/{cardId}/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.example.com/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>"
}
'import requests
url = "https://api.example.com/pci/cards/{cardId}/pin"
payload = {
"encryptedKey": "<string>",
"encryptedPin": "<string>",
"iv": "<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://api.example.com/pci/cards/{cardId}/pin"
payload := strings.NewReader("{\n \"encryptedKey\": \"<string>\",\n \"encryptedPin\": \"<string>\",\n \"iv\": \"<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://api.example.com/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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/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}"
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
Response
There is no content to send for this request, but the headers may be useful.
⌘I