# What the PayPal API does on a refund versus a payout

DevFeed: [What the PayPal API does on a refund versus a payout](<https://devfeed.tech/articles/what-the-paypal-api-does-on-a-refund-versus-a-payout-109711.md>)

Original publisher: [Read original article](<https://www.swytchcode.com/content/paypal-api-ai-agents>)

Author: Swytchcode Team

Published: 2026-10-30T18:54:52Z

Content type: article

Language: en

Sources: [Swytchcode](<https://devfeed.tech/sources/swytchcode.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [API Governance](<https://devfeed.tech/topics/api-governance.md>), [API Logging](<https://devfeed.tech/topics/api-logging.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [about](<https://devfeed.tech/tags/about.md>), [account](<https://devfeed.tech/tags/account.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [also](<https://devfeed.tech/tags/also.md>), [api](<https://devfeed.tech/tags/api.md>), [api-governance](<https://devfeed.tech/tags/api-governance.md>), [apis](<https://devfeed.tech/tags/apis.md>), [call](<https://devfeed.tech/tags/call.md>), [can](<https://devfeed.tech/tags/can.md>), [capture](<https://devfeed.tech/tags/capture.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [id](<https://devfeed.tech/tags/id.md>), [live](<https://devfeed.tech/tags/live.md>), [money](<https://devfeed.tech/tags/money.md>), [one](<https://devfeed.tech/tags/one.md>), [paypal](<https://devfeed.tech/tags/paypal.md>), [request](<https://devfeed.tech/tags/request.md>), [sandbox](<https://devfeed.tech/tags/sandbox.md>)

## AI overview

A PayPal refund reverses a specific capture; a payout sends new money and leaves the original charge intact. The article says sandbox and live calls require different hosts and matching access tokens, and sandbox success does not establish live Payouts access. For retries, reuse the same PayPal-Request-Id on POST endpoints that support it; a new or omitted ID can duplicate the request. The ID should be unique per request and call type, and PayPal recommends a UUID of up to 38 characters. Because not every API stores the header, verify support for the enabled endpoint. The article recommends keeping refund and payout methods distinct, matching host to token, and holding Payouts for human review until live access and retry behavior are confirmed.

## Source excerpt

A PayPal refund reverses one capture. A payout sends new money. Sandbox and live use different hosts, and a missing PayPal-Request-Id can duplicate the call.