User Guide

Invoicing Service API Guide May 2012 23
Invoicing Service API Examples
Searching for Invoices
2
curl -s --insecure
-H "X-PAYPAL-SECURITY-USERID: Your_API_username"
-H "X-PAYPAL-SECURITY-PASSWORD: Your_API_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: Your_API_signature"
-H "X-PAYPAL-REQUEST-DA TA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: Your_AppID"
https://sandbox.svcs.paypal.com/Invoice/CancelInvoice
-d
"requestEnvelope.errorLanguage=en_US
&invoiceID=INV2-RVY9-UWTW-64HZ-BR9W"
&subject=Cancel+it
&noteForPayer=Cancel+it+now
&sendCopyToMerchant=true"
Searching for Invoices
This example shows how to create and send an invoice using CreateAndSendInvoice. You
must have created the original invoice either for yourself or on behalf of another merchant.
PayPal can return a maximum of 100 invoices per page. In this example, only the first 10
invoices that you created using the Invoicing Service API for the jb-us-
seller1@paypal.com account are returned:
curl -s --insecure
-H "X-PAYPAL-SECURITY-USERID: Your_API_username"
-H "X-PAYPAL-SECURITY-PASSWORD: Your_API_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: Your_API_signature"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: Your_AppID"
https://svcs.sandbox.paypal.com/Invoice/SearchInvoices
-d
"requestEnvelope.errorLanguage=en_US
&merchantEmail=jb-us-seller1%40paypal.com
&parameters.origin=API
&parameters.email=jb-us-seller1%40paypal.com
&page=1
&pageSize=10"