Skip to main content
RapidDev - Software Development Agency
retool-integrationsREST API Resource

How to Integrate Retool with PayPal Payouts

Connect Retool to PayPal Payouts using a REST API Resource with OAuth 2.0 client credentials. Configure PayPal's API credentials in Retool's Resources tab, obtain an access token, and build payout operations dashboards that create batch payouts, track disbursement status, and view recipient details for marketplace and gig economy payment workflows.

What you'll learn

  • How to create a PayPal developer application and configure Live API credentials
  • How to implement OAuth 2.0 client credentials token flow in Retool
  • How to create payout batches via PayPal's Payouts API from Retool
  • How to track batch and item-level payout status in a Retool dashboard
  • How to build a payout operations panel for marketplace or gig economy disbursements
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate15 min read30 minutesPaymentLast updated April 2026RapidDev Engineering Team
TL;DR

Connect Retool to PayPal Payouts using a REST API Resource with OAuth 2.0 client credentials. Configure PayPal's API credentials in Retool's Resources tab, obtain an access token, and build payout operations dashboards that create batch payouts, track disbursement status, and view recipient details for marketplace and gig economy payment workflows.

Quick facts about this guide
FactValue
ToolPayPal Payouts
CategoryPayment
MethodREST API Resource
DifficultyIntermediate
Time required30 minutes
Last updatedApril 2026

Build a Payout Operations Dashboard with PayPal and Retool

Marketplaces, gig economy platforms, and affiliate programs regularly need to disburse payments to large numbers of recipients — sellers, contractors, influencers, or referral partners. PayPal Payouts supports batch disbursements to thousands of recipients at once, but PayPal's native dashboard provides limited operational visibility: it's difficult to track individual recipient payment status, troubleshoot failed payouts, or build custom approval workflows before disbursements go out. Retool connected to PayPal's Payouts API solves this.

PayPal's Payouts API organizes disbursements into 'payout batches' — a single API call submits a batch with multiple recipient objects, each specifying an email address, amount, currency, and optional note. PayPal processes the batch asynchronously and assigns success, pending, failed, or unclaimed status to each item. A Retool operations dashboard can show all recent batches, drill down into individual item statuses, identify failed or unclaimed payouts requiring follow-up, and trigger new batch creation for scheduled disbursement runs.

Beyond simple payout tracking, Retool's integration with PayPal enables building pre-disbursement approval workflows: finance managers review a pending payout list, approve or modify individual items, and then trigger the batch creation via a button — rather than relying on manual processes or expensive custom software. This pattern is particularly valuable for teams that handle payouts weekly or monthly and need clear audit trails of who approved each disbursement.

Integration method

REST API Resource

PayPal Payouts integrates with Retool through PayPal's REST API, configured as a REST API Resource. Authentication uses OAuth 2.0 client credentials flow — your PayPal app's Client ID and Secret are exchanged for a Bearer access token that expires after 9 hours. Retool queries the /v1/payments/payouts endpoints to create payout batches and check their status. All PayPal API calls are proxied server-side through Retool, keeping credentials off the client.

Prerequisites

  • A PayPal Business account with Payouts enabled (requires a one-time request to PayPal for Payouts API access)
  • A PayPal developer application created at developer.paypal.com with Live credentials (Client ID and Secret)
  • PayPal Payouts API access enabled for your Live application (separate approval from standard PayPal APIs)
  • A Retool account with permission to create and configure Resources
  • Recipient PayPal email addresses or phone numbers for the disbursement targets

Step-by-step guide

1

Create a PayPal developer application and enable Payouts

Go to developer.paypal.com and sign in with your PayPal Business account. Navigate to 'Apps & Credentials'. Under the 'Live' tab (not Sandbox for production), click 'Create App'. Name your application (e.g., 'Retool Payout Operations') and select 'Merchant' as the app type. After creation, PayPal shows your Live Client ID and allows you to reveal your Secret. Copy both values — you'll need them for Retool Resource configuration. Critically, PayPal Payouts is not enabled by default on new applications. You must specifically enable it: in your app's settings page, scroll to 'Features' and locate 'Payouts'. Toggle it on and click Save. If you don't see the Payouts toggle, contact PayPal's technical support to have Payouts API access enabled for your account — this is a separate approval process that PayPal requires for mass disbursement capability. For testing, use the Sandbox tab with Sandbox credentials pointing to developer.paypal.com/sandbox — create Sandbox business and personal accounts to test payout flows without real money. Switch to Live credentials only after testing is complete.

Pro tip: PayPal's Payouts API requires explicit account-level approval in addition to enabling the feature in your app settings. If API calls return 'You are not authorized to use this service', contact PayPal developer support — approval can take 1-3 business days.

Expected result: You have Live Client ID and Secret for your PayPal developer application, and Payouts is enabled as a feature. You can proceed to configure Retool.

2

Configure PayPal OAuth resource and token query in Retool

PayPal uses OAuth 2.0 client credentials flow for server-to-server API access. You need two Retool resources: one for obtaining tokens and one for making payout API calls with the token. In Retool's Resources tab, create a REST API resource named 'PayPal OAuth'. Set the base URL to https://api-m.paypal.com (Live) or https://api-m.sandbox.paypal.com (Sandbox). For authentication, select 'Basic Auth'. Enter your Client ID as the username and Secret as the password. Create a query named 'getPayPalToken' using the PayPal OAuth resource. Set method to POST and path to /v1/oauth2/token. In the Body tab, select 'URL Encoded' (application/x-www-form-urlencoded) and add the field: grant_type with value client_credentials. Run this query — it returns an access_token string valid for approximately 32400 seconds (9 hours). Create a second REST API resource named 'PayPal Payouts API'. Set the base URL to https://api-m.paypal.com. For authentication, select 'Bearer Token' and set the value to {{ getPayPalToken.data.access_token }}. Also add a Content-Type header: application/json. Store your Client ID and Secret in Retool configuration variables (Settings → Configuration Variables, marked as secrets). Reference them in the Basic Auth fields as {{ retoolContext.configVars.PAYPAL_CLIENT_ID }} and {{ retoolContext.configVars.PAYPAL_SECRET }}.

paypal_token_response.json
1// GET /v1/oauth2/token response structure
2// The access_token is valid for ~9 hours (32400 seconds)
3{
4 "scope": "https://uri.paypal.com/services/payouts...",
5 "access_token": "A21AAF...",
6 "token_type": "Bearer",
7 "app_id": "APP-80W284485P519543T",
8 "expires_in": 32400,
9 "nonce": "2020-04-03T15:35:36ZaYZlGvEkV7b0I3ztI/CNNF9FJk_PDneTVHTHF2"
10}

Pro tip: PayPal access tokens are valid for 9 hours — much longer than eBay's 2-hour tokens. Running getPayPalToken on each page load is fine; you don't need a complex token caching strategy for moderate-usage dashboards.

Expected result: The getPayPalToken query returns a valid access_token. The PayPal Payouts API resource uses this token for authentication. You can now make payout API calls.

3

Build a query to list recent payout batches

Create a query to retrieve recent payout batches for your operations overview. In your Retool app, create a query named 'getPayoutBatches'. Use the PayPal Payouts API resource, set method to GET, and path to /v1/payments/payouts. Note: PayPal's Payouts list endpoint requires specific query parameters to scope results. Add the following URL parameters: start_time (set to {{ new Date(Date.now() - 30*24*60*60*1000).toISOString() }} for last 30 days), end_time (set to {{ new Date().toISOString() }}), page_size (set to 20), and fields (set to all for complete batch details). However, PayPal's Payouts API does not have a simple 'list all batches' endpoint — you must know the batch_payout_id to retrieve specific batch details via GET /v1/payments/payouts/{batch_payout_id}. The recommended approach is to store batch IDs in a Retool Database or PostgreSQL table when creating payouts, then query your own database for the batch ID list and use a Retool JavaScript query to fetch details for each batch from PayPal. For the batch detail view, create a query named 'getBatchDetails'. Set method to GET and path to /v1/payments/payouts/{{ batchesTable.selectedRow?.batchId }}. This endpoint returns full batch details including all item statuses, recipients, amounts, and error messages for any failed items.

transformer_batch_details.js
1// JavaScript transformer for PayPal batch detail response
2const batch = data;
3const items = batch.items || [];
4
5const summary = {
6 batchId: batch.batch_header?.payout_batch_id,
7 status: batch.batch_header?.batch_status,
8 totalAmount: batch.batch_header?.amount?.value,
9 currency: batch.batch_header?.amount?.currency,
10 fundingSource: batch.batch_header?.funding_source,
11 timeCompleted: batch.batch_header?.time_completed
12 ? new Date(batch.batch_header.time_completed).toLocaleString()
13 : 'Processing...',
14 successCount: items.filter(i => i.transaction_status === 'SUCCESS').length,
15 failedCount: items.filter(i => i.transaction_status === 'FAILED').length,
16 unclaimedCount: items.filter(i => i.transaction_status === 'UNCLAIMED').length
17};
18
19const lineItems = items.map(item => ({
20 payoutItemId: item.payout_item_id,
21 recipient: item.payout_item?.receiver,
22 amount: `${item.payout_item?.amount?.currency} ${item.payout_item?.amount?.value}`,
23 status: item.transaction_status,
24 error: item.errors?.name || '',
25 errorMessage: item.errors?.message || '',
26 transactionId: item.transaction_id || 'N/A'
27}));
28
29return { summary, lineItems };

Pro tip: Always store payout batch IDs in your own database when creating payouts — PayPal doesn't provide a straightforward 'list all batches' endpoint, so tracking batch IDs yourself is the only reliable way to build a batch history view.

Expected result: The batch detail query returns complete status information for a payout batch, including per-item status, recipient details, and any error information for failed payments.

4

Build a payout batch creation query

The most important capability in a payout operations panel is creating new payout batches from Retool. Create a query named 'createPayoutBatch' using the PayPal Payouts API resource. Set method to POST and path to /v1/payments/payouts. The request body requires a sender_batch_header with your internal batch ID, email subject, and email message for recipients, plus an items array with each recipient's details. The items array is built dynamically from your Retool Table component — specifically from the rows that finance managers have approved for payment. The payout recipient can be identified by email address, phone number, or PayPal username. For marketplaces, email is the most common identifier. Each item requires a recipient_type (EMAIL, PHONE, or PAYPAL_ID), an amount object with value and currency, and a receiver (the email address or identifier). After creating the query, build the approval workflow UI: a Table component showing pending payouts pulled from your internal database, checkboxes for selecting rows to include in the batch, a summary showing total amount and recipient count for selected rows, and a 'Create Payout Batch' button that triggers the createPayoutBatch query with selected row data. On success, the query returns a batch_header with a payout_batch_id and PENDING status. Store this batch ID in your database using a second query that fires in the On Success event handler. For complex multi-step payout workflows with approval gates, custom fee calculations, and reconciliation reporting, RapidDev's team can help build the complete operational system.

create_payout_batch.json
1// POST /v1/payments/payouts
2// Create a payout batch from selected rows in the pending payouts table
3{
4 "sender_batch_header": {
5 "sender_batch_id": "{{ 'BATCH-' + new Date().getTime() }}",
6 "email_subject": "You have received a payment",
7 "email_message": "Thank you for your work. Please claim your payment.",
8 "recipient_type": "EMAIL"
9 },
10 "items": {{ pendingPayoutsTable.selectedRows.map((row, index) => ({
11 "payout_item_id": row.id || String(index + 1),
12 "recipient_type": "EMAIL",
13 "amount": {
14 "value": row.amount.toFixed(2),
15 "currency": "USD"
16 },
17 "receiver": row.paypalEmail,
18 "note": row.note || "Payment from platform",
19 "sender_item_id": row.internalId || String(row.id)
20 })) }}
21}

Pro tip: PayPal requires sender_batch_id to be unique per batch — use a timestamp-based ID or UUID to ensure uniqueness. Duplicate sender_batch_ids within 30 days will cause idempotent replay of the original batch.

Expected result: The payout batch creation query successfully submits disbursements to PayPal. The response includes a payout_batch_id that you store for tracking. The batch appears in PayPal's Payouts dashboard within minutes.

5

Build the payout operations dashboard UI

Assemble the complete payout operations dashboard. Use a Tab component with three tabs: 'Pending Payouts', 'Batch History', and 'Failed Items'. On Pending Payouts: Display a Table showing recipients eligible for payment from your internal database. Add columns: recipient name, PayPal email, amount to pay, payment reason, and a checkbox for approval. Show a summary bar below showing total selected amount and recipient count. The 'Execute Payout Batch' button at the bottom creates the batch and shows a confirmation modal before proceeding. On Batch History: Show a Table listing recent payout batches from your database (batch ID, creation date, total amount, recipient count, status). Clicking a batch row triggers the getBatchDetails query and shows a side panel with the batch summary statistics and a detailed item list below. On Failed Items: Query your database for payout batch items that returned FAILED, UNCLAIMED, or RETURNED status. Display recipient email, error reason (e.g., 'RECEIVER_ACCOUNT_LOCKED', 'INVALID_ACCOUNT_NUMBER'), original amount, and a 'Retry' button. The Retry button opens a form to enter a corrected PayPal email and creates a new single-item batch. Add role-based access control by using Retool's Groups feature — only users in the 'Finance' group can see the 'Execute Payout Batch' button and the actual PayPal email addresses; other groups see masked values.

transformer_payout_summary.js
1// JavaScript transformer to calculate payout batch summary
2const selectedRows = pendingPayoutsTable.selectedRows || [];
3
4const summary = {
5 recipientCount: selectedRows.length,
6 totalAmount: selectedRows.reduce((sum, row) => sum + (parseFloat(row.amount) || 0), 0).toFixed(2),
7 currency: 'USD',
8 estimatedFee: (selectedRows.reduce((sum, row) => sum + (parseFloat(row.amount) || 0), 0) * 0.02).toFixed(2), // ~2% PayPal Payouts fee
9 currencies: [...new Set(selectedRows.map(r => r.currency || 'USD'))].join(', ')
10};
11
12return summary;

Pro tip: Add a duplicate email check transformer that flags multiple rows with the same PayPal email address — accidentally sending two payouts to the same recipient is a common error that a pre-flight check can catch.

Expected result: The three-tab payout dashboard is complete. Finance managers can review pending payouts, approve a subset, create the PayPal batch, and track status through to completion. Failed payouts surface clearly for follow-up.

Common use cases

Weekly marketplace seller payment dashboard

Build a dashboard that shows all sellers eligible for weekly payment, calculates amounts based on completed order data from your database, lets a finance manager review and approve the payout list, then triggers a PayPal batch payout with one click. Track batch status and follow up on any failed or unclaimed items.

Retool Prompt

Build a Retool app with a Table showing pending seller payouts imported from our orders database (seller email, earned amount, completed orders count). Add checkboxes to approve individual payouts and an 'Execute Payout Batch' button that sends all approved items to PayPal's Payouts API. Show a status panel tracking batch processing results.

Copy this prompt to try it in Retool

Failed payout triage panel

Build a triage dashboard that shows all payout items with FAILED, UNCLAIMED, or RETURNED status across recent batches. Display the failure reason, recipient details, and amount. Allow operations staff to update PayPal email addresses and retry failed payouts individually.

Retool Prompt

Build a Retool dashboard that queries recent PayPal payout batches and filters for items with non-SUCCESS status. Show recipient email, failure reason, amount, batch date, and a 'Retry' button that creates a new single-item payout batch with corrected details. Group by failure reason with counts.

Copy this prompt to try it in Retool

Gig economy contractor payment operations panel

Build a contractor payment panel that processes weekly pay runs for gig workers. Pull earnings data from your platform's database, combine with contractor PayPal emails, calculate deductions, show a pre-payment summary, and trigger disbursements. Track payment confirmation and flag contractors who haven't linked a PayPal account.

Retool Prompt

Build a Retool app combining data from our PostgreSQL database (contractor ID, earnings, hours, PayPal email) with PayPal payout status. Show a payment run summary with total amount, recipient count, and estimated processing time. Include an approval flow before executing, and a post-payment reconciliation view.

Copy this prompt to try it in Retool

Troubleshooting

PayPal API returns 401 Unauthorized even with correct Client ID and Secret

Cause: The token query may be using Sandbox credentials against the Live endpoint (or vice versa), or the Client ID and Secret have been entered in the wrong order (Client ID must be the username, Secret must be the password for Basic Auth).

Solution: Confirm you're using the correct environment — Live credentials go to api-m.paypal.com, Sandbox credentials go to api-m.sandbox.paypal.com. In the Retool Resource's Basic Auth settings, ensure Client ID is the username field and Client Secret is the password field. Regenerate the token query and check the raw request headers to confirm the Authorization header contains the correct Base64-encoded string.

Payout batch creation returns 403 with 'You are not authorized to use this service'

Cause: Payouts API access has not been enabled for your PayPal account or application. This is a separate approval from standard PayPal API access.

Solution: Log into developer.paypal.com, open your Live application settings, and verify the Payouts feature toggle is enabled. If it's not visible, contact PayPal technical support (developer.paypal.com/support) and request Payouts API access. This approval process can take 1-5 business days. During this wait, test with Sandbox credentials where Payouts is available without special approval.

Individual payout items show UNCLAIMED status for several days after the batch was processed

Cause: UNCLAIMED means PayPal sent the payment but the recipient doesn't have a PayPal account linked to that email address. PayPal holds the funds for 30 days, then returns them if unclaimed.

Solution: Contact recipients with UNCLAIMED status to create a PayPal account with the email address you sent the payment to. In your Retool dashboard, highlight UNCLAIMED items and add a 'Send Reminder' button that logs the follow-up action. Monitor these items and build an alert in a Retool Workflow that flags items approaching the 30-day return deadline.

PayPal batch creation fails with 'DUPLICATE_REQUEST' error

Cause: The sender_batch_id in the request body matches a batch created within the last 30 days. PayPal treats duplicate sender_batch_ids as idempotent replays of the original request.

Solution: Ensure each payout batch uses a unique sender_batch_id. Use a timestamp-based approach or UUID: 'BATCH-' + Date.now() for simple uniqueness. If you're retrying a failed batch creation (not a duplicate — an actual server-side failure), check whether the original batch was created despite the error by querying PayPal with the original batch ID before generating a new one.

typescript
1// Generate a unique sender_batch_id
2const batchId = 'BATCH-' + new Date().toISOString().replace(/[:.]/g, '-') + '-' + Math.random().toString(36).substr(2, 9);
3return batchId;

Best practices

  • Store all PayPal payout batch IDs in your own database immediately after batch creation — PayPal doesn't provide a reliable batch history endpoint, so your records are the source of truth for reconciliation
  • Implement a pre-flight validation check in Retool before creating batches: verify no duplicate emails, confirm all amounts are positive, check the total doesn't exceed your daily payout limit, and require explicit approval confirmation
  • Use PayPal Sandbox for all development and testing — Sandbox provides isolated test accounts and doesn't touch real money, but the API behaviour is identical to Live
  • Store PayPal Client ID and Secret in Retool configuration variables marked as secrets, never in query bodies or component values that could be exposed to end users
  • Build a reconciliation report that compares your internal database of expected payouts with PayPal's actual batch item statuses — discrepancies indicate either missing payouts or unexpected extra disbursements
  • Monitor UNCLAIMED payouts proactively — funds held in UNCLAIMED status for 30 days are automatically returned by PayPal; build a Retool Workflow that alerts your team when UNCLAIMED items approach the 30-day threshold
  • For international payouts, always specify the currency explicitly in each payout item and verify that currency is supported in the recipient's country — PayPal's Payouts API supports multiple currencies but not all currencies work in all countries

Alternatives

Frequently asked questions

What is the difference between PayPal Payouts and regular PayPal payments?

PayPal Payouts (formerly Mass Pay) is specifically designed for businesses sending money to multiple recipients in a single API call — it supports batch sizes of up to 15,000 recipients per batch and typically charges lower per-transaction fees than regular PayPal payments. Regular PayPal payment APIs (Checkout, Payment Intents) are for accepting money from customers. Payouts is for disbursing money to sellers, contractors, or affiliates.

How much does PayPal Payouts cost per transaction?

PayPal Payouts fees vary by recipient location and funding source. For domestic US payouts funded by PayPal balance, the fee is approximately 2% per transaction with a $1 maximum. International payouts have different fee structures. Check PayPal's current pricing at paypal.com/us/business/payouts — fees change periodically and vary by market. Your PayPal account agreement may include custom rates for high-volume senders.

Can I cancel a payout after creating the batch?

Individual payout items with UNCLAIMED status can be cancelled via a DELETE /v1/payments/payouts-item/{payout_item_id} call before the recipient claims the funds. However, items with SUCCESS or PENDING status cannot be cancelled — you would need to request a refund from the recipient. Plan your payout approval workflow carefully with confirmation modals in Retool to prevent accidental disbursements.

What happens to payout funds if a recipient's email is wrong or they don't have a PayPal account?

If the recipient doesn't have a PayPal account linked to the provided email, the payout shows as UNCLAIMED. PayPal sends the recipient an email inviting them to create an account or link their existing account. If the recipient doesn't claim the funds within 30 days, PayPal returns the funds to your account balance. Build a monitoring view in your Retool dashboard that tracks UNCLAIMED items and alerts your team as they approach the 30-day deadline.

Is there a limit on how many recipients can be in one PayPal payout batch?

PayPal Payouts supports up to 15,000 items per batch. There's also a rate limit for batch creation — typically one batch per 30 seconds. For very large disbursements (15,000+ recipients), split recipients across multiple batches and create them sequentially using a Retool Workflow with a wait block between each batch creation call.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire Retool integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.