List Payment Methods
List the cards your shoppers have stored
GET
/
api
/
v2
/
payment-methods
List Payment Methods
curl --request GET \
--url https://api.example.com/api/v2/payment-methodsimport requests
url = "https://api.example.com/api/v2/payment-methods"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/payment-methods', 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://api.example.com/api/v2/payment-methods",
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://api.example.com/api/v2/payment-methods"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/payment-methods")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/payment-methods")
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_bodyList Payment Methods
Returns the payment methods stored for your account in the mode of the API key (test or live).Endpoint
GET /api/v2/payment-methods
Authentication
Authorization: Bearer glm_test_YOUR_API_KEY
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
checkout_id | string | No | Only the payment method stored by this checkout |
customer_email | string | No | Only payment methods stored by this customer |
limit | integer | No | Maximum number to return, 1 to 100 |
Response
{
"success": true,
"data": [
{
"id": "pm_fc61f9c445dd477287c47052087dc91c",
"type": "card",
"brand": "visa",
"last4": "1111",
"exp_month": "03",
"exp_year": "2030",
"usage": "off_session",
"status": "active",
"checkout_id": "cs_abc123",
"customer_email": "jane@example.com",
"last_used_at": "2026-12-10T09:15:02Z",
"created_at": "2026-11-10T21:04:11Z"
}
]
}
Example
curl "https://api.withgale.com/api/v2/payment-methods?customer_email=jane@example.com" \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Errors
| Status Code | Error Code | Description |
|---|---|---|
| 401 | unauthorized | Invalid API key |
| 404 | PAYMENT_METHOD_001 | Saved payment methods are not enabled for this account |
Related
⌘I
List Payment Methods
curl --request GET \
--url https://api.example.com/api/v2/payment-methodsimport requests
url = "https://api.example.com/api/v2/payment-methods"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/payment-methods', 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://api.example.com/api/v2/payment-methods",
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://api.example.com/api/v2/payment-methods"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/payment-methods")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/payment-methods")
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