Customer Payment Methods
Get customer payment token information
Retrieves payment method token information for a specific customer. This endpoint returns the customer’s stored payment tokens used for recurring membership billing.
Key Information Returned:
- Customer ID: Shopify customer identifier
- Payment Tokens: List of stored payment method tokens
- Payment Method Details: Last 4 digits, card type, expiration
- Default Payment Method: Primary payment method for memberships
- Token Status: Active, expired, or failed payment methods
- Payment Gateway: Stripe, Shopify Payments, etc.
Payment Token Information:
- Token ID: Unique identifier for the payment method
- Card Brand: Visa, Mastercard, Amex, etc.
- Last 4 Digits: Masked card number ending
- Expiry Date: Card expiration month and year
- Billing Address: Associated billing address details
- Created Date: When payment method was added
Use Cases:
- Display saved payment methods in customer portal
- Validate payment method availability before billing
- Allow customers to select from existing payment methods
- Sync payment data with external CRM or billing systems
- Build custom payment management interfaces
- Trigger payment update reminders for expiring cards
Security Note: This endpoint only returns tokenized payment information. Full card numbers are never exposed via the API.
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
GET
/
api
/
external
/
v2
/
customer-payments
/
token
/
{customerId}
Get customer payment token information
curl --request GET \
--url https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}import requests
url = "https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"customerId": 123,
"token": "<string>"
}{
"customerId": 123,
"token": "<string>"
}{
"customerId": 123,
"token": "<string>"
}{
"customerId": 123,
"token": "<string>"
}Headers
API Key for authentication (Preferred method - use this instead of api_key parameter)
Path Parameters
Shopify customer ID
Query Parameters
API Key (Deprecated - Use Header X-API-Key instead)
⌘I
Get customer payment token information
curl --request GET \
--url https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}import requests
url = "https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://membership-admin.appstle.com/api/external/v2/customer-payments/token/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"customerId": 123,
"token": "<string>"
}{
"customerId": 123,
"token": "<string>"
}{
"customerId": 123,
"token": "<string>"
}{
"customerId": 123,
"token": "<string>"
}