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.

Headers

X-Verdn-Unit-Id
string

An optional unit ID to provide when using a team-level key

Body

application/json

Input schema for creating a new pledge transaction

Response

200
application/json

Successful response

The response is of type object.