Skip to main content
POST
/
v2
/
payments
/
authorizations
/
{authorization_id}
/
void
Void authorized payment
curl --request POST \
  --url https://api-m.paypal.com/v2/payments/authorizations/{authorization_id}/void \
  --header 'Authorization: Bearer <token>'
{
  "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"
    }
  ]
}

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication

Headers

Authorization
string

Holds authorization information for external API calls. Standard headers are generally less restrictive in structure due to historical precedent across browsers, etc. This is a common schema for use in defining most standard headers.

Required string length: 1 - 16000
Pattern: ^.*$
PayPal-Auth-Assertion
string

Header 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.

Required string length: 1 - 10000
Pattern: ^.*$
PayPal-Request-Id
string

A unique ID identifying the request header for idempotency purposes.

Required string length: 1 - 10000
Pattern: ^.*$
Prefer
string
default:return=minimal

The 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.

Maximum string length: 2147483647
Pattern: ^[\S\s]*$

Path Parameters

authorization_id
string
required

The PayPal-generated ID for the authorized payment to void.

Maximum string length: 2147483647
Pattern: ^[\S\s]*$

Callbacks

POST
authorizations/{$request.path.authorization_id}/voidauthorization_voided

Body

application/json

Webhook event notification for authorization voided.

id
string

The ID of the webhook event notification.

Required string length: 1 - 255
Pattern: ^.*$
event_version
string

The version of the event.

Required string length: 1 - 50
Pattern: ^.*$
create_time
string

The date and time when the webhook event notification was created.

Required string length: 20 - 64
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
resource_type
string

The name of the resource related to the webhook notification event.

Required string length: 1 - 100
Pattern: ^.*$
resource_version
string

The version of the resource.

Required string length: 1 - 50
Pattern: ^.*$
event_type
enum<string>

The event that triggered the webhook event notification.

Available options:
PAYMENT.AUTHORIZATION.VOIDED
summary
string

A summary description for the event notification.

Required string length: 1 - 500
Pattern: ^.*$
resource
Authorization · object

The authorized payment transaction.

An array of request-related HATEOAS links.

Required array length: 1 - 10 elements

Response

Your server implementation should return this HTTP status code if the data was received successfully.

POST
authorizations/{$request.path.authorization_id}/void-expiredauthorization_voided_expired

Body

application/json

Webhook event notification for authorization voided due to expiry.

id
string

The ID of the webhook event notification.

Required string length: 1 - 255
Pattern: ^.*$
event_version
string

The version of the event.

Required string length: 1 - 50
Pattern: ^.*$
create_time
string

The date and time when the webhook event notification was created.

Required string length: 20 - 64
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
resource_type
string

The name of the resource related to the webhook notification event.

Required string length: 1 - 100
Pattern: ^.*$
resource_version
string

The version of the resource.

Required string length: 1 - 50
Pattern: ^.*$
event_type
enum<string>

The event that triggered the webhook event notification.

Available options:
PAYMENT.AUTHORIZATION.VOIDED
summary
string

A summary description for the event notification.

Required string length: 1 - 500
Pattern: ^.*$
resource
Authorization · object

The authorized payment transaction.

An array of request-related HATEOAS links.

Required array length: 1 - 10 elements

Response

Your server implementation should return this HTTP status code if the data was received successfully.

Response

A successful request returns the HTTP 200 OK status code and a JSON response body that shows authorization details. This response is returned when the Prefer header is set to return=representation.

The authorized payment transaction.

status
enum<string>
read-only

The status for the authorized payment.

Available options:
CREATED,
CAPTURED,
DENIED,
PARTIALLY_CAPTURED,
VOIDED,
PENDING
status_details
authorization_status_details · object

The details of the authorized order pending status.

id
string
read-only

The PayPal-generated ID for the authorized payment.

Maximum string length: 2147483647
Pattern: ^[\S\s]*$
amount
amount_with_breakdown · object

The amount for this authorized payment.

invoice_id
string
read-only

The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.

Maximum string length: 2147483647
Pattern: ^[\S\s]*$
custom_id
string

The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.

Maximum string length: 255
Pattern: ^[\S\s]*$
network_transaction_reference
network_transaction · object

Reference values used by the card network to identify a transaction.

seller_protection
seller_protection · object

The level of protection offered as defined by PayPal Seller Protection for Merchants.

expiration_time
string

The date and time when the authorized payment expires, in Internet date and time format.

Required string length: 20 - 64
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$

An array of related HATEOAS links.

Maximum array length: 32767
create_time
string

The date and time when the transaction occurred, in Internet date and time format.

Required string length: 20 - 64
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
update_time
string

The date and time when the transaction was last updated, in Internet date and time format.

Required string length: 20 - 64
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
supplementary_data
Payment Supplementary Data · object

The supplementary data.

payee
payee_base · object

The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee.