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. If not provided, defaults to the current UTC time.Placeholder
paymentMethodId *stringMethod of payment, please format as follows:
OJC
Credit_Card
Matbia
Pledger
Donors_Fund
ACH
Placeholder
uniqueTransactionId *stringA unique string identifier for the transaction. Using a GUID is recommended to ensure uniqueness. The same value cannot be used for more than one transaction.Placeholder
currency *stringCurrency of the transaction, the following currencies are supported:
USD
ILS
EUR
CA
GBP
Placeholder
⚠️ Your account needs to be set up to accept the necessary currencies.

Card value note

  • For Credit_Card, set card.ccNum to the raw credit card number.
  • For OJC, Matbia, Pledger, and Donors_Fund, set card.ccNum to the charity card number or provider token.

Response

NameTypeDescriptionChild Attributes
receiptNum stringReceipt number of the payment.Placeholder
amount doubleAmount of the payment.Placeholder
accountNum stringAccount number of the donor associated with the payment.Placeholder
currency stringCurrency of the transaction.Placeholder
paymentStatus stringStatus of the payment:
Success
Declined
Error
Placeholder
responseTitle stringStatusPlaceholder

Example:

cURL:

curl --location --request POST 'https://sandbox-api.donary.com/v1/External/Charge' \
--header 'Authorization: YOUR_AUTH_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"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":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","currency":"USD","reasons":null,"bankAccount":null}'

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
}
}