Payment Links
List all payment links
Returns a list of all your payment links.
GET
/
payment-links
List all payment links
curl --request GET \
--url https://pay.chargily.net/test/api/v2/payment-links \
--header 'Authorization: Bearer <token>'import requests
url = "https://pay.chargily.net/test/api/v2/payment-links"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pay.chargily.net/test/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://pay.chargily.net/test/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",
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://pay.chargily.net/test/api/v2/payment-links"
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://pay.chargily.net/test/api/v2/payment-links")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay.chargily.net/test/api/v2/payment-links")
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{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hhhtvg4w7gk4mcaxmgzb2ynw",
"entity": "payment_link",
"name": "Payment Link for Facebook page.",
"active": 1,
"after_completion_message": "The product will arrive in 03 days.",
"locale": "ar",
"pass_fees_to_customer": false,
"metadata": [],
"created_at": 1702479380,
"updated_at": 1702479380,
"collect_shipping_address": 0,
"url": "https://pay.chargily.dz/test/payment-links/01hhhtvg4w7gk4mfg5fdgmgzb2ynw"
},
{
"id": "01hhhtkg70gca88n1h65wpe8gn",
"entity": "payment_link",
"name": "Payment Link for Instagram.",
"active": 0,
"after_completion_message": "Thank you for purchasing our product.",
"locale": "en",
"pass_fees_to_customer": true,
"metadata": [],
"created_at": 1702479380,
"updated_at": 1702479380,
"collect_shipping_address": 0,
"url": "https://pay.chargily.dz/test/payment-links/01hhhtkg70gca88n1h65wpe8gn"
}
],
"first_page_url": "https://pay.chargily.net/test/api/v2/payment-links?page=1",
"last_page": 1,
"last_page_url": "https://pay.chargily.net/test/api/v2/payment-links?page=1",
"next_page_url": null,
"path": "https://pay.chargily.net/test/api/v2/payment-links",
"per_page": 10,
"prev_page_url": null,
"total": 2
}
Query parameters
A numeric value indicating the quantity of payment links to be returned with
the request, with a minimum value of 1 and a maximum value of 50.
Returns
A key-value array, containing a data property which is an array of payment links, limited to a maximum ofper_page value.
{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hhhtvg4w7gk4mcaxmgzb2ynw",
"entity": "payment_link",
"name": "Payment Link for Facebook page.",
"active": 1,
"after_completion_message": "The product will arrive in 03 days.",
"locale": "ar",
"pass_fees_to_customer": false,
"metadata": [],
"created_at": 1702479380,
"updated_at": 1702479380,
"collect_shipping_address": 0,
"url": "https://pay.chargily.dz/test/payment-links/01hhhtvg4w7gk4mfg5fdgmgzb2ynw"
},
{
"id": "01hhhtkg70gca88n1h65wpe8gn",
"entity": "payment_link",
"name": "Payment Link for Instagram.",
"active": 0,
"after_completion_message": "Thank you for purchasing our product.",
"locale": "en",
"pass_fees_to_customer": true,
"metadata": [],
"created_at": 1702479380,
"updated_at": 1702479380,
"collect_shipping_address": 0,
"url": "https://pay.chargily.dz/test/payment-links/01hhhtkg70gca88n1h65wpe8gn"
}
],
"first_page_url": "https://pay.chargily.net/test/api/v2/payment-links?page=1",
"last_page": 1,
"last_page_url": "https://pay.chargily.net/test/api/v2/payment-links?page=1",
"next_page_url": null,
"path": "https://pay.chargily.net/test/api/v2/payment-links",
"per_page": 10,
"prev_page_url": null,
"total": 2
}
⌘I
List all payment links
curl --request GET \
--url https://pay.chargily.net/test/api/v2/payment-links \
--header 'Authorization: Bearer <token>'import requests
url = "https://pay.chargily.net/test/api/v2/payment-links"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pay.chargily.net/test/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://pay.chargily.net/test/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",
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://pay.chargily.net/test/api/v2/payment-links"
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://pay.chargily.net/test/api/v2/payment-links")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay.chargily.net/test/api/v2/payment-links")
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{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hhhtvg4w7gk4mcaxmgzb2ynw",
"entity": "payment_link",
"name": "Payment Link for Facebook page.",
"active": 1,
"after_completion_message": "The product will arrive in 03 days.",
"locale": "ar",
"pass_fees_to_customer": false,
"metadata": [],
"created_at": 1702479380,
"updated_at": 1702479380,
"collect_shipping_address": 0,
"url": "https://pay.chargily.dz/test/payment-links/01hhhtvg4w7gk4mfg5fdgmgzb2ynw"
},
{
"id": "01hhhtkg70gca88n1h65wpe8gn",
"entity": "payment_link",
"name": "Payment Link for Instagram.",
"active": 0,
"after_completion_message": "Thank you for purchasing our product.",
"locale": "en",
"pass_fees_to_customer": true,
"metadata": [],
"created_at": 1702479380,
"updated_at": 1702479380,
"collect_shipping_address": 0,
"url": "https://pay.chargily.dz/test/payment-links/01hhhtkg70gca88n1h65wpe8gn"
}
],
"first_page_url": "https://pay.chargily.net/test/api/v2/payment-links?page=1",
"last_page": 1,
"last_page_url": "https://pay.chargily.net/test/api/v2/payment-links?page=1",
"next_page_url": null,
"path": "https://pay.chargily.net/test/api/v2/payment-links",
"per_page": 10,
"prev_page_url": null,
"total": 2
}