Get Payment Link
Retrieve details about a specific payment link
GET
/
api
/
v2
/
payment-links
/
{id}
Get Payment Link
curl --request GET \
--url https://api.example.com/api/v2/payment-links/{id}import requests
url = "https://api.example.com/api/v2/payment-links/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/payment-links/{id}', 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/{id}",
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/{id}"
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/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/payment-links/{id}")
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_bodyGet Payment Link
Retrieve information about a payment link, including its current status and payment details.Authentication
Authorization: Bearer glm_test_YOUR_API_KEY
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Payment link ID (e.g., plink_abc123xyz) |
Response
All monetary amounts are integers in cents (e.g., 4995 = $49.95).
{
"id": "plink_abc123xyz",
"url": "https://checkout.withgale.com/pay/plink_abc123xyz",
"amount": 4995,
"currency": "USD",
"description": "Premium Blood Pressure Monitor",
"payment_type": "one_time",
"status": "paid",
"customer": {
"email": "customer@example.com",
"first_name": "Jane",
"last_name": "Doe"
},
"products": [
{
"merchant_product_id": "BP-MONITOR-001",
"name": "Blood Pressure Monitor",
"quantity": 1,
"price": 4995,
"hsa_fsa_eligible": true
}
],
"order": {
"id": "ord_xyz789",
"status": "completed",
"paid_at": "2026-02-25T15:30:00Z"
},
"success_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel",
"metadata": {
"order_id": "ORD-12345"
},
"expires_at": "2026-03-12T14:30:00Z",
"created_at": "2026-02-25T14:30:00Z",
"paid_at": "2026-02-25T15:30:00Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique payment link identifier |
url | string | Checkout URL for the payment link |
amount | integer | Total amount in cents |
status | enum | active, paid, expired, or cancelled |
order | object | Associated order (present when status is paid) |
order.id | string | Order ID |
order.status | enum | Order status |
order.paid_at | timestamp | When payment was completed |
paid_at | timestamp | When link was paid (null if not paid) |
Example
curl https://api.withgale.com/api/v2/payment-links/plink_abc123xyz \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Payment Link Status
| Status | Description |
|---|---|
active | Link is ready to accept payment |
paid | Payment completed, order created |
expired | Link expired without payment |
cancelled | Link was manually cancelled |
Errors
| Status Code | Error Code | Description |
|---|---|---|
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Payment link not found |
Related
โI
Get Payment Link
curl --request GET \
--url https://api.example.com/api/v2/payment-links/{id}import requests
url = "https://api.example.com/api/v2/payment-links/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/payment-links/{id}', 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/{id}",
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/{id}"
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/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/payment-links/{id}")
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