Retrieve account card
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}', 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://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"token": "my_credit_card_token1234",
"user_token": "user1234",
"created_time": "2024-09-03T19:39:53.719Z",
"updated_time": "2024-09-03T19:39:53.719Z",
"account_token": "my_account_token_12"
}{
"code": 123,
"message": "<string>"
}Account Cards
Retrieve account card
Retrieve a credit card for a credit account.
GET
/
credit
/
accounts
/
{account_token}
/
cards
/
{card_token}
Retrieve account card
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}', 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://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/cards/{card_token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"token": "my_credit_card_token1234",
"user_token": "user1234",
"created_time": "2024-09-03T19:39:53.719Z",
"updated_time": "2024-09-03T19:39:53.719Z",
"account_token": "my_account_token_12"
}{
"code": 123,
"message": "<string>"
}GET/////
Retrieve a credit card for a credit account.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account for which to retrieve a credit card. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
| card_token string Required | Unique identifier of the credit card to retrieve. Send a GET request to /credit/accounts/{account_token}/cards to retrieve existing credit card tokens.Allowable Values: Existing card token |
Response body
| Fields | Description |
|---|---|
| token string Returned | Unique identifier of the credit card. Allowable Values: 36 char max |
| account_token string Returned | Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
| user_token string Returned | Unique identifier of the credit cardholder. Allowable Values: Existing user token |
| created_time datetime Returned | Date and time when the card was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| updated_time datetime Returned | Date and time when the card was last modified on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"token": "my_credit_card_token1234",
"account_token": "my_account_token_12",
"user_token": "user1234",
"created_time": "2024-09-03T19:39:53.719Z",
"updated_time": "2024-09-03T19:39:53.719Z"
}
Authorizations
Path Parameters
Response
Expected response to a valid request.
Information about a credit card.
Was this page helpful?