List payment links
curl --request GET \
--url https://api.fintoc.com/v1/payment_links \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/payment_links"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/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_URL => "https://api.fintoc.com/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 => [
"Authorization: <api-key>"
],
]);
$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.fintoc.com/v1/payment_links"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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("https://api.fintoc.com/v1/payment_links")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "plink_K2zwNNSxPyx8w3GZ",
"object": "payment_link",
"amount": 5000,
"checkout": {
"description": "Premium subscription"
},
"created_at": "2024-04-04T15:23:11.474Z",
"currency": "CLP",
"customer_email": "customer@example.com",
"expires_at": null,
"max_completed_sessions": null,
"metadata": {
"order_id": "1234"
},
"mode": "live",
"recipient_account": null,
"status": "active",
"url": "https://pay.fintoc.com/plink_K2zwNNSxPyx8w3GZ"
}
]{
"error": {
"type": "invalid_request_error",
"code": "invalid_date",
"param": "since",
"message": "Invalid date: not-a-date. You need to provide a date in ISO 8601 format (YYYY-MM-DD)",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}Payment links
List payment links
Lists the payment links of your organization for the live or test mode of the API key used. The list is paginated: the Link and X-Total-Count response headers describe the pagination state.
GET
/
v1
/
payment_links
List payment links
curl --request GET \
--url https://api.fintoc.com/v1/payment_links \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/payment_links"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/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_URL => "https://api.fintoc.com/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 => [
"Authorization: <api-key>"
],
]);
$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.fintoc.com/v1/payment_links"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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("https://api.fintoc.com/v1/payment_links")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "plink_K2zwNNSxPyx8w3GZ",
"object": "payment_link",
"amount": 5000,
"checkout": {
"description": "Premium subscription"
},
"created_at": "2024-04-04T15:23:11.474Z",
"currency": "CLP",
"customer_email": "customer@example.com",
"expires_at": null,
"max_completed_sessions": null,
"metadata": {
"order_id": "1234"
},
"mode": "live",
"recipient_account": null,
"status": "active",
"url": "https://pay.fintoc.com/plink_K2zwNNSxPyx8w3GZ"
}
]{
"error": {
"type": "invalid_request_error",
"code": "invalid_date",
"param": "since",
"message": "Invalid date: not-a-date. You need to provide a date in ISO 8601 format (YYYY-MM-DD)",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}Parámetros de consulta
Respuesta
List of payment links for the current mode. The Link header contains the URLs of the surrounding pages, and X-Total-Count contains the total number of payment links.
Status of the payment link. One of active (accepts payments), expired (the expiration date passed), canceled (you canceled the link), or completed (the link reached its maximum number of completed sessions).
Opciones disponibles:
active, expired, canceled, completed Ejemplo:
"active"
¿Esta página le ayudó?