POST
/
v2
/
pledge-transaction
curl --request POST \
  --url https://api.verdn.com/v2/pledge-transaction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "reference": "order_123",
  "recipient": {
    "email": "customer@example.com"
  },
  "pledges": [
    {
      "impact": {
        "offeringId": "off_123",
        "amount": 100
      }
    }
  ]
}'
{
  "charge": {
    "amount": "25.00",
    "currencyCode": "USD",
    "paidAt": null
  },
  "createdAt": "2024-01-25T12:00:00Z",
  "id": "ptran_01JH67QPC8R56E4DP7K4PB3MRD",
  "isLive": false,
  "notifications": [],
  "pledges": [
    {
      "detail": {
        "description": null,
        "externalId": null,
        "externalUrl": null,
        "image": null,
        "name": null,
        "nounPlural": null,
        "nounSingular": null
      },
      "id": "p_01JH67QPDG65G48KN5WE2J71Y4",
      "impact": {
        "amount": 100,
        "offeringId": "off_123"
      }
    }
  ],
  "recipient": {
    "email": "customer@example.com",
    "firstName": null,
    "name": null
  },
  "reference": "order_123",
  "timelineUrl": "https://verdn.com/my/t/abc123xyz789?edit_key=edit_k3y_456",
  "trigger": {
    "date": null,
    "externalUrl": null,
    "phrase": null
  }
}

Overview

Creates a new pledge transaction containing 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', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer verdn_sk_test_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    reference: "order_123",
    recipient: {
      email: "customer@example.com",
    },
    pledges: [{
      impact: {
        offeringId: "off_123",
        amount: 100,
      },
    }],
  })
})

API Reference

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Input schema for creating a new pledge transaction

reference
string
required

A unique reference for the pledge transaction (e.g. order ID)

recipient
object
required
pledges
object[]
required
trigger
object
notifications
enum<string>[]

Optional array of notification service(s) used to alert recipient on pledge creation

Available options:
Email,
Klaviyo,
Cordial

Response

200
application/json
Successful response
id
string

Unique ID for the pledge transaction

createdAt
string
reference
string

A unique reference for the pledge transaction (e.g. order ID)

isLive
boolean

Boolean indicating production vs test pledge transaction

charge
object
recipient
object
trigger
object
pledges
object[]
notifications
object[]

Array of notification statuses for this pledge transaction

timelineUrl
string

URL to the generated timeline, intended for the pledge recipient (should not be made public)