Skip to main content

Charge

The Charge Payment API processes one-time payments within Donary. It returns a payment ID, status, and confirmation, allowing for quick and secure transaction processing.


Endpoint

/v1/External/Charge

Http Request Method

POST

Request Header

See authorization.

Request Body

note

* Indicates required field.
* Required when using a credit card.
* Indicates suggested field.
* Required when using ACH.

NameTypeDescriptionChild Attributes
orgGUID *stringIdentifier for the organization receiving the funds.Placeholder
amount *doubleAmount of the payment.Placeholder
note stringAny additional notes regarding the payment.Placeholder
paymentDate stringDate of the payment in UTC format.Placeholder
paymentMethodId stringMethod of payment, please format as follows:
OJC
Credit_Card
Matbia
Pledger
Donors_Fund
ACH
Placeholder
uniqueTransactionId *stringUnique identifier for the transaction in GUID format.Placeholder
currency *stringCurrency of the transaction, the following currencies are supported:
USD
ILS
EUR
CAD
GBP
Placeholder
⚠️ Your account needs to be set up to accept the necessary currencies.

Response

NameTypeDescriptionChild Attributes
receiptNum stringReceipt number of the payment.Placeholder
amount doubleAmount of the payment.Placeholder
accountId intAccount ID of the donor associated with the payment.Placeholder
currency stringCurrency of the transaction.Placeholder
paymentStatus stringStatus of the payment:
Success
Failed
Placeholder
responseTitle stringStatusPlaceholder

Example:

cURL:

curl --location --request PUT 'https://sandbox-api.donary.com/v1/External/Charge' \
--header 'Authorization: YOUR_AUTH_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"donor":{"accountNum":"10","firstName":"Yaakov","lastName":"Freedman","phoneNumber":"7185556666"},"campaignNum":5,"campaignName":"Beis Medresh","reason":{"reasonNum":1000,"reasonName":"Keren Habinyan"},"amount":10,"ccNum":"4242424242424242","expiry":"12/28","cvv":"456","note":"Charge Test","paymentDate":"2024-10-29T10:30:43.007Z","paymentMethodId":"Credit_Card","uniqueTransactionId":"586f0af4-9409-e684-3ef9-b81bda1fd6c971-152[8g","currency":"USD","reasons":null,"bankAccount":null,"orgGUID":"115e9d3d-baf2-4089-b896-9b2621ffcf1b"}'

Payload:

{
"orgGUID": "115e9d3d-baf2-4089-b896-9b2621ffcf1b",
"donor": {
"accountNum": 10,
"firstName": "Yaakov",
"lastName": "Freedman",
"phoneNumber": "7185556666"
},
"campaign": {
"campaignNum": 5,
"campaignName": "Beis Medresh"
},
"reason":
{
"reasonNum": 1000,
"reasonName": "Keren Habinyan"
},
"amount": 10,
"card": {
"ccNum": "4242424242424242",
"expiry": "12/28",
"cvv": "456"
},
"note": "Charge Test",
"paymentDate": "2024-10-29T10:30:43.007Z",
"paymentMethodId": "Credit_Card",
"uniqueTransactionId": "586f0af4-9409-e684-3ef9-b81bda1fd6c971-152[8g",
"currency": "USD",
"reasons": null,
"bankAccount": null
}

Response:

{
"receiptNum": "1238",
"amount": 10.0000,
"accountNum": "10",
"currency": "USD",
"paymentStatus": "Success",
"responseTitle": "Success !!",
"error": {
"errorCode": null,
"message": null
}
}