View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.amount object in the JSON request body.Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/payments/refundcapture_idstring<currency_code>RequiredPreferstring<currency_code>Optionalreturn=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.application/json
TypeScript Definitions
Use the request body type in TypeScript.
amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredpayment_instructionobject<payment_instruction-2>Optionalplatform_feesobject<platform_fee>[]Optionalamountobject<money>Requiredcurrency_codestring<currency_code>RequiredvaluestringRequiredpayeeobject<payee_base>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
merchant_idstring<account_id-2>Optionalapplication/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v2/payments/captures/2GG279541U471931P/refund" \ -H "PayPal-Request-Id: 17e81d06-77ab-11e8-adc0-fa71639ebebc" \ -H "Prefer: return=representation" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "PayPal-Auth-Assertion: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9" \ -H "Content-Type: application/json" \ -d '{ "amount": { "value": "1.00", "currency_code": "USD" }, "invoice_id": "RefundInvoice-123", "custom_id": "RefundCustom-123" }'{ "id": "0K35355239430361V", "amount": { "currency_code": "USD", "value": "1.00" }, "seller_payable_breakdown": { "gross_amount": { "currency_code": "USD", "value": "1.00" }, "paypal_fee": { "currency_code": "USD", "value": "0.00" }, "net_amount": { "currency_code": "USD", "value": "1.00" }, "total_refunded_amount": { "currency_code": "USD", "value": "11.00" } }, "invoice_id": "RefundInvoice-14_10_2024_4_58_32_pm", "custom_id": "RefundCustom-14_10_2024_4_58_32_pm", "status": "COMPLETED", "create_time": "2024-10-14T14:58:34-07:00", "update_time": "2024-10-14T14:58:34-07:00", "links": [ { "href": "https://api.paypal.com/v2/payments/refunds/0K35355239430361V", "rel": "self", "method": "GET" }, { "href": "https://api.paypal.com/v2/payments/captures/7TK53561YB803214S", "rel": "up", "method": "GET" } ]}