CARD-AS-A-SERVICE Copy Page
Retrieve sensitive card details
GET https://production.dutchapi.co/v1/cards/{id}/details
Retrieves the full card number, expiry and security code for a card belonging to the authenticated business. Grant this scope only to trusted project keys.
🔒 Send the project API key as a Bearer token and your Business ID with this call.
Responses
200 403
{
"data": {
"number": "4111111111111234",
"expiryMonth": "08",
"expiryYear": "29",
"cvv": "123"
}
}
{
"error": "insufficient_scope",
"message": "This project key is not allowed to do that."
}
Errors Status error Meaning 403 insufficient_scopeThis project key is not allowed to do that. 404 card_not_foundNo card with that ID belongs to this business. 503 card_details_unavailableCard details are temporarily unavailable.
Language Shell Node Ruby PHP Python
Credentials Bearer
curl --request GET --url "https://production.dutchapi.co/v1/cards/{id}/details" \
--header "Authorization: Bearer $DUTCH_PROJECT_KEY" \
--header "X-Business-Id: $DUTCH_BUSINESS_ID"const res = await fetch("https://production.dutchapi.co/v1/cards/{id}/details", {
method: "GET",
headers: {
"Authorization": "Bearer " + process.env.DUTCH_PROJECT_KEY,
"X-Business-Id": process.env.DUTCH_BUSINESS_ID,
}
});
console.log(await res.json());require "net/http"
require "json"
uri = URI("https://production.dutchapi.co/v1/cards/{id}/details")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch('DUTCH_PROJECT_KEY')}"
req["X-Business-Id"] = ENV.fetch("DUTCH_BUSINESS_ID")
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body<?php
$ch = curl_init("https://production.dutchapi.co/v1/cards/{id}/details");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("DUTCH_PROJECT_KEY"),
"X-Business-Id: " . getenv("DUTCH_BUSINESS_ID")],
]);
echo curl_exec($ch);import os, requests
res = requests.request(
"GET",
"https://production.dutchapi.co/v1/cards/{id}/details",
headers={
"Authorization": "Bearer " + os.environ["DUTCH_PROJECT_KEY"],
"X-Business-Id": os.environ["DUTCH_BUSINESS_ID"],
}
)
print(res.json())
Show example
Response Click `Show example` to see an example response. Nothing is sent from this page: endpoints are live, so run real requests from your own code with small amounts.
200 - Result 403 - Result
Table of Contents Responses Errors