Authorizations
OAuth 2.0 authentication
Headers
The server stores keys for 45 days.
The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>
An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion.<blockquote><strong>Note:</strong>For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.</blockquote>
Path Parameters
The PayPal-generated ID for the captured payment to refund.
Body
Refunds a captured payment, by ID. For a full refund, include an empty request body. For a partial refund, include an <code>amount</code> 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 <code>captured amount - previous refunds</code> 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.
Response
A successful request returns the HTTP <code>200 OK</code> status code and a JSON response body that shows refund details.
The refund information. The refund status with details. The date and time stamps that are common to authorized payment, captured payment, and refund transactions.
The status of the refund.
CANCELLED
, FAILED
, PENDING
, COMPLETED
The details of the refund status.
The date and time when the transaction occurred, in Internet date and time format.
20 - 64
The date and time when the transaction was last updated, in Internet date and time format.
20 - 64
The PayPal-generated ID for the refund.
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.
The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
1 - 255
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
The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives.
The breakdown of the refund.
The details associated with the merchant for this transaction.
An array of related HATEOAS links.