The donations API provides a method to allow a partner to request a refund for a transaction.
The following API methods all require standard API authentication headers as described in the main donations API documentation. You must pass your application id and token in the HTTP request header. The name of the parameters are “JG_APPLICATIONKEY”, and “JG_SECURITYTOKEN”. An example request header might look like this: JG_APPLICATIONKEY: samplekey JG_SECURITYTOKEN: samplepassword
A transaction Id or donation Id is provided as an input parameter. Only transactions which were originally submitted by the authenticated API key can be looked up. A transaction Id which does not exist or that was not created by the requesting user will result in identical 404 failure responses.
GET Input Values
- transactionId – The id of the transaction returned by the original donation POST. This will start with a letter and and dash.
- donationId – The id of the transactions created by the FirstGiving system, available in reporting. This will be an integer.
- tranType – the will be REFUNDREQUEST
curl -X GET -H “JG_APPLICATIONKEY: 434a712a-31ec-4c00-a3bf-782897af27e5″ -H “JG_SECURITYTOKEN: 35afbf1-07e4-4886-88f7-3ce34680eb6f” https://api.firstgiving.com/transaction/refundrequest?donationId=504614&tranType=REFUNDREQUEST