List payment links
curl --request GET \
--url http://localhost:7701/api/v1/payment-links \
--header 'X-API-Key: <api-key>' \
--header 'x-client-id: <x-client-id>'import requests
url = "http://localhost:7701/api/v1/payment-links"
headers = {
"x-client-id": "<x-client-id>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-id': '<x-client-id>', 'X-API-Key': '<api-key>'}
};
fetch('http://localhost:7701/api/v1/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_PORT => "7701",
CURLOPT_URL => "http://localhost:7701/api/v1/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 => [
"X-API-Key: <api-key>",
"x-client-id: <x-client-id>"
],
]);
$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 := "http://localhost:7701/api/v1/payment-links"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:7701/api/v1/payment-links")
.header("x-client-id", "<x-client-id>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:7701/api/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-client-id"] = '<x-client-id>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"token": "pl_live_a1b2c3d4e5f6",
"slug": "curso-premium",
"title": "Curso Premium",
"description": "<string>",
"amount": 29900,
"currency": "BRL",
"plan_id": 123,
"plan_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"name": "Curso Premium",
"quantity": 1,
"unit_price": 29900,
"description": "Acesso vitalício",
"image_url": "<string>"
}
],
"success_url": "<string>",
"cancel_url": "<string>",
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z",
"checkout_url": "https://checkout.plugtopay.com/minha-empresa/curso-premium",
"created_at": "2023-11-07T05:31:56Z"
}
],
"meta": {}
}Payment Links
List payment links
Lista paginada dos links de pagamento da empresa.
GET
/
api
/
v1
/
payment-links
List payment links
curl --request GET \
--url http://localhost:7701/api/v1/payment-links \
--header 'X-API-Key: <api-key>' \
--header 'x-client-id: <x-client-id>'import requests
url = "http://localhost:7701/api/v1/payment-links"
headers = {
"x-client-id": "<x-client-id>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-id': '<x-client-id>', 'X-API-Key': '<api-key>'}
};
fetch('http://localhost:7701/api/v1/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_PORT => "7701",
CURLOPT_URL => "http://localhost:7701/api/v1/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 => [
"X-API-Key: <api-key>",
"x-client-id: <x-client-id>"
],
]);
$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 := "http://localhost:7701/api/v1/payment-links"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:7701/api/v1/payment-links")
.header("x-client-id", "<x-client-id>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:7701/api/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-client-id"] = '<x-client-id>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"token": "pl_live_a1b2c3d4e5f6",
"slug": "curso-premium",
"title": "Curso Premium",
"description": "<string>",
"amount": 29900,
"currency": "BRL",
"plan_id": 123,
"plan_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"name": "Curso Premium",
"quantity": 1,
"unit_price": 29900,
"description": "Acesso vitalício",
"image_url": "<string>"
}
],
"success_url": "<string>",
"cancel_url": "<string>",
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z",
"checkout_url": "https://checkout.plugtopay.com/minha-empresa/curso-premium",
"created_at": "2023-11-07T05:31:56Z"
}
],
"meta": {}
}Authorizations
Company API key. Send in the X-API-Key header.
Headers
Client identifier for the company in the request.
Example:
"client_abc123"
⌘I