invoicing

Remove Invoices

Merchants can delete draft invoices and cancel sent invoices.

1. Delete draft invoice

Merchants can delete draft invoices.

After you delete a draft invoice, you can no longer use it or show its details. However, you can reuse its invoice number.

Note: You cannot delete invoices once they are sent.

If you no longer need a sent invoice, call cancel invoice.

This sample request deletes a draft invoice:

curl -v -X DELETE \
  https://api.sandbox.paypal.com/v1/invoicing/invoices/invoice_id \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer Access-Token"

A successful request returns the HTTP 204 No Content status code with no JSON response body.

2. Cancel sent invoice

Merchants can cancel a sent invoice, by ID.

As part of this request, the merchant can send a notification about the cancellation to the payer, merchant, and CC: email addresses.

To suppress this notification from yourself, set the send_to_merchant query parameter to false.

To suppress this notification from your customer, set send_to_payer query parameter to false.

This sample request cancels a sent invoice:

curl -v -X POST \
  https://api.sandbox.paypal.com/v1/invoicing/invoices/invoice_id/cancel \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer Access-Token" \
  -d '{
  "subject": "Invoice canceled",
  "note": "Canceling this invoice per your request.",
  "send_to_merchant": true,
  "send_to_payer": true,
  "cc_emails": ["cc-email@example.com"]
}'

A successful request returns the HTTP 204 No Content status code with no JSON response body.

Next

Continue to Create and Manage Templates.

Feedback

Have feedback?

Let us know.