List all saved cards
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards', 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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards",
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: Bearer <token>"
],
]);
$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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"cards": [
{
"card_sub_type": "<string>",
"extended_card_type": "<string>",
"nickname": "<string>",
"provider_category": "<string>",
"vault_provider": "<string>",
"card_reference": "<string>",
"card_type": "<string>",
"metadata": {
"origin_customer_id": "<string>",
"origin_merchant_id": "<string>"
},
"card_issuer": "<string>",
"card_token": "<string>",
"health": "<string>",
"card_exp_month": "<string>",
"mandate_support": true,
"provider": "<string>",
"card_sub_type_category": "<string>",
"expired": true,
"card_fingerprint": "<string>",
"tokenize_support": true,
"juspay_bank_code": "<string>",
"card_exp_year": "<string>",
"name_on_card": "<string>",
"country_code": "<string>",
"card_number": "<string>",
"card_isin": "<string>",
"card_brand": "<string>",
"card_issuer_country": "<string>",
"token": {
"tokenization_status": "<string>",
"support_token_transaction": true,
"last_four_digits": "<string>",
"cvv_less_support": true,
"vault_provider": "<string>",
"par": "<string>",
"card_reference": "<string>",
"expiry_month": "<string>",
"token_supported_gateways": [
"<string>"
],
"card_fingerprint": "<string>",
"cvv_less_details": [
{
"gateway": "<string>",
"gateway_reference_ids": [
"<string>"
]
}
],
"cvv_less_supported_gateways": [
"<string>"
],
"provision_token_id": "<string>",
"card_isin": "<string>",
"expiry_year": "<string>"
},
"tokens": [
{
"tokenization_status": "<string>",
"last_four_digits": "<string>",
"provider_category": "<string>",
"vault_provider": "<string>",
"par": "<string>",
"card_reference": "<string>",
"card_token": "<string>",
"expiry_month": "<string>",
"card_fingerprint": "<string>",
"provision_token_id": "<string>",
"card_isin": "<string>",
"expiry_year": "<string>"
}
],
"atm_pin_auth_support": true,
"direct_otp_support": true
}
]
}
}{
"message": "<string>",
"success": false,
"code": "<string>"
}{
"message": "<string>",
"success": true,
"code": "<string>"
}Customers
List all saved cards
Retrieve a list of saved payment cards for a given customer.
GET
/
customers
/
{customer_id}
/
cards
List all saved cards
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards', 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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards",
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: Bearer <token>"
],
]);
$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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"cards": [
{
"card_sub_type": "<string>",
"extended_card_type": "<string>",
"nickname": "<string>",
"provider_category": "<string>",
"vault_provider": "<string>",
"card_reference": "<string>",
"card_type": "<string>",
"metadata": {
"origin_customer_id": "<string>",
"origin_merchant_id": "<string>"
},
"card_issuer": "<string>",
"card_token": "<string>",
"health": "<string>",
"card_exp_month": "<string>",
"mandate_support": true,
"provider": "<string>",
"card_sub_type_category": "<string>",
"expired": true,
"card_fingerprint": "<string>",
"tokenize_support": true,
"juspay_bank_code": "<string>",
"card_exp_year": "<string>",
"name_on_card": "<string>",
"country_code": "<string>",
"card_number": "<string>",
"card_isin": "<string>",
"card_brand": "<string>",
"card_issuer_country": "<string>",
"token": {
"tokenization_status": "<string>",
"support_token_transaction": true,
"last_four_digits": "<string>",
"cvv_less_support": true,
"vault_provider": "<string>",
"par": "<string>",
"card_reference": "<string>",
"expiry_month": "<string>",
"token_supported_gateways": [
"<string>"
],
"card_fingerprint": "<string>",
"cvv_less_details": [
{
"gateway": "<string>",
"gateway_reference_ids": [
"<string>"
]
}
],
"cvv_less_supported_gateways": [
"<string>"
],
"provision_token_id": "<string>",
"card_isin": "<string>",
"expiry_year": "<string>"
},
"tokens": [
{
"tokenization_status": "<string>",
"last_four_digits": "<string>",
"provider_category": "<string>",
"vault_provider": "<string>",
"par": "<string>",
"card_reference": "<string>",
"card_token": "<string>",
"expiry_month": "<string>",
"card_fingerprint": "<string>",
"provision_token_id": "<string>",
"card_isin": "<string>",
"expiry_year": "<string>"
}
],
"atm_pin_auth_support": true,
"direct_otp_support": true
}
]
}
}{
"message": "<string>",
"success": false,
"code": "<string>"
}{
"message": "<string>",
"success": true,
"code": "<string>"
}Was this page helpful?
โI