Cards Get card sensitive details
Get card sensitive details
Returns the full card number and CVV, encrypted to your RSA public key. The decrypted text is `{"pan": "...", "cvv": "..."}`; it has no expiry. Decrypt it only in a secure client, and never log it.
Api-Key
Path parameters
NameDescription
card_idID of the card
Headers
NameDescription
X-Client-Public-KeyYour RSA public key in PEM form (
PUBLIC KEY or RSA PUBLIC KEY), then base64-encoded with the standard alphabet. Use a key of 2048 bits or more.Response
Returns 200 OK. The encrypted details
NameDescription
dataDecrypt
encrypted_key with your RSA private key (RSA-OAEP, SHA-256) to get an AES-256 key. Then decrypt ciphertext with AES-256-GCM using nonce (12 bytes); the last 16 bytes of ciphertext are the tag. All three values are standard base64.Show 3 child attributesobject
encrypted_keynonceciphertexterrorErrors
| Status | Meaning |
|---|---|
| 200 | The encrypted details |
| 400 | Missing or invalid key header, or an unknown card |
Was this page helpful? Yes No
Previous
Next
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request GET \
--url 'https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details' \
--header 'Api-Key: <api-key>' \
--header 'X-Client-Public-Key: LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K...'
const response = await fetch('https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details', {
method: 'GET',
headers: {
'Api-Key': '<api-key>',
'X-Client-Public-Key': 'LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K...',
},
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details"
headers = {
"Api-Key": "<api-key>",
"X-Client-Public-Key": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K...",
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details", nil)
if err != nil {
panic(err)
}
req.Header.Set("Api-Key", "<api-key>")
req.Header.Set("X-Client-Public-Key", "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K...")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "net/http"
require "uri"
uri = URI("https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
request["Api-Key"] = "<api-key>"
request["X-Client-Public-Key"] = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K..."
response = http.request(request)
puts response.code
puts response.body
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Api-Key: <api-key>',
'X-Client-Public-Key: LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K...',
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details"))
.header("Api-Key", "<api-key>")
.header("X-Client-Public-Key", "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K...")
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.gravv.xyz/v1/cards/dce0192a-9b3d-440b-9500-33dc9ac8dc20/sensitive-details");
request.Headers.TryAddWithoutValidation("Api-Key", "<api-key>");
request.Headers.TryAddWithoutValidation("X-Client-Public-Key", "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K...");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
200400OK
{
"data": {
"encrypted_key": "string",
"nonce": "string",
"ciphertext": "string"
},
"error": {}
}
{
"data": null,
"error": "x_client_public_key is required"
}