Skip to main content

PayPal

Read and work a PayPal merchant account - balances, transactions, checkout orders, captures, refunds, invoices and disputes.

Connect a PayPal business account with a REST app's client id and secret to answer questions about takings and act on them: read balances (including what is withheld), search transactions in a date window with fees and payers, follow checkout orders through approval and capture, refund captures fully or partially, read and chase invoices, and watch disputes with their response deadlines. Money-in keeps a person in the loop - creating an order returns a link the buyer approves rather than charging a card - and drafting an invoice is separate from sending it.

Connect

Credential fieldRequiredWhere it comes from
Client ID (CLIENT_ID)YesThe REST app's Client ID from developer.paypal.com → Apps & Credentials.
Client secret (CLIENT_SECRET)YesThe Secret shown beside it. Together they mint a short-lived access token on every invocation; the token is never stored.
SettingRequiredWhat it is
Environment (ENVIRONMENT)YesWhich PayPal installation this connection talks to: live or sandbox. They have separate hosts, apps and money, so this must match the credentials.

Tools

ToolAccessWhat it does
Get balances (yekar.paypal.get-balances)ReadThe PayPal account's balances, per currency: total is everything in the account, available is what can actually be spent or withdrawn, and withheld is the difference - a rolling reserve or funds under review. They are separate currencies and must not be added together. Requires the Transaction Search feature on the app.
List transactions (yekar.paypal.list-transactions)ReadA page of account transactions in a date window - payments, refunds, fees, payouts and transfers - with the gross amount, PayPal's fee, the payer and the resulting balance. The window is at most 31 days per call (PayPal's limit; longer periods need several calls) and data can lag up to 3 hours. Requires the Transaction Search feature on the app. This endpoint DOES report a true total for the window.
Get order (yekar.paypal.get-order)ReadOne checkout order by id, with its purchase units, captures and refunds. The STATUS is the thing to read: CREATED means nobody has paid yet (the buyer still has to approve), APPROVED means they approved but the money has NOT been taken until it is captured, and only COMPLETED means funds moved.
Get capture (yekar.paypal.get-capture)ReadOne captured payment by id: its status, the gross amount, PayPal's fee and the NET that reached the merchant balance. A PENDING capture has not put money in the account yet. This id is what Refund capture takes.
Get refund (yekar.paypal.get-refund)ReadOne refund by id: status, amount, the part of PayPal's fee returned with it, and the total refunded against the parent capture. On most PayPal accounts the fixed part of the fee is NOT returned, so a full refund still costs the merchant something - paypalFee here is what actually came back.
List invoices (yekar.paypal.list-invoices)ReadA page of invoices with their status, totals and what is still due. status is the thing to read: a DRAFT has not been sent to anyone, SENT is awaiting payment, and dueAmount is what is actually outstanding. The total across all pages is PayPal's own count, requested explicitly rather than derived from the page.
Get invoice (yekar.paypal.get-invoice)ReadOne invoice by id with its line items (up to 25; itemsOmitted counts the rest), recipient, due date and the amount still outstanding. recipientViewUrl is the page the customer pays on, when PayPal supplies one.
List disputes (yekar.paypal.list-disputes)ReadOpen and recent disputes and chargebacks, with the amount, the stage they have reached (INQUIRY → CHARGEBACK → ARBITRATION) and - most importantly - sellerResponseDue, the deadline after which a case is usually lost by default. Filter by REQUIRED_ACTION to see only the ones waiting on the merchant. Read-only: responding to a dispute needs evidence and a human.
Get dispute (yekar.paypal.get-dispute)ReadOne dispute by id: reason, amount, lifecycle stage, the transaction it concerns and the seller's response deadline. Read-only - contesting a dispute requires evidence and a human decision.
Create order (yekar.paypal.create-order)WriteCreate a PayPal checkout order and return the link the BUYER must approve. This takes no money - approval is a page the buyer completes, and the funds only move when the order is captured afterwards. Amounts are decimal strings with a currency code (PayPal does not use minor units). Set invoiceId to your own reference: PayPal enforces it is unique per merchant, so it is a real guard against charging twice for the same thing.
Capture order (yekar.paypal.capture-order)WriteCapture an approved PayPal order - this is the step that actually TAKES the money. The order must already have been approved by the buyer (Get order shows status APPROVED); capturing a CREATED order fails because nobody has consented yet. Capturing an already-captured order is reported as a conflict, not repeated.
Refund capture (yekar.paypal.refund-capture)WriteRefund a captured PayPal payment, fully or partially. Amounts are decimal strings with a currency code, not minor units. This moves real money back to the buyer and cannot be undone. Note PayPal usually does NOT return the fixed part of its processing fee, so even a full refund leaves the merchant out of pocket by that amount.
Create draft invoice (yekar.paypal.create-draft-invoice)WriteCreate a DRAFT invoice. Nothing is emailed and nobody is asked for money - the invoice sits in PayPal until Send invoice is run explicitly. Amounts are decimal strings with a currency code, not minor units.
Send invoice (yekar.paypal.send-invoice)WriteSend a draft invoice - this EMAILS the recipient and asks them to pay. It cannot be recalled. Running it again on an already-sent invoice sends a reminder, so it is not safe to repeat blindly. Read the invoice first if you are unsure whether it has already gone out.

Notes

  • At developer.paypal.com → Apps & Credentials, create (or open) a REST app and copy its Client ID and Secret. Live and sandbox apps are listed separately and their credentials never work against each other.
  • Set Environment to live or sandbox to match those credentials - this is required, and a mismatch fails with an "invalid_client" error that says nothing about environments.
  • Enable the FEATURES these tools need on the app: Transaction Search (for balances and transactions), Invoicing, and Disputes. An ungranted feature fails as a permission error, and Transaction Search additionally has to be enabled on the merchant account itself.
  • Amounts are DECIMAL STRINGS with a currency code - "19.99" and USD - not cents. This is the opposite of Stripe and Square, so do not convert.
  • A checkout order does not take money when it is created: the buyer approves it at the returned link, and Capture order is the step that moves funds. Only status COMPLETED means paid.
  • Refunds cannot be undone, and PayPal generally does not return the fixed part of its processing fee - a full refund still leaves the merchant out of pocket by that amount.
  • Transaction search covers at most 31 days per call and can lag up to 3 hours behind, so a recent empty window may mean 'not indexed yet' rather than 'nothing happened'.
  • Creating an invoice only drafts it; Send invoice is what emails the recipient, and sending again on a sent invoice sends a reminder.
  • Every action is attributed to this REST app, not to the person who triggered the automation. Bind automations using this integration as a service connection.