Get payment link
curl --request GET \
--url https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id} \
--header 'Authorization: Bearer <token>' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}"
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_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.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}",
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>",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-organization-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 := "https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
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://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "AED",
"expires_at": "2023-11-07T05:31:56Z",
"payment_intent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_methods": [
"<string>"
],
"payment_page_url": "<string>",
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "entity",
"bank_accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_holder_name": "Bob Jones",
"account_number": "12345678",
"bic": "CHASUS33XXX",
"country": "US",
"currency": "USD",
"display_name": "Primary account",
"iban": "GB29NWBK60161331926819",
"is_default": false,
"name": "Primary account",
"routing_number": "<string>",
"sort_code": "123456",
"was_created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"name": "<string>"
},
"status": "<string>",
"invoice": {
"due_date": "2023-12-25",
"file": {
"mimetype": "<string>",
"name": "<string>",
"url": "<string>"
},
"issue_date": "2023-12-25"
},
"payer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "entity",
"bank_accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_holder_name": "Bob Jones",
"account_number": "12345678",
"bic": "CHASUS33XXX",
"country": "US",
"currency": "USD",
"display_name": "Primary account",
"iban": "GB29NWBK60161331926819",
"is_default": false,
"name": "Primary account",
"routing_number": "<string>",
"sort_code": "123456",
"was_created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"name": "<string>"
},
"payment_intent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"application_fee_amount": 123,
"object": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "payable"
},
"provider": "<string>",
"selected_payment_method": "<string>",
"tesouro_data": {
"link_token": "<string>",
"payment_link_id": "<string>"
}
},
"payment_reference": "<string>",
"return_url": "https://pay.example.com/complete"
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Payment links
Get payment link
GET
/
finops
/
v1
/
payment-links
/
{payment_link_id}
Get payment link
curl --request GET \
--url https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id} \
--header 'Authorization: Bearer <token>' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}"
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_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.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}",
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>",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-organization-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 := "https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
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://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/payment-links/{payment_link_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "AED",
"expires_at": "2023-11-07T05:31:56Z",
"payment_intent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_methods": [
"<string>"
],
"payment_page_url": "<string>",
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "entity",
"bank_accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_holder_name": "Bob Jones",
"account_number": "12345678",
"bic": "CHASUS33XXX",
"country": "US",
"currency": "USD",
"display_name": "Primary account",
"iban": "GB29NWBK60161331926819",
"is_default": false,
"name": "Primary account",
"routing_number": "<string>",
"sort_code": "123456",
"was_created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"name": "<string>"
},
"status": "<string>",
"invoice": {
"due_date": "2023-12-25",
"file": {
"mimetype": "<string>",
"name": "<string>",
"url": "<string>"
},
"issue_date": "2023-12-25"
},
"payer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "entity",
"bank_accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_holder_name": "Bob Jones",
"account_number": "12345678",
"bic": "CHASUS33XXX",
"country": "US",
"currency": "USD",
"display_name": "Primary account",
"iban": "GB29NWBK60161331926819",
"is_default": false,
"name": "Primary account",
"routing_number": "<string>",
"sort_code": "123456",
"was_created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"name": "<string>"
},
"payment_intent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"application_fee_amount": 123,
"object": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "payable"
},
"provider": "<string>",
"selected_payment_method": "<string>",
"tesouro_data": {
"link_token": "<string>",
"payment_link_id": "<string>"
}
},
"payment_reference": "<string>",
"return_url": "https://pay.example.com/complete"
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The ID of the entity that owns the requested resource.
Example:
"9d2b4c8f-2087-4738-ba91-7359683c49a4"
Path Parameters
Response
Successful Response
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLE, SOS, SRD, SSP, SVC, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW Required string length:
1 - 2083Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The URL where to redirect the payer after the payment. If return_url is specified, then after the payment is completed the payment page will display the "Return to platform" link that navigates to this URL.
Example:
"https://pay.example.com/complete"
Was this page helpful?