On this page
No Headings
OAuth 2.0 authentication
Client CredentialsToken URLhttps://api-m.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/payments/payment/authcaptureThe PayPal-generated ID for the authorized payment to void.
^[\S\s]*$0 <= length <= 2147483647Holds authorization information for external API calls.
^.*$1 <= length <= 16000Header for an API client-provided JWT assertion that identifies the merchant. Establishing the consent to act-on-behalf of a merchant is a prerequisite for using this header.
^.*$1 <= length <= 10000A unique ID identifying the request header for idempotency purposes.
^.*$1 <= length <= 10000The preferred server response upon successful completion of the request. Value is:return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.return=representation. The server returns a complete resource representation, including the current state of the resource.
"return=minimal"^[\S\s]*$0 <= length <= 2147483647application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.paypal.com/v2/payments/authorizations/0VF52814937998046/void" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "PayPal-Auth-Assertion: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9" \ -H "PayPal-Request-Id: 17e81d06-77ab-11e8-adc0-fa71639ebebc"{
"id": "5C908745JK343851U",
"status": "VOIDED",
"amount": {
"currency_code": "USD",
"value": "100.00"
},
"invoice_id": "OrderInvoice-10_10_2024_12_06_00_pm",
"seller_protection": {
"status": "ELIGIBLE",
"dispute_categories": [
"ITEM_NOT_RECEIVED",
"UNAUTHORIZED_TRANSACTION"
]
},
"expiration_time": "2024-11-08T09:06:03-08:00",
"create_time": "2024-10-10T10:06:03-07:00",
"update_time": "2024-10-10T10:06:19-07:00",
"links": [
{
"href": "https://api.paypal.com/v2/payments/authorizations/5C908745JK343851U",
"rel": "self",
"method": "GET"
}
]
}{
"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."
}{
"name": "RESOURCE_NOT_FOUND",
"debug_id": "b1d1f06c7246c",
"message": "The specified resource does not exist."
}{
"name": "RESOURCE_CONFLICT",
"debug_id": "b1d1f06c7246c",
"message": "The server has detected a conflict while processing this request.",
"details": [
{
"issue": "PREVIOUS_REQUEST_IN_PROGRESS",
"description": "A previous request on this resource is currently in progress. Please wait for sometime and try again. It is best to space out the initial and the subsequent request(s) to avoid receiving this error."
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "a7b0de7cb97ad",
"details": [
{
"issue": "PREVIOUSLY_CAPTURED",
"description": "Authorization has been previously captured and cannot be voided."
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/payments/v2/#error-PREVIOUSLY_CAPTURED",
"rel": "information_link"
}
]
}{
"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."
}