List Payment Links
Retrieve a list of all payment links with optional filtering
GET
/
api
/
v2
/
payment-links
List Payment Links
curl --request GET \
--url https://api.example.com/api/v2/payment-linksimport requests
url = "https://api.example.com/api/v2/payment-links"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/payment-links', 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-links",
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-links"
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-links")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/payment-links")
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 Links
Returns a paginated list of payment links, ordered by creation date (most recent first). Supports filtering by status, customer, and date range.Authentication
Authorization: Bearer glm_test_YOUR_API_KEY
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results per page (default: 10, max: 100) |
starting_after | string | Cursor for pagination (payment link ID) |
status | enum | Filter by status: active, paid, expired, cancelled |
customer_email | string | Filter by customer email |
payment_type | enum | Filter by type: one_time, subscription |
created_after | timestamp | Filter links created after this date |
created_before | timestamp | Filter links created before this date |
Response
All monetary amounts are integers in cents (e.g., 4995 = $49.95).
{
"data": [
{
"id": "plink_abc123",
"url": "https://checkout.withgale.com/pay/plink_abc123",
"amount": 4995,
"currency": "USD",
"description": "Blood Pressure Monitor",
"payment_type": "one_time",
"status": "paid",
"customer": {
"email": "customer@example.com"
},
"order": {
"id": "ord_xyz789"
},
"created_at": "2026-02-25T14:30:00Z",
"paid_at": "2026-02-25T15:30:00Z"
}
],
"has_more": true,
"next_cursor": "plink_abc123"
}
Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Array of payment link objects |
has_more | boolean | Whether more results are available |
next_cursor | string | Cursor for next page (use as starting_after) |
Examples
List All
curl https://api.withgale.com/api/v2/payment-links \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Filter by Status
curl "https://api.withgale.com/api/v2/payment-links?status=paid&limit=50" \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Filter by Customer
curl "https://api.withgale.com/api/v2/payment-links?customer_email=jane@example.com" \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Errors
| Status Code | Error Code | Description |
|---|---|---|
| 400 | invalid_request | Invalid query parameters |
| 401 | unauthorized | Invalid or missing API key |
Related
โI
List Payment Links
curl --request GET \
--url https://api.example.com/api/v2/payment-linksimport requests
url = "https://api.example.com/api/v2/payment-links"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/payment-links', 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-links",
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-links"
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-links")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/payment-links")
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