I am including post cart information in xml file then use curl's @ option to post the contents of the file, Here is the example:
curl -d /home/test/Downloads/sampcodetest.xml https://xxx:yyy@sandbox.google.com/checkout/api/checkout/v2/request/Merchant/xxx
<?xml version="1.0" encoding="UTF-8"?>
<error xmlns="http://checkout.google.com/schema/2" serial-number="fb8c82e7-1e52-4e7f-b0e1-6394cc3f328a">
<error-message>Internal error in server</error-message>
</error>
I am passing valid merchant id and key.