Queries the available donation campaigns for a donation based on the donation context (like merchant account, currency, and locale). The response contains active donation campaigns.
After submitting a call, you receive a response message to inform you that your request was received and processed.
Depending on the HTTP status code of the response message, it is helpful to build some logic to handle any errors that a request or the system may return.
HTTP Responses
200 - OK
The request has succeeded.
donationCampaignsarray[object]
List of active donation campaigns for your merchant account.
amountsobject
The object that contains the fixed donation amounts that the shopper can select from.
roundup: a donation where the original transaction amount is rounded up as a donation.
fixedAmounts: a donation where you show fixed donations amounts that the shopper can select from.
maxRoundupAmountinteger
The maximum amount a transaction can be rounded up to make a donation. This field is only present when donationType is roundup.
valuesarray[integer]
The fixed donation amounts in minor units. This field is only present when donationType is fixedAmounts.
idstring
The unique campaign ID of the donation campaign.
logoUrlstring
The URL for the logo of the nonprofit.
nonprofitDescriptionstring
The description of the nonprofit.
nonprofitNamestring
The name of the nonprofit organization that receives the donation.
nonprofitUrlstring
The website URL of the nonprofit.
termsAndConditionsUrlstring
The URL of the terms and conditions page of the nonprofit and the campaign.
400 - Bad Request
A problem reading or understanding the request.
additionalDataobject
Contains additional information about the payment. Some data fields are included only if you select them first. Go to Customer Area > Developers > Additional data.
errorCodestring
The error code mapped to the error message.
errorTypestring
The category of the error.
messagestring
A short explanation of the issue.
pspReferencestring
The PSP reference of the payment.
statusinteger
The HTTP response status.
401 - Unauthorized
Authentication required.
additionalDataobject
Contains additional information about the payment. Some data fields are included only if you select them first. Go to Customer Area > Developers > Additional data.
errorCodestring
The error code mapped to the error message.
errorTypestring
The category of the error.
messagestring
A short explanation of the issue.
pspReferencestring
The PSP reference of the payment.
statusinteger
The HTTP response status.
403 - Forbidden
Insufficient permissions to process the request.
additionalDataobject
Contains additional information about the payment. Some data fields are included only if you select them first. Go to Customer Area > Developers > Additional data.
errorCodestring
The error code mapped to the error message.
errorTypestring
The category of the error.
messagestring
A short explanation of the issue.
pspReferencestring
The PSP reference of the payment.
statusinteger
The HTTP response status.
422 - Unprocessable Entity
A request validation error.
additionalDataobject
Contains additional information about the payment. Some data fields are included only if you select them first. Go to Customer Area > Developers > Additional data.
errorCodestring
The error code mapped to the error message.
errorTypestring
The category of the error.
messagestring
A short explanation of the issue.
pspReferencestring
The PSP reference of the payment.
statusinteger
The HTTP response status.
500 - Internal Server Error
The server could not process the request.
additionalDataobject
Contains additional information about the payment. Some data fields are included only if you select them first. Go to Customer Area > Developers > Additional data.