Process Transaction
curl --request POST \
--url https://api.crowdchange.dev/v2/client/transactions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"frequency": "<string>",
"email": "<string>",
"fundraiser_id": 123,
"card": {
"type": "<string>",
"token": "<string>"
},
"billing": {
"is_foundation": true,
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"custom_data": {},
"tax_receipt": {
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"tribute": {
"fundraiser_tribute_id": 123,
"type": "<string>",
"honoree": "<string>",
"message": "<string>",
"method": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"email": "<string>",
"phone": "<string>",
"name": "<string>",
"donor_copy": true
},
"extra": {
"mail_receipt": true,
"donation_setting_item_id": 123,
"installments": {
"total_amount": 123,
"duration": 123,
"day": 123
}
},
"mail": {
"same_as_billing": true,
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
}
}
'import requests
url = "https://api.crowdchange.dev/v2/client/transactions"
payload = {
"amount": 123,
"frequency": "<string>",
"email": "<string>",
"fundraiser_id": 123,
"card": {
"type": "<string>",
"token": "<string>"
},
"billing": {
"is_foundation": True,
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"custom_data": {},
"tax_receipt": {
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"tribute": {
"fundraiser_tribute_id": 123,
"type": "<string>",
"honoree": "<string>",
"message": "<string>",
"method": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"email": "<string>",
"phone": "<string>",
"name": "<string>",
"donor_copy": True
},
"extra": {
"mail_receipt": True,
"donation_setting_item_id": 123,
"installments": {
"total_amount": 123,
"duration": 123,
"day": 123
}
},
"mail": {
"same_as_billing": True,
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
frequency: '<string>',
email: '<string>',
fundraiser_id: 123,
card: {type: '<string>', token: '<string>'},
billing: {
is_foundation: true,
title: '<string>',
business_name: '<string>',
first_name: '<string>',
last_name: '<string>',
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
custom_data: {},
tax_receipt: {
title: '<string>',
business_name: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
tribute: {
fundraiser_tribute_id: 123,
type: '<string>',
honoree: '<string>',
message: '<string>',
method: '<string>',
address: {
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
email: '<string>',
phone: '<string>',
name: '<string>',
donor_copy: true
},
extra: {
mail_receipt: true,
donation_setting_item_id: 123,
installments: {total_amount: 123, duration: 123, day: 123}
},
mail: {
same_as_billing: true,
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
}
})
};
fetch('https://api.crowdchange.dev/v2/client/transactions', 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.crowdchange.dev/v2/client/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 123,
'frequency' => '<string>',
'email' => '<string>',
'fundraiser_id' => 123,
'card' => [
'type' => '<string>',
'token' => '<string>'
],
'billing' => [
'is_foundation' => true,
'title' => '<string>',
'business_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'custom_data' => [
],
'tax_receipt' => [
'title' => '<string>',
'business_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'tribute' => [
'fundraiser_tribute_id' => 123,
'type' => '<string>',
'honoree' => '<string>',
'message' => '<string>',
'method' => '<string>',
'address' => [
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'email' => '<string>',
'phone' => '<string>',
'name' => '<string>',
'donor_copy' => true
],
'extra' => [
'mail_receipt' => true,
'donation_setting_item_id' => 123,
'installments' => [
'total_amount' => 123,
'duration' => 123,
'day' => 123
]
],
'mail' => [
'same_as_billing' => true,
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.crowdchange.dev/v2/client/transactions"
payload := strings.NewReader("{\n \"amount\": 123,\n \"frequency\": \"<string>\",\n \"email\": \"<string>\",\n \"fundraiser_id\": 123,\n \"card\": {\n \"type\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"billing\": {\n \"is_foundation\": true,\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"custom_data\": {},\n \"tax_receipt\": {\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"tribute\": {\n \"fundraiser_tribute_id\": 123,\n \"type\": \"<string>\",\n \"honoree\": \"<string>\",\n \"message\": \"<string>\",\n \"method\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"name\": \"<string>\",\n \"donor_copy\": true\n },\n \"extra\": {\n \"mail_receipt\": true,\n \"donation_setting_item_id\": 123,\n \"installments\": {\n \"total_amount\": 123,\n \"duration\": 123,\n \"day\": 123\n }\n },\n \"mail\": {\n \"same_as_billing\": true,\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.crowdchange.dev/v2/client/transactions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"frequency\": \"<string>\",\n \"email\": \"<string>\",\n \"fundraiser_id\": 123,\n \"card\": {\n \"type\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"billing\": {\n \"is_foundation\": true,\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"custom_data\": {},\n \"tax_receipt\": {\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"tribute\": {\n \"fundraiser_tribute_id\": 123,\n \"type\": \"<string>\",\n \"honoree\": \"<string>\",\n \"message\": \"<string>\",\n \"method\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"name\": \"<string>\",\n \"donor_copy\": true\n },\n \"extra\": {\n \"mail_receipt\": true,\n \"donation_setting_item_id\": 123,\n \"installments\": {\n \"total_amount\": 123,\n \"duration\": 123,\n \"day\": 123\n }\n },\n \"mail\": {\n \"same_as_billing\": true,\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crowdchange.dev/v2/client/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"frequency\": \"<string>\",\n \"email\": \"<string>\",\n \"fundraiser_id\": 123,\n \"card\": {\n \"type\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"billing\": {\n \"is_foundation\": true,\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"custom_data\": {},\n \"tax_receipt\": {\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"tribute\": {\n \"fundraiser_tribute_id\": 123,\n \"type\": \"<string>\",\n \"honoree\": \"<string>\",\n \"message\": \"<string>\",\n \"method\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"name\": \"<string>\",\n \"donor_copy\": true\n },\n \"extra\": {\n \"mail_receipt\": true,\n \"donation_setting_item_id\": 123,\n \"installments\": {\n \"total_amount\": 123,\n \"duration\": 123,\n \"day\": 123\n }\n },\n \"mail\": {\n \"same_as_billing\": true,\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123123,
"ref_id": "SCXXxxXxxxxxXXXx",
"amount": 49.95,
"currency": "USD",
"currency_symbol": "$",
"frequency": "once",
"fundraiser_id": 1,
"parent_id": null,
"fundraiser_page_id": null,
"fundraiser_team_id": null,
"organization_id": 1,
"fundraiser_name": "Gala Night",
"organization_name": "Crowdchange",
"organization_code": "CrowdchangeID",
"user_id": 120120,
"email": "john@example.com",
"mail": null,
"statement_descriptor": "XXX*CC XXX",
"summary": {
"amount_covered_fee": 1.95,
"amount_custom_fee": 0,
"amount_donation": 48,
"amount_apparel": 0,
"amount_ticket": 0,
"amount_registration": 0,
"amount_sponsor": 0,
"amount_cards": 0,
"frequency": "once"
},
"upsell": null,
"promo_code": null,
"billing_address": {
"name": "Mr. John Snow",
"email": "john@example.com",
"business_name": null,
"title": "Mr.",
"first_name": "John",
"last_name": "Snow",
"address": "123 Main St",
"city": "Toronto",
"state": "ON",
"zip": "M5V2T6",
"country": "CA",
"phone": null
},
"dtd": null,
"created_at": "2024-01-01 12:00:00",
"status": "received"
}
Transactions
Process Transaction
Submit a CrowdChange donation transaction with a payment token from your processor to charge the donor and record the donation against a campaign.
POST
/
v2
/
client
/
transactions
Process Transaction
curl --request POST \
--url https://api.crowdchange.dev/v2/client/transactions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"frequency": "<string>",
"email": "<string>",
"fundraiser_id": 123,
"card": {
"type": "<string>",
"token": "<string>"
},
"billing": {
"is_foundation": true,
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"custom_data": {},
"tax_receipt": {
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"tribute": {
"fundraiser_tribute_id": 123,
"type": "<string>",
"honoree": "<string>",
"message": "<string>",
"method": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"email": "<string>",
"phone": "<string>",
"name": "<string>",
"donor_copy": true
},
"extra": {
"mail_receipt": true,
"donation_setting_item_id": 123,
"installments": {
"total_amount": 123,
"duration": 123,
"day": 123
}
},
"mail": {
"same_as_billing": true,
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
}
}
'import requests
url = "https://api.crowdchange.dev/v2/client/transactions"
payload = {
"amount": 123,
"frequency": "<string>",
"email": "<string>",
"fundraiser_id": 123,
"card": {
"type": "<string>",
"token": "<string>"
},
"billing": {
"is_foundation": True,
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"custom_data": {},
"tax_receipt": {
"title": "<string>",
"business_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"tribute": {
"fundraiser_tribute_id": 123,
"type": "<string>",
"honoree": "<string>",
"message": "<string>",
"method": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"email": "<string>",
"phone": "<string>",
"name": "<string>",
"donor_copy": True
},
"extra": {
"mail_receipt": True,
"donation_setting_item_id": 123,
"installments": {
"total_amount": 123,
"duration": 123,
"day": 123
}
},
"mail": {
"same_as_billing": True,
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
frequency: '<string>',
email: '<string>',
fundraiser_id: 123,
card: {type: '<string>', token: '<string>'},
billing: {
is_foundation: true,
title: '<string>',
business_name: '<string>',
first_name: '<string>',
last_name: '<string>',
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
custom_data: {},
tax_receipt: {
title: '<string>',
business_name: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
tribute: {
fundraiser_tribute_id: 123,
type: '<string>',
honoree: '<string>',
message: '<string>',
method: '<string>',
address: {
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
email: '<string>',
phone: '<string>',
name: '<string>',
donor_copy: true
},
extra: {
mail_receipt: true,
donation_setting_item_id: 123,
installments: {total_amount: 123, duration: 123, day: 123}
},
mail: {
same_as_billing: true,
address: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
}
})
};
fetch('https://api.crowdchange.dev/v2/client/transactions', 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.crowdchange.dev/v2/client/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 123,
'frequency' => '<string>',
'email' => '<string>',
'fundraiser_id' => 123,
'card' => [
'type' => '<string>',
'token' => '<string>'
],
'billing' => [
'is_foundation' => true,
'title' => '<string>',
'business_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'custom_data' => [
],
'tax_receipt' => [
'title' => '<string>',
'business_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'tribute' => [
'fundraiser_tribute_id' => 123,
'type' => '<string>',
'honoree' => '<string>',
'message' => '<string>',
'method' => '<string>',
'address' => [
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'email' => '<string>',
'phone' => '<string>',
'name' => '<string>',
'donor_copy' => true
],
'extra' => [
'mail_receipt' => true,
'donation_setting_item_id' => 123,
'installments' => [
'total_amount' => 123,
'duration' => 123,
'day' => 123
]
],
'mail' => [
'same_as_billing' => true,
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.crowdchange.dev/v2/client/transactions"
payload := strings.NewReader("{\n \"amount\": 123,\n \"frequency\": \"<string>\",\n \"email\": \"<string>\",\n \"fundraiser_id\": 123,\n \"card\": {\n \"type\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"billing\": {\n \"is_foundation\": true,\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"custom_data\": {},\n \"tax_receipt\": {\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"tribute\": {\n \"fundraiser_tribute_id\": 123,\n \"type\": \"<string>\",\n \"honoree\": \"<string>\",\n \"message\": \"<string>\",\n \"method\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"name\": \"<string>\",\n \"donor_copy\": true\n },\n \"extra\": {\n \"mail_receipt\": true,\n \"donation_setting_item_id\": 123,\n \"installments\": {\n \"total_amount\": 123,\n \"duration\": 123,\n \"day\": 123\n }\n },\n \"mail\": {\n \"same_as_billing\": true,\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.crowdchange.dev/v2/client/transactions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"frequency\": \"<string>\",\n \"email\": \"<string>\",\n \"fundraiser_id\": 123,\n \"card\": {\n \"type\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"billing\": {\n \"is_foundation\": true,\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"custom_data\": {},\n \"tax_receipt\": {\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"tribute\": {\n \"fundraiser_tribute_id\": 123,\n \"type\": \"<string>\",\n \"honoree\": \"<string>\",\n \"message\": \"<string>\",\n \"method\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"name\": \"<string>\",\n \"donor_copy\": true\n },\n \"extra\": {\n \"mail_receipt\": true,\n \"donation_setting_item_id\": 123,\n \"installments\": {\n \"total_amount\": 123,\n \"duration\": 123,\n \"day\": 123\n }\n },\n \"mail\": {\n \"same_as_billing\": true,\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crowdchange.dev/v2/client/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"frequency\": \"<string>\",\n \"email\": \"<string>\",\n \"fundraiser_id\": 123,\n \"card\": {\n \"type\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"billing\": {\n \"is_foundation\": true,\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"custom_data\": {},\n \"tax_receipt\": {\n \"title\": \"<string>\",\n \"business_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"tribute\": {\n \"fundraiser_tribute_id\": 123,\n \"type\": \"<string>\",\n \"honoree\": \"<string>\",\n \"message\": \"<string>\",\n \"method\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"name\": \"<string>\",\n \"donor_copy\": true\n },\n \"extra\": {\n \"mail_receipt\": true,\n \"donation_setting_item_id\": 123,\n \"installments\": {\n \"total_amount\": 123,\n \"duration\": 123,\n \"day\": 123\n }\n },\n \"mail\": {\n \"same_as_billing\": true,\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123123,
"ref_id": "SCXXxxXxxxxxXXXx",
"amount": 49.95,
"currency": "USD",
"currency_symbol": "$",
"frequency": "once",
"fundraiser_id": 1,
"parent_id": null,
"fundraiser_page_id": null,
"fundraiser_team_id": null,
"organization_id": 1,
"fundraiser_name": "Gala Night",
"organization_name": "Crowdchange",
"organization_code": "CrowdchangeID",
"user_id": 120120,
"email": "john@example.com",
"mail": null,
"statement_descriptor": "XXX*CC XXX",
"summary": {
"amount_covered_fee": 1.95,
"amount_custom_fee": 0,
"amount_donation": 48,
"amount_apparel": 0,
"amount_ticket": 0,
"amount_registration": 0,
"amount_sponsor": 0,
"amount_cards": 0,
"frequency": "once"
},
"upsell": null,
"promo_code": null,
"billing_address": {
"name": "Mr. John Snow",
"email": "john@example.com",
"business_name": null,
"title": "Mr.",
"first_name": "John",
"last_name": "Snow",
"address": "123 Main St",
"city": "Toronto",
"state": "ON",
"zip": "M5V2T6",
"country": "CA",
"phone": null
},
"dtd": null,
"created_at": "2024-01-01 12:00:00",
"status": "received"
}
Body
number
required
Full amount of transaction in xxx.xx format.
string
required
Payment frequency. Allowed values:
once, month, yearstring
User’s email.
integer
required
Fundraiser / Campaign ID.
object
required
object
required
Billing information.
Show properties
Show properties
boolean
Whether the payment is on behalf of a foundation.
string
Title / Honorifics. For example, Mr. / Miss / Mrs.
string
Business Name
string
required
First Name.
string
required
Last Name.
string
required
Street Address.
string
required
City.
string
required
Two letter State or province..
string
required
Zip or Postal code.
string
required
ISO 3166-1 alpha-2 country code.
object
Additional transaction data.
object
Tax receipt on behalf of another person info.
object
Tax receipt on behalf of another person info.
Show properties
Show properties
integer
Tribute ID.
string
Tribute Type. Allowed values:
in_honor, in_memory, donationstring
Honoree.
string
Message.
string
Delivery method Allowed values:
mail, email, smsobject
string
Email.
string
Phone Number.
string
Name.
boolean
Send copy to donor.
object
Extra information.
Show properties
Show properties
boolean
Send receipt by mail
integer
Impact Statement ID.
object
Fixed installment payment. When enabled, the total donation is split into equal monthly payments. Requires
frequency to be once, the fundraiser to have installment payments enabled, and a recurring-capable payment processor (Stripe or Paysafe). The first payment is charged immediately; the rest are charged on the chosen day of each subsequent month. The amount field on the request is ignored and replaced server-side with total_amount / duration.Show properties
Show properties
number
Total donation amount to be split across all installments, in
xxx.xx format. Each installment is charged total_amount / duration (rounded to 2 decimals).integer
Number of monthly installments. Must be one of the durations configured on the fundraiser (defaults to
3, 6, or 12).integer
Day of the month each installment is charged after the first payment. Must be one of the days configured on the fundraiser (defaults to
1 or 15).object
Response
integer
Transaction ID.
string
Reference or confirmation ID from the payment processor.
number
Full amount of the transaction.
string
Currency code.
string
Currency symbol.
string
Payment frequency. Allowed values:
once, month, yearinteger
Fundraiser / Campaign ID.
integer
Parent transaction ID for recurring or installment payments, otherwise
null.integer
Personal page ID the transaction is attributed to, if any.
integer
Team ID the transaction is attributed to, if any.
integer
Organization ID.
string
Fundraiser / Campaign name.
string
Organization name.
string
Organization’s custom ID.
integer
User ID.
string
Donor’s contact email.
object
string
Statement descriptor that appears on the donor’s card statement.
object
Breakdown of the transaction amount by category.
Show properties
Show properties
number
Processing fee covered by the donor.
number
Custom fees applied to the transaction.
number
Donation amount.
number
Amount spent on apparel.
number
Amount spent on tickets.
number
Amount spent on registration.
number
Amount spent on sponsorships.
number
Amount spent on e-cards.
string
Payment frequency. Allowed values:
once, month, yearobject
Recurring upsell details, when an upsell was presented. Otherwise
null.string
Promo code applied to the transaction, if any.
object
Billing details for the transaction.
object
string
Date and time the transaction was created.
string
Transaction status.
| Status | Description |
|---|---|
400 | Bad Request |
403 | Forbidden |
{
"id": 123123,
"ref_id": "SCXXxxXxxxxxXXXx",
"amount": 49.95,
"currency": "USD",
"currency_symbol": "$",
"frequency": "once",
"fundraiser_id": 1,
"parent_id": null,
"fundraiser_page_id": null,
"fundraiser_team_id": null,
"organization_id": 1,
"fundraiser_name": "Gala Night",
"organization_name": "Crowdchange",
"organization_code": "CrowdchangeID",
"user_id": 120120,
"email": "john@example.com",
"mail": null,
"statement_descriptor": "XXX*CC XXX",
"summary": {
"amount_covered_fee": 1.95,
"amount_custom_fee": 0,
"amount_donation": 48,
"amount_apparel": 0,
"amount_ticket": 0,
"amount_registration": 0,
"amount_sponsor": 0,
"amount_cards": 0,
"frequency": "once"
},
"upsell": null,
"promo_code": null,
"billing_address": {
"name": "Mr. John Snow",
"email": "john@example.com",
"business_name": null,
"title": "Mr.",
"first_name": "John",
"last_name": "Snow",
"address": "123 Main St",
"city": "Toronto",
"state": "ON",
"zip": "M5V2T6",
"country": "CA",
"phone": null
},
"dtd": null,
"created_at": "2024-01-01 12:00:00",
"status": "received"
}
Was this page helpful?
⌘I