Cancel an Order

This operation allows a user to cancel an order which has not yet been paid. The order cannot be reversed using this operation once reconciliation has taken place. The order can only be cancelled by the same user who originally submitted it. This is a secure request as indicated by the '/secure/' element in the URL path, therefore, an access token (authentication) is required.

NOTE: You must enter into a special agreement with GlobalGiving to use this API feature. Please contact us for more information if you wish to have this feature enabled.

HTTP Method:

DELETE

Accept Type:

xml, json

Path:

https://api.globalgiving.org/api/secure/givingservice/invoices/{invoiceNumber}

Path Parameters:

{invoiceNumber} the string identifier for an invoice returned when the order was first submitted, replace with actual value, required

Query String Parameters:

&api_key described in the API Key section, required

&api_token described in the Access Token section, required

&is_test when set to true the order will not be cancelled in the GlobalGiving system

Query String Example:

/api/secure/givingservice/invoices/I212230-GC614103-CBcb01?api_key=YOUR_API_KEY&api_token=SOME_API_TOKEN

HTTP DELETE Request using cURL:

                  curl -H "Accept: application/xml" -X DELETE "https://api.globalgiving.org/api/secure/givingservice/invoices/I212230-GC614103-CBcb01?api_key=eb52c848-8e67-461b-a45d-9c85d9004dd3&api_token=u28wgo0aq04bzxy90aq1q6wttx0aq2cfelvw0aq3"
               

XML Response:

            
                  <?xml version="1.0" encoding="utf-8" standalone="yes"?>
                  <invoice>
                      <amount>0.00</amount>
                      <currencyCode>USD</currencyCode>
                      <signupForCharityNewsletter>false</signupForCharityNewsletter>
                      <signupForGGNewsletter>false</signupForGGNewsletter>
                      <invoiceNumber>I212230-GC614103-CBcb01</invoiceNumber>
                      <invoicedAmount>0</invoicedAmount>
                  </invoice>
               

NOTE: If successful, response contains <amount>, and <invoicedAmount> elements of value 0.