cURL
curl --request GET \
--url https://api.verdn.com/v2/pledge-transaction/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.verdn.com/v2/pledge-transaction/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.verdn.com/v2/pledge-transaction/{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.verdn.com/v2/pledge-transaction/{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>"
],
]);
$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.verdn.com/v2/pledge-transaction/{id}"
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://api.verdn.com/v2/pledge-transaction/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verdn.com/v2/pledge-transaction/{id}")
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{
"createdAt": "2023-04-27T16:10:48.000Z",
"reference": "my-custom-reference",
"isLive": true,
"charge": {
"amount": 0,
"currencyCode": "USD",
"paidAt": "2024-10-01T00:00:00.000Z"
},
"trigger": {
"date": "2021-03-13T00:00:00.000Z",
"externalUrl": null,
"phrase": null
},
"pledges": [
{
"id": "p_00000000000000000000000000",
"impact": {
"offeringId": "io_00000000000000000000000000",
"amount": 2
},
"details": [
{
"name": null,
"description": null,
"nounSingular": null,
"nounPlural": null,
"image": null,
"externalId": null,
"externalUrl": null
}
],
"recipient": {
"email": "customer@example.com",
"name": "Customer",
"firstName": null
}
}
]
}{
"error": "Authentication failed",
"message": "Check your API key and try again."
}{
"error": "Pledge transaction not found"
}Endpoints
Get Pledge Transaction by ID
Get an existing pledge transaction by its ID
GET
/
v2
/
pledge-transaction
/
{id}
cURL
curl --request GET \
--url https://api.verdn.com/v2/pledge-transaction/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.verdn.com/v2/pledge-transaction/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.verdn.com/v2/pledge-transaction/{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.verdn.com/v2/pledge-transaction/{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>"
],
]);
$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.verdn.com/v2/pledge-transaction/{id}"
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://api.verdn.com/v2/pledge-transaction/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verdn.com/v2/pledge-transaction/{id}")
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{
"createdAt": "2023-04-27T16:10:48.000Z",
"reference": "my-custom-reference",
"isLive": true,
"charge": {
"amount": 0,
"currencyCode": "USD",
"paidAt": "2024-10-01T00:00:00.000Z"
},
"trigger": {
"date": "2021-03-13T00:00:00.000Z",
"externalUrl": null,
"phrase": null
},
"pledges": [
{
"id": "p_00000000000000000000000000",
"impact": {
"offeringId": "io_00000000000000000000000000",
"amount": 2
},
"details": [
{
"name": null,
"description": null,
"nounSingular": null,
"nounPlural": null,
"image": null,
"externalId": null,
"externalUrl": null
}
],
"recipient": {
"email": "customer@example.com",
"name": "Customer",
"firstName": null
}
}
]
}{
"error": "Authentication failed",
"message": "Check your API key and try again."
}{
"error": "Pledge transaction not found"
}Overview
Gets an existing pledge transaction by its ID. A single pledge transaction may contain one or more pledges. Each pledge represents an impact commitment tied to a specific offering.Examples
const response = await fetch(
'https://api.verdn.com/v2/pledge-transaction/ptran_00000000000000000000000000',
{
method: 'POST',
headers: {
'Authorization': 'Bearer verdn_sk_test_...',
},
},
);
{
"createdAt": "2024-01-25T12:00:00Z",
"reference": "order_123",
"isLive": false,
"charge": {
"amount": "25.00",
"currencyCode": "USD",
"paidAt": null
},
"trigger": {
"date": null,
"externalUrl": null,
"phrase": null
},
"pledges": [
{
"id": "p_00000000000000000000000000",
"impact": {
"amount": 100,
"offeringId": "off_123"
},
"recipient": {
"email": "customer@example.com",
"firstName": null,
"name": null
},
"details": [
{
"description": null,
"externalId": null,
"externalUrl": null,
"image": null,
"name": null,
"nounPlural": null,
"nounSingular": null
}
]
}
]
}
API Reference
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
An optional unit ID to provide when using a team-level key
Response
Pledge transaction found
Show child attributes
Show child attributes
Boolean indicating production vs test pledge transaction
Array of notification statuses for this pledge transaction
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
URL to the generated timeline, intended for the pledge recipient (should not be made public)
Show child attributes
Show child attributes
⌘I