Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.
Documentation Index
Fetch the complete documentation index at: https://docs.paypal.ai/llms.txt
Use this file to discover all available pages before exploring further.
OAuth 2.0 authentication
A unique ID identifying the request header for idempotency purposes.
1 - 10000^.*$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.2147483647^[\S\s]*$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.
1 - 16000^.*$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.
1 - 10000^.*$The PayPal-generated ID for the captured payment to refund.
2147483647^[\S\s]*$Refunds a captured payment, by ID. For a full refund, include an empty request body. For a partial refund, include an amount object in the request body.
The amount to refund. To refund a portion of the captured amount, specify an amount. If amount is not specified, an amount equal to captured amount - previous refunds is refunded. The amount must be a positive number and in the same currency as the one in which the payment was captured.
The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports. The pattern is defined by an external party and supports Unicode.
1 - 127^.*$The API caller-provided external invoice ID for this order. The pattern is defined by an external party and supports Unicode.
1 - 127^.*$The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives. The pattern is defined by an external party and supports Unicode.
1 - 255^.*$Any additional refund instructions to be set during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability.
A successful request returns the HTTP 200 OK status code and a JSON response body that shows refund details.
The refund information.
The status of the refund.
CANCELLED, FAILED, PENDING, COMPLETED The details of the refund status.
The PayPal-generated ID for the refund.
2147483647^[\S\s]*$The amount that the payee refunded to the payer.
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.
2147483647^[\S\s]*$The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
1 - 255^[A-Za-z0-9-_.,]*$Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.
1 - 36^[a-zA-Z0-9]+$The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives.
2147483647^[\S\s]*$The breakdown of the refund.
The details associated with the merchant for this transaction.
The buyer context for the refund transaction.
The date and time when the transaction occurred, in Internet date and time format.
20 - 64^[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})$The date and time when the transaction was last updated, in Internet date and time format.
20 - 64^[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})$