Submit an OrderThis operation allows a user to submit an order for a donation without submitting payment details. This allows GlobalGiving the ability to immediately update a project's funded status with the understanding that reconciliation of the order will take place at a later date. 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:POST Content Type:xml, json Accept Type:xml, json Path:https://api.globalgiving.org/api/secure/givingservice/orders 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 registered in the GlobalGiving system Query String Example:/api/secure/givingservice/orders?api_key=YOUR_API_KEY&api_token=SOME_API_TOKEN Data Parameters:refcode - your external identifier for this request which is returned in the response, required (maximum 100 characters) transactionId - your unique transaction identifier for this transaction stored in our records for future reference and possible reporting, optional (maximum 100 characters) email - required (maximum 50 characters) amount - a numeric value greater than one, required currencyCode - optional; Defaults to USD addon; - optional amount - a numeric value greater than zero, required if addon element is provided project; id - the numeric identifier for a project, required signupForGGNewsletter - optional; defaults to false signupForCharityNewsletter - optional; defaults to false noteToOrganization - optional (maximum 255 characters)You must have a special agreement to have this parameter recognized. partnerCode - optional (maximum 40 characters)You must have a special agreement to have this parameter recognized. HTTP POST Request using cURL:
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -d "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<order>
<refcode>123456789</refcode>
<transactionId>abc123</transactionId>
<email>john.doe@hotmail.com</email>
<amount>25</amount>
<currencyCode>USD</currencyCode>
<project>
<id>1883</id>
</project>
<signupForGGNewsletter>true</signupForGGNewsletter>
<signupForCharityNewsletter>true</signupForCharityNewsletter>
</order>" -X POST "https://api.globalgiving.org/api/secure/givingservice/orders?api_key=YOUR_API_KEY&api_token=SOME_API_TOKEN"
NOTE: Above request has carriage returns for readability. XML Response:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<invoice>
<amount>25.00</amount>
<currencyCode>USD</currencyCode>
<datetime>2008-08-21T18:26:22.717-07:00</datetime>
<email>john.doe@hotmail.com</email>
<project>
<funding>5897.47</funding>
<goal>62500</goal>
<id>1883</id>
<numberOfDonations>75</numberOfDonations>
<progressReportLink>http://www.globalgiving.org/pr/1900/proj1883a.html#progressReports</progressReportLink>
<projectLink>http://www.globalgiving.org/pr/1900/proj1883a.html</progressReportLink>
<remaining>56602.53</remaining>
</project>
<refcode>123456789</refcode>
<signupForCharityNewsletter>true</signupForCharityNewsletter>
<signupForGGNewsletter>true</signupForGGNewsletter>
<transactionId>abc123</transactionId>
<invoiceNumber>I49578-GC174282-CBcb01</invoiceNumber>
</invoice>
NOTE: If successful, response contains <invoiceNumber>, and <datetime> elements. Submit an Order Request Structure
Element Definitions for Submit an Order Request
* - Field is only recognized if api key has special permission to post notes to the organization. Please contact us with questions. Submitting this field is optional, and values will be ignored if your key does not have the permission to use. Order Response Structure
Element Definitions for Order Response
* - This field will only be returned if it was submitted and accepted. See above fields for submitting orders for more. |

