On this page
No Headings
Oauth 2.0 authentication
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/invoicing/invoices/readwriteThe ID of the invoice to cancel.
^.*$0 <= length <= 2147483647Holds authorization information for external API calls.
^.*$1 <= length <= 16000application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v2/invoicing/invoices/INV2-Z56S-5LLA-Q52L-CPZ5/cancel" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "Content-Type: application/json" \ -d '{ "send_to_invoicer": true, "send_to_recipient": true, "additional_recipients": [ "[email protected]" ] }'{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [],
"links": []
}{
"name": "AUTHENTICATION_FAILURE",
"debug_id": "b1d1f06c7246c",
"message": "Authentication failed due to missing Authorization header, or invalid authentication credentials."
}{
"name": "NOT_AUTHORIZED",
"debug_id": "b1d1f06c7246c",
"message": "Authorization failed due to insufficient permissions."
}{
"debug_id": "e50a003b5a9af",
"links": [
{
"href": "https://developer.paypal.com/docs/limited-release/invoicing/#errors",
"rel": "information_link"
}
],
"message": "The specified resource does not exist.",
"name": "RESOURCE_NOT_FOUND"
}{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [],
"links": []
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}The subject of the email that is sent as a notification to the recipient.Note: User-provided values for this field will not be honored and the subject will always be defaulted to a system-defined value.
^[\S\s]*$0 <= length <= 4000A note to the payer.Note: User-provided values for this field will not be honored and the note will always be defaulted to a system-defined value.
^[\S\s]*$0 <= length <= 4000Indicates whether to send a copy of the email to the merchant.
falseIndicates whether to send a copy of the email to the recipient.
trueAn array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.
0 <= items <= 100