Register user
curl --request POST \
--url https://api.digitalreceiptprotocol.org/api/v1/onboarding/register \
--header 'Content-Type: application/json' \
--data '
{
"hashedPan": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...",
"keyId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
}
'import requests
url = "https://api.digitalreceiptprotocol.org/api/v1/onboarding/register"
payload = {
"hashedPan": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...",
"keyId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
hashedPan: '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
publicKey: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...',
keyId: 'a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d'
})
};
fetch('https://api.digitalreceiptprotocol.org/api/v1/onboarding/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.digitalreceiptprotocol.org/api/v1/onboarding/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hashedPan' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
'publicKey' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...',
'keyId' => 'a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.digitalreceiptprotocol.org/api/v1/onboarding/register"
payload := strings.NewReader("{\n \"hashedPan\": \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",\n \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...\",\n \"keyId\": \"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.digitalreceiptprotocol.org/api/v1/onboarding/register")
.header("Content-Type", "application/json")
.body("{\n \"hashedPan\": \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",\n \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...\",\n \"keyId\": \"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.digitalreceiptprotocol.org/api/v1/onboarding/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"hashedPan\": \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",\n \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...\",\n \"keyId\": \"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"userId": "usr_f8e7d6c5-b4a3-4c2d-1e0f-9a8b7c6d5e4f",
"status": "active",
"registeredAt": "2025-12-18T10:30:00Z"
}
}User Onboarding (Card Issuer)
Register User
Register a new user with their hashed PAN and public key. The hashed PAN is a unique identifier derived from the user’s Primary Account Number. The public key must be from a previously generated key pair.
POST
/
api
/
v1
/
onboarding
/
register
Register user
curl --request POST \
--url https://api.digitalreceiptprotocol.org/api/v1/onboarding/register \
--header 'Content-Type: application/json' \
--data '
{
"hashedPan": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...",
"keyId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
}
'import requests
url = "https://api.digitalreceiptprotocol.org/api/v1/onboarding/register"
payload = {
"hashedPan": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...",
"keyId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
hashedPan: '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
publicKey: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...',
keyId: 'a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d'
})
};
fetch('https://api.digitalreceiptprotocol.org/api/v1/onboarding/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.digitalreceiptprotocol.org/api/v1/onboarding/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hashedPan' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
'publicKey' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...',
'keyId' => 'a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.digitalreceiptprotocol.org/api/v1/onboarding/register"
payload := strings.NewReader("{\n \"hashedPan\": \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",\n \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...\",\n \"keyId\": \"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.digitalreceiptprotocol.org/api/v1/onboarding/register")
.header("Content-Type", "application/json")
.body("{\n \"hashedPan\": \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",\n \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...\",\n \"keyId\": \"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.digitalreceiptprotocol.org/api/v1/onboarding/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"hashedPan\": \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",\n \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3...\",\n \"keyId\": \"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"userId": "usr_f8e7d6c5-b4a3-4c2d-1e0f-9a8b7c6d5e4f",
"status": "active",
"registeredAt": "2025-12-18T10:30:00Z"
}
}Body
application/json
Hashed PAN (Primary Account Number) used as unique identifier
Example:
"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
Base64-encoded public key from generate-keys endpoint
Example:
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."
Key ID from generate-keys endpoint
Example:
"550e8400-e29b-41d4-a716-446655440000"
⌘I